Breakout boards, precursor to IoT thermostat

I decided it was time to DIY an IoT thermostat, but I wanted to make 100% sure the designs would work first. In that vein I made some generally useful breakout boards to test the design in chunks.

I’ve got a 4x relay board, an esp32 breakout, and a max7219 board for 7-segment LED displays. Each individually is pretty useful, but they make up the majority of open questions I had about making a thermostat. The brains and support passives, the display, and the outputs.

First things first, the relay boards. These were made specifically to use relays stolen from dead or otherwise unusable sonoff basic modules. when those die the relay is one of the only things easy to salvage so I have been keeping them. In addition to that they’re cheap, so I have been using them as a standard relay for my designs going forward.

The schematic is super simple, stolen right from the sonoff basic itself. A single n-fet driving a relay coil in low side drive configuration. A flyback diode (small because i’s a small coil). A series resistor to limit inrush current to the gate of the fet. A pulldown resistor so it is always disabled when nothing is hooked up to the pin. It’s a simple circuit, but I wanted to make sure all my footprints matched my parts I sourced so I just made a little breakout and it works great!

Here’s the SPI 7-segment breakout. I took the standard pin mapping most people use for mapping segments to these SPI LED matrix driver chips. The thing is, these chips are designed to drive a matrix up to 8×8 LEDs, but we’re using each common cathode 7-segment as one slice of that matrix. Since I only needed to try out 6 digits, I left the other part of the matrix accessible as pads. Digits 7 and 8 cathode as well as all the segments to hook them up to are labeled. This one worked perfectly the first time as well, with one small issue.

ESPhome had the LEDs in the other order, so to make it easier to prototype I hacked up one board shown above. I don’t mind having to remap them, but it wasn’t exactly easy with my routing. I don’t agree with ESPhome doing things that way, but whatever, that’s what prototypes are for. I eventually salvaged and scrapped this board for parts, it was very fragile.

the schematic is super simple, and whether I used through hole or surface mount components is usually based on what I have at the time. In this case I didn’t have any 0603 12k resistors, I do now, so my future stuff is made like that. You can also see that I didn’t mark the mounting holes to not show up on the schematic. I also tend to use wire labels without the little termination symbols but that’s not consistent.

Here we are, the esp32 wroom breakout. You can use a module with or without a built in antenna on this one. The issues were that debounce resistor on the reset pin wasn’t hooked up and there’s an extra 10k resistor that should not be populated on a jtag line. I made this to hang off a breadboard and allow some sweet, sweet in-circuit debugging. I based the schematic on the one from the esp-wrover-kit because I was watching Dave’s Garage at the time and wanted something compatible, but cheaper. I compared the schematics of the wrover kit with the esp-prog and took a guess at where to split it and what parts of the schematic were un-needed for me. I got it almost right the first time, but on github those minor issues are fixed.

Always label your connectors, I learned this trick from the esp-prog. I have jumpers on this board to allow it to be powered over the jtag or serial headers, and from either 3.3v or 5v. I think that’s probably a bit much, so for future connectors I standardized to 5v on those headers. That’s not strictly needed, but I think higher voltages going along longer wires is a better idea from a stability point of view. That does mean that the regulator on the target board is needed, but I’m never going to power a board straight from anything less than 5v so this seems fine.

That’s my first 3 boards on the path to an IoT thermostat. You can find them here, I have been trying to keep the repos logically together, but it’s not really working.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: