Overview
- This board is designed to measure temperature using Digitial I/O (DIO) as opposed to common HVAC measurement using Thermistors
- I wanted to start off with sole purpose board as a learning experience for Schematic Capture, Parts Selection, Layout, and potentially Assembly
- I wanted to investigate SOME novel techniques or technologies for my own curiosity
- In the end, I probably made this fancier than I should have
Schematic
3D Model
AI Usage Disclaimer
- I used AI to help pick some parts on LCSC, knowing what I wanted but having it help me find the relevant LCSC part number
- I used AI to help determine what passives I needed (clearly not well enough!!)
Lessons Learned
- I should have considered pull-down/pull-up circuits in more places
- I needed a pull-up on the data lines for the temp sensors
- I am concerned that having the 3.3V Switched power on and the 5V will cause one to feed back into the other via the temp sensor data line
- I should have considered shunt resistors in more places. This might cause issues of high load on the microcontroller
- My first revisions have the wrong revision number on them
- I did not place any markers of the board name or revision on the PCB
Active Components
U1 - Seeed Studio Xiao ESP-C6 module
Website
Seeed Studio Xiao ESP-C6 module
Purpose
This will provide control and will host the primary Firmware for the board
Benefits
- The ESP32-C6:
- RISC-V based
- Dual core w/ Low-power and High-power cores
- Support for Zigbee, Thread, BLE 5.0 and 2.4G WiFi 6
- Most benefits compared to other Xiao ESP32 models
- Module is price efficient ($5)
- On-board USB power and data
- On-board charging circuitry
- On-board RF ceramic chip w/ optional software controlled wired antenna
- On-board LEDs and Control Buttons
- I am used to working with the ESP32-C6 and have a few of these particular modules
Downsides
- Higher module cost
- Lower availability for this custom module vs the Espressif defaults
- Design limitations due to module use
Justification
There are a lot of options of Microcontroller. I like the idea of a module for my first go because interfacing with the MCU can add more complexity. Having a known quantity for the programming, interfacing, power and key functions creates a good starting point where I know I’m not missing any major aspect.
This particular module uses an ESP32-C6 which has a lot of benefits, being Espressif chip gives a lot of hobbyist software support (ESPHome, ESP-IDF, Zephyr RTOS). It is also a tiny module so it does not take up a lot of space on the PCB, this is in part due to ceramic antenna on board, which will be perfect for testing and local debug where long ranges are not necessary.
Another fun thing about this Espressif family of chip is it’s fancy GPIO MUX Matrix. If you need to “get the most” out of your particular Subsystem, for example, High Frequency SPI operation, you’ll want to stick with the “standard” SPI pinout, however, if you need in a punch, you can multiplex virtual any subsystem to any pin on the chip, allowing for extreme flexibility.
Crossing my wires
I can’t tell you how many times I realized I had the wrong pin in my layout and needed a messy, sometimes unsuccessful, wire mod. If I was using an ESP32-C6 part, I could have easily swapped the pins around and taken a small penalty on performance. …that’s also not to mention the number of times I get my next board revision and we forgot the fix entirely.
Alternatives / Future
There are so many options available for Microcontrollers and Processors that it deserves an entire section on it’s own. This was simply the easiest choice with known good support in the community. In the future, it might be prudent to use a chip-down (not module) design to reduce cost, although this has it’s own limitations, for example, needing to get full FCC certification yourself. It’s possible a module would still work, but considering the number of IO that would be necessary it likely wouldn’t make sense. If a design relies on Serial interfaces and other chips this could work, but an evaluation should occur for cost and PCB complexity.
U2 - TPS22919DCKR
References
Purpose
This chip is used to switch the 3.3V line so that when the PCB is running on battery power the controller can choose to disable a subset of 3.3V controlled components
Benefits
- 5V max switching
- 1.5A Load Rating
- 90mΩ
- Smoothing power-on and power-off characteristics
- Options to enable quick discharge if desired
- Circuit protection is built into the part (temperature, current)
Downsides
- Higher cost
Justification
This chip is a load switch, which provides switching with improved characteristics in comparison to using standard gates to switch on and off loads/power. Using this chip simplifies the circuit design and provides additional circuit protection over using raw switches. Really I mainly chose to use this out of curiosity as I have seen switches + other protective circuits used primarily in the past.
Alternatives / Future
Use just a switch with additional protection circuit, if it was even necessary. 2N7002 could be an alternative switch to use. It is about ⅒ the cost (0.20 at volume) compared to the TPS chip. At the same time, very few of these are needed, so the marginal savings is low.
U3 - 74AHCT1G125GV
References
Purpose
This chip is used to control the level shift from the 3.3V to the ~5V required for the LED control signals
Benefits
- Simplicity and ease of use, guaranteed performance for a part that is known to function in the application required.
- There isn’t any math that needs to occur to set up the circuit and the signals are actively driven which can give a better switched signal integrity.
- Faster switching speeds possible
Downsides
- Higher cost
Justification
Mostly what is noted above in the benefits, this is another area where I have used switches in previous applications and I was curious of using an alternate solution. Cost for this choice vs individual components is 0.03), which is a decent amount multiplier, but this is also a low volume part.
Alternatives / Future
Alternative to this chip would be using the 2N7002 or BSS138 plus necessary resistors implementing the switching circuit manually. This will also take up marginally more space on the PCB.
RGB LEDs - WS2812B
References
Purpose
RGB LEDs that allow for complex interaction with the user for:
- temperature sensor status
- general status
Benefits
- 1-wire & daisy chain LED control
- RGB LED for full spectrum color & Dimmable brightness
- Small package and decent cost for the value gained
Downsides
- Higher cost (although this is difficult to quantify compared to an individual LED of such lower value…less features, more IO needed)
- Requires 5V power to operate
- Requires baking before use, adds cost to PCB (there don’t seem to be any RGB LED that does not…typically MSL 5+)
Justification
Using a 1-wire LED will reduce the IO that is utilized by the Microcontroller allowing limited IO to go further. Daisy chaining supports this benefit further. There is some cost by needing 5V, but this should be present on HVAC PCB anyway for some sensing circuitry that requires it (pressures). Having an RGB and variable brightness LED also allows for complex expression of information.
Alternatives / Future
It is feasible to use individual LEDs but this severely limits expressiveness and adds a lot of IO needs. Regarding value I feel like you can’t beat an RGB LED. There are a lot of different packages so the only main change I would see here is, which package is optimal for a given design.
Brownie Points
A future design that has molded case + light guides to really utilize these LEDs to their fullest!
Temperature Sensors - DS18B20
References
Purpose
This part is the temperature sensor I have designed for. Any part that uses 3.3V for 1-wire control and utilizes 3.3V or 5V power are supported (although I’m not sure how many there are).
Benefits
- 1-wire, daisy chain control line
- Can be powered parasitically over the Data Line, requiring only 2 wires total (Data/GND) (requires pulling the data directly to VDD during conversion)
- Variable resolution 9-12 bits (adjusting conversion time & accuracy)
- ±0.5°C Accuracy from -10°C to +85°C
- No conversion necessary (Digital)
- No need for calibration
Downsides
- Higher cost compared to a standard thermistor
- Less tried and tested than a standard thermistor
- You cannot measure the temperature sensor directly to determine temperature
- Requires an addressing procedure to set up the sensor correctly
Justification
Similar to the LED, having a 1-wire setup can be advantageous. The limited IO on a MCU is used to better advantage with a 1-wire sensor, you can have many temperature sensors with 1 GPIO used. The accuracy and lack of calibration is also a nice bonus. It does have a higher cost, but I don’t think they would need to be replaced often. One other nice thing is that accuracy is isolated from external conditions. Since the sensing occurs right at the probe tip and digital past that, noise, conversion error is reduced.
Alternatives / Future
Standard NTC thermistor is always an option, this requires 1 Analog circuit per sensor and accuracy might be harder to guarantee. There are some newer Silicon based PTC thermistors that look interesting like the TMP61, or the TMP35. The TMP61 is a resistive component and more accurate, but unlike standard NTC thermistors or traditional PTC thermistors, is linear in it’s operating range. The TMP35 produces a voltage directly, but has lower accuracy than the TMP61.
Passive Components
Switches - TS-1187A-B-A-B
References
Purpose
General use to set up temperature sensors at least, maybe the other one is to set up wireless? There are two switches on the MCU module that adjusts boot and reset.
Honestly, I just picked one of the first suggested parts I found online. There are lots of options for buttons. My only note on alternatives would be to consider appropriate technology for the situation. This is the right choice for a PCB, but different kinds of sensors or capacitive interfaces might be more appropriate for a user interface.
Battery Connector - S2B-PH-SM4-TB(LF)(SN)
Purpose
Battery connection from to the battery circuit in the Xiao Module.
Qwiic Connector - 1.0-4PWT
Purpose
Potential future module testing purposes that uses a I2C qwiic connector. Some options are found here.
Sensor Connectors - WJ15EDGVC-3.81-04P-14-00A / WJ15EDGVC-3.81-03P-14-00A
Purpose
Connectors for the temperature sensors (and LED for the daisy chain version). Mainly I was looking for a connector that was easy to use and “pluggabe”. I used a vertical oriented connector and 3.81mm pitch so that it could be a smaller PCB with tighter fit. The one negative with this choice is the connectors might be harder to access since they are close together.
IO Map
| XIAO Pin | ESP32-C6 Chip Pin | Usage |
|---|---|---|
| 5V | Power Output | |
| GND | ||
| 3V3 | Power Output | |
| D0 | GPIO0 | |
| D1 | GPIO1 | |
| D2 | GPIO2 | |
| D3 | GPIO21 | |
| D4 | GPIO22 | I2C Data (CN12-3, QWIIC) |
| D5 | GPIO23 | I2C Clock (CN12-4, QWIIC) |
| D6 | GPIO16 | GPIO (Switched 3V3 Enable Out) |
| D7 | GPIO17 | GPIO (DS18B20 Data Out) |
| D8 | GPIO19 | GPIO (WS2812 LED Data Out) |
| D9 | GPIO20 | GPIO (SW1 Input) |
| D10 | GPIO18 | GPIO (SW2 Input) |
| MTDO | GPIO7 | |
| MTDI | GPIO5 | |
| MTCK | GPIO6 | |
| MTMS | GPIO4 | |
| EN | CHIP_PU | |
| Boot | GPIO9 | |
| RF Switch Port Select | GPIO14 | Switch onboard antenna and the UFL antenna |
| RF Switch Power | GPIO3 | Power |
| Light | GPIO15 | User Light |
BOM
Total Parts Cost
Total BOM Cost (including MOQ purchase, connectors and cables): $35.10
Cost of the temperature sensors alone in that price is $19.40 but could probably be optimized (these are pre-made) cable harnesses about $2 per sensor + wire harness
Thoughts
BOM Table
CLICK HERE to enter reader mode to view this table
| Mrf# | Mfr. | Order Qty. | Unit Price (USD) | Ext. Price (USD) | Vendor Part# | Package | Min | Mult | Description | Product Link |
|---|---|---|---|---|---|---|---|---|---|---|
| WJ15EDGVC-3.81-03P-14-00A | KANGNEX | 10.0000 | 0.0532 | 0.5300 | C8389 | Through Hole,P=3.81mm | 10 | 10 | 3 Position Board Side/Socket - Closed 3.81mm Pitch Straight Pin | https://www.lcsc.com/product-detail/C8389.html |
| XIAO ESP32-C6 | Seeed Studio | 1.0000 | 5.3800 | 5.3800 | 713-113991254 | SMD Xiao Form Factor | 1 | 1 | Development Boards & Kits - Other Processors Seeed Studio XIAO ESP32-C6 | https://www.mouser.com/ProductDetail/Seeed-Studio/113991254?qs=HFfMDpzxxd2OhdQPSyrl3g%3D%3D |
| TS-1187A-B-A-B | XKB Connection | 20.0000 | 0.0202 | 0.4000 | C318884 | SMD-4P,5.1x5.1mm | 20 | 20 | Tactile Switch SPST 160gf 1.5mm 5.1mm x 5.1mm Surface Mount | https://www.lcsc.com/product-detail/C318884.html |
| WJ15EDGVC-3.81-04P-14-00A | KANGNEX | 10.0000 | 0.0689 | 0.6900 | C8410 | Through Hole,P=3.81mm | 10 | 10 | 4 Position Board Side/Socket - Closed 3.81mm Pitch Straight Pin | https://www.lcsc.com/product-detail/C8410.html |
| TPS22919DCKR | TI | 10.0000 | 0.0977 | 0.9800 | C2149796 | SC-70-6 | 10 | 10 | Load Switch 1 Channel 1.5A SC-70-6 | https://www.lcsc.com/product-detail/C2149796.html |
| FRC0402F1002TS | FOJAN | 100.0000 | 0.0006 | 0.0600 | C2906861 | 0402 | 100 | 100 | 10kΩ ±1% 62.5mW 0402 Thick Film Resistor | https://www.lcsc.com/product-detail/C2906861.html |
| 74AHCT1G125GV | MDD (Microdiode Semiconductor) | 1.0000 | 0.0764 | 0.0800 | C52140417 | SOT-23-5L | 1 | 1 | 4.5V~5.5V 1 1 1ns@4.5V 40uA SOT-23-5L Buffers, Drivers, Receivers, Transceivers RoHS | https://www.lcsc.com/product-detail/C52140417.html |
| DS18B20A10(UMW) | UMW | 8.0000 | 2.4245 | 19.4000 | C2938789 | - | 1 | 1 | Temperature Sensor -55℃~+125℃ 12bit | https://www.lcsc.com/product-detail/C2938789.html |
| S2B-PH-SM4-TB(LF)(SN) | JST | 5.0000 | 0.2119 | 1.0600 | C295747 | SMD,P=2mm,Surface Mount,Right Angle | 5 | 5 | Connector Header 2 position 2mm Pitch 2A Surface Mount, Right Angle -25℃~+85℃ | https://www.lcsc.com/product-detail/C295747.html |
| 1.0-4PWT | FG | 5.0000 | 0.0478 | 0.2400 | C2763614 | SMD,P=1mm,Surface Mount,Right Angle | 5 | 5 | Connector Header 4 position 1mm Pitch Surface Mount, Right Angle -20℃~+85℃ | https://www.lcsc.com/product-detail/C2763614.html |
| WS2812B-V5/W | Worldsemi | 15.0000 | 0.0977 | 1.4700 | C2874885 | SMD5050-4P | 5 | 5 | SMD5050-4P LED Addressable, Specialty RoHS | https://www.lcsc.com/product-detail/C2874885.html |
| TCC0805X7R105M500FT | CCTC | 50.0000 | 0.0082 | 0.4100 | C376929 | 0805 | 50 | 50 | 1uF ±20% 50V Ceramic Capacitor X7R 0805 | https://www.lcsc.com/product-detail/C376929.html |
| WJ15EDGK-3.81-03P-14-00A | KANGNEX | 10 | 0.2607 | 2.61 | C8413 | P=3.81mm | 5 | 5 | 3 Position Male Plug 3.81mm Pitch | https://www.lcsc.com/product-detail/C8413.html |
| DB2EK-3.81-4P-GN-S | DORABO | 5 | 0.3577 | 1.79 | C395699 | P=3.81mm | 5 | 5 | 4 Position Plug 3.81mm Pitch | https://www.lcsc.com/product-detail/C395699.html |
| WJ15EDGK-3.81-03P-14-00A | KANGNEX | 10 | 0.2607 | 2.61 | C8413 | P=3.81mm | 5 | 5 | 3 Position Male Plug 3.81mm Pitch | https://www.lcsc.com/product-detail/C8413.html |
| DB2EK-3.81-4P-GN-S | DORABO | 5 | 0.3577 | 1.79 | C395699 | P=3.81mm | 5 | 5 | 4 Position Plug 3.81mm Pitch | https://www.lcsc.com/product-detail/C395699.html |

