Final project: Fridge Guard

Sometimes when I take a lot of things out of the fridge, I have no free hand to close the door and then the door is just left open for a long time. Sometimes when I use too much strength to close the fridge door, it bounces off but I can’t notice it. When I realize it is still open, several hours or maybe the whole night has passed by. The food went bad and a large amount of electricity was wasted.

IMG_1291

The Fridge Guard is a close door reminder designed for people who do not notice the fridge door is still slightly open or may forget to close the fridge door. The reminder can stick on the door and one of the polar bear’s hand will stick on the frame of the door, detecting whether the door is being left open and no one notices it.

It uses the Force sensor, IFTTT and Adafruit IO to gather the information from your fridge and sends a reminder to you through the message and piezo buzzer.

IMG_9744

Here is the link of Instructables tutorial.

Here is the video:

The whole process to making Fridge Guard was challenging and also interesting and I really enjoyed that. At the very beginning, I used temperature sensor to detect whether the door is open or closed. After I built the circuit and test it at fridge, it didn’t change the temperature when the fridge door was slightly open. So I changed to force sensor, I also met some problem here. Because the sensor is too thin, when the door is closed, there is no pressure on the sensor. Finally I found that I need to make it thicker so that the sensor can detect the pressure when door is closed.

For the shape of Fridge Guard, I made the design and shape to fit the context. Polar bears live in cold area, so I chose this shape. I used to put them outside the fridge at the side of door, but it not quite fit well. So I chose to put it inside the fridge.

For the future, I think I want to change the material of Polar bear to soft rubber which is more fit for the environment inside the fridge.

Week 10: Final Project Proposals

Here are my 3 ideas for my final project:

Idea 1:

IMG_9306

It is an accompany lamp that put on your working table. The color of light is warm yellow. When you touch the body of it, it will show red light which means she is shy. Also when you open the light, it may turn from warm yellow to purple which means she wants you to play with her.

Also, in the morning, it will change color due to the weather outside as a reminder what weather is today.

 

Idea 2:

IMG_9307

Sometimes I may forget to close the fridge or use too much strength to close the door which will bounce off but I do not notice that, so this is a reminder which put at the fridge to remind you to close the fridge. If you do not close the fridge, this reminder will play some music to remind you to close the fridge.

 

Idea 3:

IMG_9308

Previously, the smart medicine box does not show what the medicine is in each box. But the medicine always looks very similar. This medicine box is to tell you what medicine is inside ( which you input it when you put the medicine inside the box) and remind you the time to take it.

Lantern Fish – Halloween Costume

P2290595new

Here is my Halloween Costume. I was so excited after finishing it. It is really an unforgettable experience. Not only the challenging process of making the hood but also walking at the amazing parade wearing the hood.

Materials:

  • 1 RGB Neopixel LEDs
  • 1 HC-SR04 Ultrasonic Sonar Distance Sensor
  • 1 GEMMA  – Wearable Microcontroller
  • 1 Lithium Ion Polymer Battery

  • Fleece
  • Felt
  • Stuffing
  • Velcro
  • Iron wire

Initial proposal:

IMG_8503

I really like this hood initially. But the sewing was a very intricate task and harder then I had expected. I was trying to find what the other people did and learned how to make this hood. It is really tough and I tried to make the hood again and again. Finally, I made it even though it is not perfect. I also use the velcro to make this hood more suitable for the head. I added the detail to the fish like eyes, teeth, fins, and etc.

IMG_8895

Besides making the whole hood, another challenge is to connect the light with hood. I have tried different ways like tied it on the breadboard. But finally I used the iron wire to make it like a headband which is much more stable.

IMG_90391.jpg

For the circuit board. At first, I didn’t realize the distance sensor cannot be hidden in the hood. It must be at outside the hood without anything in front of it. Then I tried to tie it with the neopixel, making them like a little fish.

Below are more pictures and the code:

IMG_3744IMG_6679

#include <Adafruit_NeoPixel.h>

#define PIN 1

#define NUM_LEDS 1

#define BRIGHTNESS 200

#define Trig 0 
#define Echo 2 
 
float cm; 
float temp; // 
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_RGB     Pixels are wired for RGB bitstream
//   NEO_GRB     Pixels are wired for GRB bitstream, correct if colors are swapped upon testing
//   NEO_RGBW    Pixels are wired for RGBW bitstream
//   NEO_KHZ400  400 KHz bitstream (e.g. FLORA pixels)
//   NEO_KHZ800  800 KHz bitstream (e.g. High Density LED strip), correct for neopixel stick
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_RGB + NEO_KHZ800);

int inches = 0;

long readUltrasonicDistance(int pin)
{
  pinMode(pin, OUTPUT);  // Clear the trigger
  digitalWrite(pin, LOW);
  delayMicroseconds(2);
  // Sets the pin on HIGH state for 10 micro seconds
  digitalWrite(pin, HIGH);
  delayMicroseconds(10);
  digitalWrite(pin, LOW);
  pinMode(pin, INPUT);
  // Reads the pin, and returns the sound wave travel time in microseconds
  return pulseIn(pin, HIGH);
}

void setup()
{
//  Serial.begin(9600);
  pinMode(Trig, OUTPUT);
  pinMode(Echo, INPUT);
  pinMode(1, INPUT);
  strip.setBrightness(BRIGHTNESS);
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'

}

void loop()
{
  digitalWrite(Trig, LOW); 
  delayMicroseconds(2); 
  digitalWrite(Trig,HIGH); 
  delayMicroseconds(10); 
  digitalWrite(Trig, LOW); 
  
  temp = float(pulseIn(Echo, HIGH)); 
  cm = (temp * 17 )/1000; 


if (cm < 30){
    colorWipe(strip.Color(0, 255, 0), 50); // Red
  } else if (cm >=30 && cm < 500){
  colorWipe(strip.Color(100, 100, 100), 50); 
  }
}

void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

Week 7 Costume

This week I focus on both the circuit and the physical Lanternfish. My neopixel and other items are still on the way, so I use Tinkercad to test it. Here is the circuit.

ultrasonic sonar sensor

And I am trying to figure out how to measure the exact piece and make it fit into the head. Here are some photos of the process. I tried different kinds of methods to draw and cut. It is very difficult because I have no experience before. But it is a very interesting and special experience.

IMG_8889.JPG

Here’s my To-Do for the next week:

  1. Cut the actual size on flannel fabric.
  2. Finish sewing the whole mask. Add teeth, fin, tail, and eyes.
  3. Solder the circuit and make it work.
  4. Put circuit into the lantern fish.

Halloween Costume Sketch

Here are my three sketches of Halloween Costume this week.

IMG_8501

My first idea is a hat. It contains 4 RGB LEDs. 4 LEDs changes color, on and off when wearing it. Component: Neopixel, 4 RGB LEDs, Coin battery.

I was trying to figure out the circuit but not sure how to connect the LED and the Neopixel board.

IMG_8502

The second sketch is Eyeball headband. I gonna use two Ping-Pong balls and contains LED inside. When someone comes close, the LEDs in Ping-Pong balls will on. Component: 2 Red LED, 2 x 1 kΩ Resistor, PIR sensors, 4.5V Battery, 2 Pingpang balls.

IMG_8503

The third sketch is a Deep Sea Angler (Lantern Fish) Mask. It kind like a mask. Because there is a light hang in front of the face of Lantern fish, I am trying to put a Green LED into a Ping-Pong ball as the front light. Like the second sketch, when someone comes close, the LED will on and you can all the face of the fish. Component: PIR sensors, 1 Green LED, 4.5V Battery, 1 kΩ Resistor.

Week 5 Homework

This week I have a hard time to figure out how to put the transistor in the right direction. And the Neopixel strip light is so interesting!

Here are the videos of this week’s homework.

Analog input output

Motor

NeoPixel Lighting

Week 4 Homework: Littlear

Story:

Littlear is a little accompany monster who has its feelings on its face. People who are quiet and do not easily speak out their feelings can have them. Because this group of people is always afraid of socializing with others.

When they are upset and tired, they don’t want to speak with others; or when they want to refuse others but do not know how to say it. Littlear can help them to avoid these embarrassing situations. When they put this on his table and turn it on, it means “ Sorry I am not ‘online’ now”.

Sketches:

IMG_8137

Process photos:

IMG_8131

Circuit diagram:

屏幕快照 2018-10-02 下午4.37.10

Photos in context:

IMG_8146IMG_8144

Week 3 Arduino Homework Exercises

Here are the videos of the Arduino exercises of this week. This week’s exercises are different from before and also harder. I was trying to figure out how buttons work. Also for the serial monitor which do no have a distinct output like LED, showing a different perspective of Arduino.

Exercise 1 : Digital Input

Exercise 2 : The serial monitor

For composing a circuit and Arduino sketch, I used Pressing button to change fading animation speed.

Pressing button changes fading animation speed

const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  9;      // the number of the LED pin
int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // put your setup code here, to run once:
 pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  buttonState = digitalRead(buttonPin);
  
  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {

  analogWrite(ledPin, brightness);
  
  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }
  delay(10);
  } else {
  
  analogWrite(ledPin, brightness);
  
  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }
    delay(50);
  }
}