In this post, I will give the details of the WiFridge hardware : how to connect the probes to the Arduino. It follows the post here.
Here is the bill of material :
- 1 AM2302 Humidity & temperature sensor
- 2 DS12B20 1-wire waterproof temperature sensor
- 3 3mm LEDs (green, yellow, red)
- 3 1kΩ resistor
- 1 10kΩ resistor
- 1 4.7Ω resistor
- 1 Arduino Wireless shield
- 1 RN-XV Wifly module
- some solderless breadboard
- a bunch of wires
It is connected as describe on the previous figure (created mostly with Fritzing.)
- AM2302 : data connected on digital input 3 for kitchen temperature and humidity connected to a 10kΩ pull-up resistor
- both DS18B20 : data on digital input 2 for fridge and freezer temperature, connected to a 4.7Ω pull-up resistor
- status leds on digital inputs 6, 9 and 10 (optionnal though, just here for displaying status when operating) through 1kΩ resistors.
The 3 sensors are also connected to ground and +5V through their corresponding wire.
Also, to simplify debugging, I decided to connect WiFly UART to a software serial port on the Arduino so that the hardware serial is free for programming and debugging. I simply cut off the Rx and Tx legs on the shield and reconnected them to digital pin 7 & 8. But it is possible to only bend the legs so you can revert the process.
That’s it for the hardware. In a coming post, I will describe the software part.
… or why one would want its fridge to be connected to the internet !
This is one of my first Arduino based project. I had some issue in the past with my freezer that would let the temperature going to high for too long and I had no way of knowing before it was too late. I could barely detect it happened by using an ice cube in a glass that would melt in case of a huge temperature problem. That is why I decided to build the WiFridge : a wifi device that would monitor my fridge’s and freezer’s temperatures and send an alert in case anything goes wrong.
I first tried using an Arduino Ethernet because it was far less expensive than an arduino with a wifi shield. But… I have no ethernet port near my fridge and I did not want to have an ethernet cable across my kitchen… So I had a look on internet and decided to go for a RN-XV WiFly Module from Roving Networks and the ad-hoc shield.
For the temperature part, I bought 2 DS18B20 sensors, in a waterproof package, coming with a 1m long cable and its 4.7k pull-up resistor. I also bought an DHT22/AM2302 temperature and humidity sensor so I can get my kitchen’s environnement data along with fridge’s and freezer’s temperatures. Both sensors are digital sensor. That is, they send the temperature (and humidity for the AM2302) in the form of bits, not an analog voltage. DS18B20 sensor is using 1-wire protocol which I found very nice because I can connect both DS18B20 sensor to the very same input.
Add a few leds for monitoring the status of the gizmo, a bit of soldering after some testing on a breadboard, a few lines of code, and that’s it, I got my WiFridge up and running, sending data to the internet…
In a coming post, I will go into more details, give a detailed schematic for the hardware, describe Arduino’s code that I used (I am still working on it though as I have some Wifi stability problems…) and how I sent data to my emoncms web sites (one local on a Raspberry Pi and one on a shared hosting.)