I developed a power and temperature monitoring system for work a few months ago. It’s based around a Raspberry Pi, some other components and a program I wrote in Python. This was a lot of fun for me, as it gave me a chance to combine my “day job” skills as an IT administrator and programmer with my interest in hobby electronics. The resulting system turned out really well and has worked great so far. In this article I’ll cover what the system does, the parts that went into building it, and of course the source code and related information will be provided for those wishing to build upon what I did.
As anyone who’s wanted to measure temperature with a Raspberry Pi knows, it doesn’t offer analog input. This means that the TMP36 sensor which is commonly used with the Arduino doesn’t work. The most popular option for the Pi then is the DS18B20, which is a digital sensor that utilizes the 1-wire interface and is natively supported by the Pi. It’s considerably more expensive than the TMP36, and as is the case when a component is expensive and in-demand, it’s prone to counterfeiting. I recently experienced this firsthand.