📜 ⬆️ ⬇️

Show all that is hidden ... in the fridge

DIY project based on the Raspberry Pi transmits the contents of the refrigerator to the Internet every time the door is opened



Each of us at least once forgot to buy in the store something necessary from the products, something that is not in the refrigerator. This can be butter, or eggs or soy patties a couple of steaks. Quite often we think that some product is in the fridge, but in reality it is not there. And then, wanting to make a coffee sandwich in the morning, we understand the full gravity of our position. Life becomes empty and meaningless.
')
What can be done to not forget to buy anything? There is one interesting option - this is the Samsung Family Hub fridge, which tells and shows what is inside and what is not. This fridge is connected to the web, and regularly sends photos of its entrails. True, the cost of such a refrigerator is $ 6,000, and this will be enough to feed one person for 2-3 years (if you do not eat black caviar, of course). The inventor by the name of Mike decided not to spend extra money, but to modify his own refrigerator.


When the butter for the sandwich ended, and you forgot to buy it in the store

The idea is simple - to build a camera in the refrigerator, and every time the refrigerator is opened, the camera will take pictures of what is inside. Moreover, the photo is then sent to the site server, where it can be viewed right in the store. The solution is simple and quite logical: we open the refrigerator quite often, so the last photo will reflect all the products, and we will not forget to buy anything.

What is needed for the project:


The idea is simple. The refrigerator opens, the light comes on inside, the detector is triggered, the Raspberry wakes up, the camera is activated and takes pictures of the contents of the refrigerator. Raspberry sends the image to the server. Initially, instead of a sensor, the author of the project wanted to add a button that would clamp the door of the refrigerator, and which would indicate “raspberry” at the time of opening the door.

For information on how to link the camera and the "raspberry" Mike found on the Raspberry website. It also housed everything you need to work with a description of the necessary commands. So it only remained to connect the iron together, adjust a little, and everything - you can work. In order to take a test snapshot, it was necessary to enter just one command (after installing the appropriate software):

fswebcam testimage.jpg

True, the team had to be entered manually, but for the described purpose, full automation was needed. Mike spent a few hours on that. to understand how Raspberry works with buttons, but after a long search for information he gave up. It was decided to replace the button with a light detector. Now everything worked out - there was no problem with the sensor.

The next step is to work remotely with Raspberry and automatically upload photos to the server. For this purpose, the wireless adapter and the appropriate software were ideally suited to it (also from the “raspberry” site). In order to provide access to your photo, a domain was purchased . Now photos of Mike's fridge are available to everyone.

The power source was found in the refrigerator itself (a 12-volt light bulb), and to obtain a suitable voltage and current, the author used an ordinary car charger. The wires were hidden in the rubber gasket of the door, the camera is fixed on the door itself.

After that, it remained only to start the system to work. What was done.



Instead of a webcam, you can use a wide-angle lens for a phone, which makes the project even more convenient - whatever you say, and a webcam in the fridge is still not the optimal solution. A miniature camera smartphone - what you need.

Source: https://habr.com/ru/post/395025/


All Articles