Back in January, I was up at my cabin in Silverton hoping to help my dad out with a temperature monitoring system - his method was to use a video camera to continuously monitor a built-in temperature gage, and he would check the images every so often to track the temperature. Obviously, this kind of system is bulky and problematic because he has to check the image at a specific time to see if the temperature has crossed an alarming threshold.
Back in the winter, I wanted to set up a temperature system using WiFi so that he could get alerts if the temperature went below a specific level, so he didn’t have to worry about continuously checking. I used an ESP32 Thing Plus to collect basic temperature data and built an app with Blynk to display it.
But what if I want to view the data on a display inside the cabin, or maybe a low-power processor that would only wake when the temperature threshold has been hit? It seemed to me that this project was actually better suited for MicroMod because it requires versatility, so this project has progressed into building a temperature system with MicroMod, and seeing all the different ways I can expand on it with endless flexibility!
Step one: collecting data
The Data Logger Carrier Board is an obvious choice for this project because it's low power and easy to connect peripheral sensor boards through Qwiic, and the SAMD51 is an easy to use and economical processor to run the project. As with all MicroMod projects, all that's needed for hardware assembly is to connect the M.2 connector on the processor to the carrier! On top of that, I've added a temperature sensor through Qwiic.
We'll run some example code for the TMP102 that reads the temperature and then goes into sleep mode to save power. Opening up the serial monitor, we can see that it's reading the temp - perfect!
Step two: communicating over BLE
However, it isn't very useful to me to monitor the temp continuously through my computer...ultimately I want an automated system that just alerts me if the temperature is too low and I should be concerned about pipes freezing. Plus, I'd really like to test the temperature in more than one location - I'd like to set up edge sensors in the living room, the garage, and the boiler room. It seems that this is lending itself to the Artemis processor, as it's ultra low-power and can connect to Artemis edge sensors via BLE 5.0. Let's swap out the SAMD51 temeprature data to the main datalogger using Artemis BLE.
I implemented BLE over two Artemis boards using AMD Transaction Protocol, which is built on top of the ArduinoBLE library. The Artemis MicroMod processor acts as a server, and the Artemis Thing Plus acts as a client that can transfer data. The premise of the code is to begin serial communication with the temperature sensor, connect to Bluetooth, read in temperature values, and communicate it to the MicroMod datalogger. You can check out the general code here, I've just swapped the BME280 with the TMP102.
Step three: more connectivity, to be continued...
I really want an alert if the temperature goes below a certain threshold. It seems that I've found where I was in the first place...gravitating toward an ESP32 to utilize WiFi! But this time, I'd like to set up a messaging system to get a text if there's ever an alarming temperature drop instead of relying on checking my Blynk app. I'd also like to display the data in real time at the cabin via the Input and Display Carrier Board. So I might swap out the Data Logger Carrier Board for the asset tracker to utilize SMS capabilities, and I might also swap out the Artemis processor for the ESP32, so that I can still connect to my Blynk app. On top of that, we'll see if I can connect the Input and Display Board to Bluetooth to display real-time data. Any thoughts on what direction I should take, as I see how many different ways I can build a MicroMod project?
No comments:
Post a Comment