Hi All,
Some background, I’m a long time unix systems engineer working at a manufacturing facility. Reading about this project piqued my interest.
The challenge: how to provide remote access and control of area specific heating zones. This is especially useful as we have been on rotation for the past two years and not all zones need to be heated to a comfortable level each day. Conversely, when an area is going to be active unexpectedly, it would be helpful to see the current temp and increase it as needed before heading in.
As noted in the linked project, commercial options are available but are neither integrated nor readily customised. Furthermore, they are prohibitively expensive across multiple zones.
The solution: employ a SBC to provide both climate controls and an integration platform. After evaluating a number of solutions, the Radxa Zero became my board of choice.
For those looking to implement a similar solution, my bill of materials is as follows (pricing in USD from Feb-March 2022).
51.95 : Radxa Zero w/ 4GB RAM and 16GB emmc storage, source Ameridroid
20.65 : 7 x DS18B20 Temperature Sensors*1, source Ameridroid
3.95 : 10W power supply (5V @ 2A), source Ameridroid
3.95 : USB A to USB C cable, can we ever really have enough of these? Source, Ameridroid
0.95 : small heatsink, source Ameridroid
8.99 : Inland 8 channel 5V relay, source Micro Center
4.99 : Inland 20cm Jumper Wire - 3 pack, source Micro Center
24.40 : Bud Industries NEMA 15x15x9cm ABS Enclosure p/n NBF-32210, source Mouser
0.60 : 6 x TE 4.7k Ohm carbon film resistors p/n CFR25J4K7, source Mouser
6.00 : 2 x mini breadboard, source Makers Portal
5.50 : assorted M6 screws & nuts, nylon spacers, small self tapping screws, and a 14 pack of 22-14 AWG wire connectors, source nearest hardware store
20.55 : combined shipping costs from all vendors
-----
152.48 Total
A small piece of plywood backer board and wood screws were already available onsite.
*1 Note as indicated in the inspirational project, sourcing quality DS18B20 sensors is critical if you need to use parasitic power. As a result, the first sensors were purchased from Mouser and made by DFRobot. These did not work with parasitic power when wired as documented (or wired any other way). The Ameridroid sensors from Shelly do work with parasitic power. I ordered extra in case 1-2 were bad. All the sensors worked when wired with all three wires (+/-/sig). For my use case, most sensor locations only have two wires already in place, thus necessitating parasitic power or a big bill from an electrician to run more wires.
As this was my first time working with the R0, I decided to install Debian 10 with XFCE rather than Ubuntu server without X. The initial system memory usage was around 340MB with storage use of about 2.2 GB.
I ended up using the side of a spundger to press the R0 usb boot button.
Erasing the emmc and installing Debian took < 15 mins and then I was looking at XFCE on our home TV running on the R0!
The 34x20mm heatsink was at least 2X too large, so the following day, I cut it in half in both directions then filed the edges and used superglue to connect the fins together. Thermal pads keep it stuck to the CPU and much of the RAM:
As the R0 will live in a sealed enclosure in an utility room with the waste heat of a hydronic boiler, additional cooling seemed like a wise step. Observed temps are between 36-43C concurrent with load and room ambient.
A sysadmin friend had directed me to Hass.io / Home Assistant (HA), so the next day I installed the docker version onto the R0. This roughly tripled the space used to about 6.5 GB, this can be reduced by cleaning up the docker installation files, however when updating that space will be used again. Remarkably, RAM usage is still < 500 MB with ~10% used by the HA docker and associated processes.
After getting some idea of the YAML files HA requires and stubbing out some base configurations, I plugged in a few DS18B20 sensors to get OneWire working. There wasn’t an overlay readily available for this, but thankfully after a visit to the forum @RadxaYuntian responded to my request and provided the needed dbo and source. That did the trick, as temp output was now available:
$ cat /sys/devices/w1_bus_master1/28-*/temperature
20250
19687
20000
btw: this is also symlinked to /sys/bus/w1/devices
The temp sensor could then be used to control the climate on/off state via the 5V relay as well:
After bench testing, it was time to drill openings into the enclosure for power, the temp sensor input wires, output to the heating switch wires, and R0 mounting:
I had a couple old dropper bottles that I cut the tops off of to use as grommets for the wires. As the USB C cable is too big to go through after the grommet is in place, I pushed the wire through before installing the grommet in the enclosure
Now it was time to put everything in place. The 5V relay was just a little too long to fit diagonally into the enclosure. I took a fine metal file and rounded the edges ever so slightly. Using the same enclosure with fewer/smaller 5V relays or a larger enclosure would also suffice. The 5V relay has nylon spacers and self-tapping screws to hold it into place. After making all the GPIO connections to the R0, driving M6 screws through the mounting holes, then adding nylon spacers had it ready to mount in place:
Which was accomplished with finger tight M6 nuts to go easy on the R0:
Here’s a preview of the enclosure mounted in place with everything situated inside:
To be continued…