Joshua Young
Created March 30, 2016

Fridge Widge

Check stock of essential items in your fridge when you are out of the house. I will check milk status, but the options are endless.

Intermediate8 hours281
Fridge Widge

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
×1
FSR 400
×1
Breadboard (generic)
Breadboard (generic)
×1
Resistor 10k ohm
Resistor 10k ohm
×1

Software apps and online services

Windows 10 IoT Core
Microsoft Windows 10 IoT Core

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Breadboard Layout

Hook FSR (Force Sensitive Resistor) up as voltage divider to read Analog input.

Schematic for FSR scale

Wiring diagram for hooking up the FSR to the Arduino.

Code

Milk Scale Test Code

C/C++
This code helps you set up your milk scale and verify your resistor choice works.
/* FSR simple testing of MILK monitor
 
Connect one end of FSR to power, the other end to Analog 0.
Then connect one end of a 2K resistor from Analog 0 to ground 
 
*/
 
int fsrPin = 0;     // the FSR and 2K pulldown are connected to a0
int fsrReading;     // the analog reading from the FSR resistor divider
 
void setup(void) {
  // Weight information via the Serial monitor
  Serial.begin(9600);   
}
 
void loop(void) {
  fsrReading = analogRead(fsrPin);  
 
  Serial.print("Analog reading = ");
  Serial.print(fsrReading);     // the raw analog reading
 
  // Parce data
  if (fsrReading < 10) {
    Serial.println(" Empty");
  } else if (fsrReading < 200) {
    Serial.println(" - Running out of Milk");
  } else if (fsrReading < 500) {
    Serial.println(" - Half Full");
  } else if (fsrReading < 800) {
    Serial.println(" Mostly full");
  } else {
    Serial.println(" Full!");
  }
  delay(1000);
} 

Credits

Joshua Young

Joshua Young

2 projects • 0 followers
Thanks to Adafruit.

Comments