Sunday, November 8, 2026

Esp32C6 Zigbee Remote Temperature Sensor for My Home (Part 2)

Building a Remote Temperature Sensor Base Plate: A 3D CAD Journey from Organic Art to Parametric Precision
(part 1 is here <link>)

When you set out to design a custom functional enclosure or base plate for a hardware project, the physical constraints dictate everything. Recently, I built a custom 100mm x 100mm x 13mm mounting tray and base plate for my remote temperature sensor project. While the electronics themselves deserve a deep dive of their own (which we'll save for a separate technical post), the real adventure happened in the digital workshop trying to model it all.

Along the way, I chased some wild geese, took a detour through artistic modeling software, and ultimately found redemption in parametric design.

The Hardware Collection

This project was meant to be a hardware upgrade for my running remote temerature sensors. The hardware has served me for almost a decade and served me well. But you reach a point where something new is inevitable. My AC system doesn't actually have a thermostat. It has a controller mounted right on the air handler that takes settings like target temperature, peak billing period, and mode and handles it directly. This portion of the system is detailed here <link>. 


Then there is the 'face' of the system, what people call the thermostat. It only sends settings to the air handler controller and has a cool display that can be read by real human beings. It doesn't actually measure the temperature or operate any of the AC relays. It's just a pretty face on the AC system that allows me to adjust the temperature or change the mode (cooling or heating). That project is described and detailed here <link>. 


So, I cobbled together some hardware pieces to do the job I had in mind. First, I had thought up some requirements for the devices. 

1. They had to be wireless and battery powered. I wanted these sensors, 2 of them, one for each of my AC units, where the people were, not on a wall in the hallway. That means they may not be close to a wall plug and couldn't use wires for power.

2. They had to use Zigbee to communicate. Since they're battery powered, they would eat batteries too fast over Wifi, and I already have a good Zigbee network of sensors and controls. Plus, with the increasing number of Wifi devices, I don't want to run over the number my router can handle.

3. They had to use rechargeable batteries that are commonly available. I went for the 18650 because they have a large capacity and are all over the place. I have a pile of them that I keep for flashlights around the house. Those little custom soft lithium batteries would never survive in my environment, plus how would I replace them years from now? 

4. I wanted a button on the device to send a trigger or some kind that could serve any reasonable purpose through my Home Assistant installation. Perhaps something like "all lights out" by the bedside. 

5. It had to look nice. A pile of electronic parts piled up and wrapped with a rubber band was OK for testing but not for the long term. 

So, I wound up with a Seeed Studio ESP32C6 which supports Zigbee and an external antenna. I didn't want to worry about distance. 

See the tiny antenna connector on the rear

To handle the board and give me something to plug wires into, I used the Seeed Studio Grove Expansion board. It has built-in battery charging circuitry. 


And, because I didn't want the problems of creating a way to hold a battery, I picked up some commercial 18650 battery holders that I could mount to something. Since the 18650 battery is a bit heavy and changing them could be a chore, they needed to mount down with a real bolt and have some way of keeping them from rotating. The hole in the center is for an M2.5 bolt and the two holes on the ends are for anti-rotation tabs ... perfect.

Now to tie them together and see how they worked, but the bits were too heavy to just cart around the house experimenting. I made little mounting plates for them using the old stand by tool Fusion. 



Now I was set to test ideas and hook this thing up through Zigbee into Home Assistant and finish off my changes to the AC system. Heck, I could even wrap a rubber band around it and use it in test mode all over the house.

Note: There were a ton of technical problems with getting it to work electronically, but this post is devoted to the physical aspects of the new device. I will go through the technical aspects in a later post.

But, I was tired of Fusion.

Why? Well, it's cloud-based and HUGE. It's a truly amazing tool that can do anything in an industrial setting. It has project management and process built right into it. It's great and can do anything you need. It also takes months to learn, keeps your work on a cloud server, updates incessantly, and if you go for a license, it's also expensive. Sure, you can follow their rules, and it costs nothing except the disk space on your machine and the constant updates. 

I wanted something simpler that kept the files on my machine. I really like being able to put a sketch on any surface and draw things right there, but spending a month learning how to do that was a task I didn't want to take on again. If you don't use it often, the various tools take time to relearn.

Thus began a journey to find the perfect tool for me. As the last picture illustrated, I had spent a few hours measuring hole spacing and size for standoffs and screws to hold things in place. That gave me the idea of making a mounting plate for the processor assembly, the battery mount and the sensors and switches I needed.  Those assemblies could then be merged into a common plate big enough to hold them and I would have the start of a custom enclosure. That would make my next project much easier; just leave out the battery and hide a 5V power supply in the same place, or grab a different processor and create a new mount for it. Reusable pieces could make projects much simpler.

I had no idea how hard that would be.

The Blender False Start: When Artistic Tools Meet Engineering Reality

Like every maker, I love exploring new software, which led to an early, optimistic stop in Blender.

Blender is a great creative tool. It allows for incredible visualization of ideas, enabling makers and artists to sculpt fluid, organic art that looks stunning. But I quickly learned it is entirely inadequate when your creation requires exact, real-world distances, precise tolerances, and sharp, repeatable corners that must mechanically mesh with physical hardware components like micro-controllers, standoffs, and battery compartments. Trying to force an artistic sculpting tool to behave like a precision engineering suite is a fast track to headaches. You carefully set up a set of dimensions, then stretch something, and your measurements move with it. Sigh, maybe for making great pumpkin sculptures for fall, but not for a mounting plate for a processor board.

OpenSCAD looked like the perfect tool.

Having a bit of programming under my belt, OpenScad looked like the perfect solution; you write code to build something and look it over in a 3D window. Then you nudge the code to get the part exactly right, and you have the thing you imagined right there to play with. You can print that piece and try it out. It's code that turns into a thing you can actually hold in your hand. 

My problems with it began when I kept adding pieces to it for the switches, antenna, battery, and holes for things to poke through. Each of those was another thing in the code. Plus, the way you make a hole is to create a thing the right shape for the hole (think USB plug shape) and then subtract it from a solid. In a very short time you have so much code that you start having trouble keeping it straight in your head. 

OpenSCAD is a great tool, but not for me. Too much messing around debugging code I was unfamiliar with.

Finding A Solution in FreeCAD

After bouncing through other script-based and heavyweight CAD options, I landed on FreeCAD.

Despite its reputation for steep learning curves and topological naming quirks, FreeCAD ultimately won. It provided the exact blend of parametric sketching and solid modeling required for a functional base plate. By building the tray as a parametric body, I could adjust standoff heights, component clearances, and battery pockets numerically.

When a mounting hole needed a half-millimeter shift, FreeCAD handled the adjustment cleanly without collapsing the entire model tree. Printed out on the Flashforge Creator 5 Pro, the final base plate snapped into place with the hardware seamlessly. 

My idea of reusable pieces met a hard stop though. I still couldn't separate a battery mount out. Blender aficionados take on a different tactic. They use a LOT of sketches; create a sketch of a rectangle, extrude it to form a solid, put a sketch on one of the surfaces, extrude or pocket that, and so on. Basically they put one or two items on a sketch on one surface and make standoffs or holes in it. then they put another sketch on the same surface and make a wall on it. There are lots of sketches, and each one has its own dimensions for the items in that sketch.

It works well and can be organized, but it's really not reusable. That is until I discovered that I could save an object with all its dimensions as a step file and just import it into another file. That entirely solved the problem. Make a battery holder mount, save it as a .step file, and later import it into something that needs a battery. Now I have a switch mount, a processor mount, etc. and just import them into a file that has the base plate. Problem solved.

But, what about all the other tools out there?

I was building a project, not doing a series of reviews on the 3D tools available. I had something that worked, and I was going to get this project running, darn it! But a little later I did run across other tools that could even fit my goals better, and I may try them out as well. I have all the measurements available and more experience, so that's a real possibility for the future. Anything to take some of the tedium out of DIY automation.

But, what did I finally wind up with?

Besides a pile of experiments fitting things and adjusting the friction of a hole for the usb extension, or the height of the processors so it would fit to the wall, or a switch mount that would actually work, or ....

A pile of cut pieces to measure against.

It's hard to line up a centered hole between two tabs for a battery holder. You wind up a tenth of a millimeter off and another tenth of a millimeter too wide to fit the hole for the tab. The height of the usb port on the Xiao ESP32C6 is hard to gauge when it's plugged into a board that is mounted on standoffs. Anyone that has done this themselves knows the problems. 

Eventually, I came up with a workable design. 


The pillar on the right is thick and tall because the USB C port is actually that high after the standoffs and the processor is mounted on the board. I could have used a short USB cable and a panel mount, but I uesd the same technique on other devices and it seemed to work well. Here's the device with all the pieces and wires and stuff mounted. 


It's sitting on a patio table measuring the outdoor temperature running off the battery. The USB cable isn't connected to anything; I plugged it in to show how I used a short extension as a sacrificial plug that will be easy to replace if it gets damaged. The temperature sensor is the little board in the middle sitting on its own pedestal open to the air. The dipole antenna is in that slot in the middle kind of just sitting there. I wanted it easy to remove and put on something else if that was ever necessary in the future. Plus, if you want to simulate a temperature event, just put your finger on the chip and it will fire and send data. 

The switch on the side is for the trigger that can be mapped to an action in Home Assistant. The other switch up by the USB plug is for a long wait on boot that will be explained in great detail when I post about the electronics and code. 

Now, this isn't totally done yet. I want to create a shell that will cover all the electonics with something a bit more attractive. Nerds like me appreciate being able to see what went into it, but other people don't . I think I'll make a cover that will make it look like a cube first. I can decorate the sides of the cube with letters, maybe a place to stick pictures, or some other idea I run across on the web somewhere. Then I'll pull up Blender and go nuts. Maybe a dragon temperature sensor;  a ghost for Halloween; a Turkey for Thanksgiving; a round bomb for the 4th of July. the sky is literally the limit. See what doing it oneself does? It turns things like a fancy thermometer into fun.

What did learn from this?

There's more tools out there to do this kind of thing than I ever expected, and with a little prowling around you can find the right one for you. I also reinforced my love of doing this kind of thing. Building obscure ideas up from almost scratch is a lot more fun that ordering it premade from Amazon and just sitting it on a shelf. 

And, I can talk intelligently with the 7 or 8 people in the world that take an interest in how to enclose a project built up from parts using 3D editors and printers.


No comments:

Post a Comment