DIY "Family Hub" Refrigerator With Raspberry Pi + Camera





Introduction: DIY "Family Hub" Refrigerator With Raspberry Pi + Camera

Internet of Things Contest 2016

First Prize in the
Internet of Things Contest 2016

Automation Contest 2016

First Prize in the
Automation Contest 2016

I used a Raspberry Pi and usb webcam to create my own "Family Hub" refrigerator. Every time I open the door a light sensor triggers the camera, which uploads the photo to the internet!

Step 1: Parts Needed

Do make your own refrigerator camera, you'll need:

  • Raspberry Pi (I used an old one)
  • USB wifi adapter
  • Light sensor
  • Wide-angle USB webcam

I used the Genius WideCam F100 with a 120 degree field of view. The wider the better!

Step 2: Make a Button Trigger the Webcam.

This was my first Raspberry Pi project, so I started by just making a button take a picture with the camera. I used a pre-installed program called "fswebcam" to take the picture and the GPIO python library to use the button.

I originally started using the "Pi Camera" that's made for the raspberry pi. But as you can see from the picture the focal length was too narrow to see anything in the refrigerator.

Step 3: Swap the Button for a Light Sensor.

I was expecting this to be more difficult. It turns out the light sensor was a drop in replacement for the button. All I had to do was switch the wires over and it worked! At this point, whenever the light sensor saw light it would take a picture.

Step 4: Upload to the Internet.

This took a little longer than I expected. Eventually I figured out you could use a python library called "ftplib" to transfer any file on the raspberry pi to a server (our website). Then I bought a simple to remember domain name ( and forwarded it to the uploaded image. That way it's easier to remember at the grocery store.

Step 5: Install Into the Refrigerator.

I got half lucky with my installation into the refrigerator. I needed 5V DC power, and the fridge circuit board provided 13.5V. Better than nothing!

Step 6: Step Down the Voltage.

I started by using a linear voltage regulator (7805) but it got EXTREMELY hot. It turns out I created a 7 watt space heater in my refrigerator. I learned I needed a switching regulator. Those can be found in every car usb adapter, so I just soldered in my 13.5V leads.

Step 7: Hide the Wires.

I was able to stuff my USB cable behind the magnetic strip of the refrigerator which made things look nice and neat. I drilled one small screw hole to mount the camera.

Step 8: Finished Installation.

Step 9: See It in Action!

You're welcome to visit to see what's in our fridge, although I'm not sure how long we'll keep that public ;)



    • Paper Contest 2018

      Paper Contest 2018
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    Hey I was wondering can we use Arduino in place of Raspberry PI ? Will there be any complications ?

    can you explain why upload a picture of what's inside of a fridge? why do people do that?

    So when they are at the grocery store buying things, but they forget what they already have, they can take a quick look at the fridge's contents on their phone.

    On the website,, you mentioned that you were having problems with the WiFi signal strength. You can try placing the Raspberry Pi and the WiFi module outside of the refrigerator and place the camera and light sensor inside the refrigerator.

    This is really cool. Great job.