My fridge needs to be at constant temperature between 2° C to 8° C due to heat sensitive materials in it. I want to have an automatic process where it can log the temperature everyday and also notify me when the temperature goes beyond the range.
- Raspberry Pi
- DS18B20 Sensor.
- LCD Panel 20 x 4
- PIR Motion Sensor HC-SR501
- Reads and display the temperature (updated every minute)
- The LCD also displays the IP address for easy access to the Pi.
- PIR motion sensor which enables the backlight of the LCD to turn on when someone approaches.
- Sends data to Adafruit IO and updates Google Sheet on the latest temperature readings.
- SMS alerts, email and smartphone notification.
I am breaking this project into several parts:
Part 1: Installing the DS18B20 sensor
Part 2: The LCD & Motion Sensor
Part 3: Cron and other scripts to connect to Adafruit / Google Sheets etc
Installing the DS18B20 Sensor
The DS18B20 sensor may come in many wire color combination. Check yours set here.
I have the Red (3.3v), Black (GND) and Yellow (Data).
Wiring is as follows :
- Red – 3.3v
- Black – GND
- Yellow – GPIO 4
(Make sure you have the 4.7KΩ resistor between the Red / Yellow wires)
Add line to config.txt file located at /boot/config.txt
sudo nano /boot/config.txt
type the following into the file
Then REBOOT your Pi
Next to check if the sensor is working, type the following
sudo modprobe w1-gpio
sudo modprobe w1-therm
cd 28-xxxx (change this to match what serial number pops up) or shortcut cd 28*
If you get similar results, then your sensor is installed properly.