Introduction: Smart Fridge and Shopping List
With the smart fridge and shopping list you can monitor your shopping habits. You can make your shopping list so you just have to open your phone while you're in the grocery store. This project can also be applied on a closet or drawer.
Step 1: Materials
COMPONENTS
- 4x Load cells 5kg-10kg*
- 4x hx711*
- mcr012 barcode scanner
- 2x ledstrip ws2812 (144 leds)**
- 1x ultrasonic distance sensor - HC-SR04
- 1x Green led
- raspberry pi
- arduino
- power supply 5v
- Capacitor 1000µF, 16v
- 2x 4m utp-cable
BUILDING MATERIALS
- fridge
- 1x thin plastic plates
- 2x plexiglass plates*
- 2x hard (non-bendable) plastic plates
- 1x box that fits your raspberry pi, arduino, breadbord
- 1x box that fits your barcode scanner
- double sided tape
- silicone
- M4 and M3 screws
* this depends on how many shelves you have inside your fridge
** this depends on how many shelves and can be used instead of the green led
Step 2: the Top Box
Required parts :
- arduino
- raspberry pi
- breadboard
- big box
- screws
Required tools
- Drill
We'll start of easy with the top box. This is the box where your arduino and raspberry pi will be placed.
p.s : I recommend to have a case for your arduino and raspberry so you won't damage them
- Take your Pi and arduino out of their case
- Place the two cases in the same corner of the box
- Drill 4 hole trough the cases and the box, note that they will need to fit an m4 screw
- Put the m4 screws trough the holes and tighten them with fitting bolts
- At last you need to make the breadboard stick to the box this can be done in 2 ways :
- if you have a metal base, you can take a metal drill and drill 4 holes in the metal so you can use screws
- take off the back sticker and stick it on the box
Step 3: Solder
Required parts :
- 2x ledstrips
- 4x loadcells
- led
- ultra sonic sensor
- 2x 4m utp-cable
Heat shrink tubing
Required tools :
- soldering iron
You can almost build the circuit but first you'll need to solder the components to a utp-cable so you have cables that reach the top. Make sure to keep a piece of paper with the color codes;
A short toturial on how to solder : How to solder in 5 easy steps
- Take the 2 utp-cables and cut them in half
- Take 2 loadcells and solder the piece of cable, 2 times
- Take the ledstrips and solder them to a piece of cable
- Take the led and ultra-sonic sensor and solder it to a piece of cable
Step 4: The Circuit
notes :
connect the 2 ledstrips to the power supply
connect arduino with pi by usb
connect mcr012 barcode with usb to pi
Step 5: Mysql
forward engineer this schema so and you have your database al set up
export this file into a dump file open the dump file and copy the code
Step 6: Install Your Raspberry Pi
first install raspian stretch : Raspbian stretch
then use following commands listed in https://github.com/NMCT-S2-Project-I/Project-I readme file
you remove the whole project1 file by using
rm -r project1
if you did this on your pi you can clone tis repo :
git clone https://github.com/NMCT-S2-Project-I/project-i-DriesVanherpe1
go to maria db and past the code we had from the dump file
Step 7: Making Load Cell Structure
Required material
- hard plastic plates
- plexiglass plates
- thin plastic plates
- soldered loadcells
- screws
Required tools
- drill
- saw and knife
- cut the thin plastic in 4 little pieces
- cut the hard platic plates so they fit in your fridge schelves
- cut the plexiglass plates smaller so they can go on top of the hard plastic without touching the edge of the fridge
- put one piece of thin plastic on each side in the middle of the hard plastic and drill the holes
- put the screw trough the load cell and tighten
- mark the holes on the plexiglass so they allign with the other side of the loadcell drill these holes
- repeat
Step 8: Barcode Reader
required materials
- barcode reader
- small box
- screw
required tools
- silicone
- drill
- drill 2 holes in the bottom of the box and tighten the barcode reader to the bottom with a screw
- on the lid of the box put silicone and stick this to the side of the fridge
- let this dry for a night
Step 9: Ledstrips
Required materials
- ledstrips
Required tools :
- double-sided tape
- put the double sided tape on the back of the ledstrips and fit these into your fridge above your shelves
Step 10: Ultra Sonic Sensor
required materials :
- small electric box
- ultra sonic sensor
- green led
required tools
- drill
- knife
- take the small electric box and cut 2 hole in the lid
- make a third in the top right corner of the lid small enough so your led fits just trough
- the last hole is on the side so you can put your utp cable trough
- apply this to you box on the bottom of your fridge
Step 11: Finish
run both project1-flask and project1-sensor and you are good to go