Having recently bought a smoker, and not being very good at it, I thought it was a good idea not only to document the process for repeatability (on the occasions I get it right!), but to be alerted if temperatures exceed a preset range. This project uses a MAX31855 K-type thermocouple amplifier, along with a TPS61291 low power switching regulator for maximum efficiency and, of course, a way to transfer data wirelessly

Reporting time can be set in the web UI, and all data is sent wirelessly over long-range 802.15.4 protocol, logged in Grafana, which triggers IFTTT alerts for out-of-range temps, which in turn ring my phone.

When the microcontroller is sleeping, it shuts off the MAX31855 with a simple PNP transistor. A timer periodically wakes the microcontroller, which triggers an IO to wake the 31855, waits a bit, reads data through SPI, sends it wirelessly, then shuts down the thermocouple ic, and goes back to sleep.

A fun part of this project was taking measurements to make sure power usage was as low as possible. For this purpose, I bought a CurrentRanger. The CurrentRanger is able to automatically switch from the nA to uA and mA range automatically, and fast enough not to cause brown-outs. 

One of the first issues I had was, in fact, brown-outs (!) when the radio woke up and current demand increased suddenly. Felix over at lowpowerlab.com was super helpful with suggestions, and it turns out the issue was the CR2032 battery's impedance being too high for such measurements. For tests, using a couple of D batteries solved the problem:

Then, I installed redis and redis-timeseries, modified the CurrentRanger firmware a little to format the output in a way that was easily used by redis, and slapped together a small python script to send the data over. The last step was to install a redis-timeseries plugin for Grafana and:

In the image above, you can see the temperature being taken every 5 minutes, and corresponding energy consumption. While sleeping, the system uses around 80 nA, and temperature readings use ~25 mA (radio + 31855). Some calculations show that daily usage is about 0.603 mAh, meaning a continuous lifetime of about a year on a 220 mAh CR2032 battery.

The board can be found here, and uses this project for wireless communication.

Like all other projects here, this automatically associates and joins a private area network using the 802.15.4 protocol.