Temperature and humidity are vital data points in today’s industrial world. Monitoring environmental data for server rooms, commercial freezers, and production lines is necessary to keep things running smoothly. There are lots of solutions out there ranging from basic to complex and it can seem overwhelming on what your business needs and where to start.
We’ll walk through how to monitor temperature with a Raspberry Pi and different temperature sensors you can use. This is a good place to start since these solutions are inexpensive, easy to do, and gives you a foundation to build off of for other environmental monitoring.
A Raspberry Pi is an inexpensive single board computer that will allow you to connect to a temperature sensor and stream the data to a data visualization software. Raspberry Pi’s started out as a learning tool and have evolved to an industrial workplace tool. The ease of use and ability to code with Python, the fastest growing programming language, has made them a go to solution.
You’ll want a Raspberry Pi that has WiFi built in, which are any model 3, 4, and zero W/WH. Between those you can choose based on pricing and features. The Zero W/WH is the cheapest but if you need more functionality you can choose between the 3 and 4. You can only buy one Zero W/WH at a time due to limitations by the Raspberry Pi Foundation. Whatever Pi you choose, make sure to purchase a charger since that is how you’ll power the Pi and an SD card with Raspbian to make installation of the operating system as easy as possible.
2
Sensors
There are three sensors we recommend using because they are inexpensive, easy to connect, and give accurate readings; DSB18B20, DHT22, and Raspberry Pi Sense HAT.
DHT22 — This temperature and humidity sensor has temperature accuracy of +/- 0.5 C and a humidity range from 0 to 100 percent. It is simple to wire up to the Raspberry Pi and doesn’t require any pull up resistors.
DSB18B20 — This temperature sensor has a digital output, which works well with the Raspberry Pi. It has three wires and requires a breadboard and resistor for the connection.
Sense HAT — This is an add on board for Raspberry Pi that has LEDs, sensors, and a tiny joystick. It connects directly on to the GPIO on the Raspberry Pi but using a ribbon cable gives you more accurate temperature readings.
3
Raspberry Pi Setup
If this is the first time setting up your Raspberry Pi you’ll need to install the Raspbian Operating System and connect your Pi to WiFi. This will require a monitor and keyboard to connect to the Pi. Once you have it up and running and connected to the WiFI, your Pi is ready to go.