CERN-OHL-S-2.0

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

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

  1. 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
  2. I should have considered shunt resistors in more places. This might cause issues of high load on the microcontroller
  3. My first revisions have the wrong revision number on them
  4. 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

TPS22919DCKR

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

74AHCT1G125GV

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

WS2812B

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

DS18B20

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

TS-1187A-B-A-B

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 PinESP32-C6 Chip PinUsage
5VPower Output
GND
3V3Power Output
D0GPIO0
D1GPIO1
D2GPIO2
D3GPIO21
D4GPIO22I2C Data (CN12-3, QWIIC)
D5GPIO23I2C Clock (CN12-4, QWIIC)
D6GPIO16GPIO (Switched 3V3 Enable Out)
D7GPIO17GPIO (DS18B20 Data Out)
D8GPIO19GPIO (WS2812 LED Data Out)
D9GPIO20GPIO (SW1 Input)
D10GPIO18GPIO (SW2 Input)
MTDOGPIO7
MTDIGPIO5
MTCKGPIO6
MTMSGPIO4
ENCHIP_PU
BootGPIO9
RF Switch Port SelectGPIO14Switch onboard antenna
and the UFL antenna
RF Switch PowerGPIO3Power
LightGPIO15User 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

todo

BOM Table

CLICK HERE to enter reader mode to view this table

Mrf#Mfr.Order Qty.Unit Price (USD)Ext. Price (USD)Vendor Part#PackageMinMultDescriptionProduct Link
WJ15EDGVC-3.81-03P-14-00AKANGNEX10.00000.05320.5300C8389Through Hole,P=3.81mm10103 Position Board Side/Socket - Closed 3.81mm Pitch Straight Pinhttps://www.lcsc.com/product-detail/C8389.html
XIAO ESP32-C6Seeed Studio1.00005.38005.3800713-113991254SMD Xiao Form Factor11Development Boards & Kits - Other Processors Seeed Studio XIAO ESP32-C6https://www.mouser.com/ProductDetail/Seeed-Studio/113991254?qs=HFfMDpzxxd2OhdQPSyrl3g%3D%3D
TS-1187A-B-A-BXKB Connection20.00000.02020.4000C318884SMD-4P,5.1x5.1mm2020Tactile Switch SPST 160gf 1.5mm 5.1mm x 5.1mm Surface Mounthttps://www.lcsc.com/product-detail/C318884.html
WJ15EDGVC-3.81-04P-14-00AKANGNEX10.00000.06890.6900C8410Through Hole,P=3.81mm10104 Position Board Side/Socket - Closed 3.81mm Pitch Straight Pinhttps://www.lcsc.com/product-detail/C8410.html
TPS22919DCKRTI10.00000.09770.9800C2149796SC-70-61010Load Switch 1 Channel 1.5A SC-70-6https://www.lcsc.com/product-detail/C2149796.html
FRC0402F1002TSFOJAN100.00000.00060.0600C2906861040210010010kΩ ±1% 62.5mW 0402 Thick Film Resistorhttps://www.lcsc.com/product-detail/C2906861.html
74AHCT1G125GVMDD (Microdiode Semiconductor)1.00000.07640.0800C52140417SOT-23-5L114.5V~5.5V 1 1 1ns@4.5V 40uA SOT-23-5L Buffers, Drivers, Receivers, Transceivers RoHShttps://www.lcsc.com/product-detail/C52140417.html
DS18B20A10(UMW)UMW8.00002.424519.4000C2938789-11Temperature Sensor -55℃~+125℃ 12bithttps://www.lcsc.com/product-detail/C2938789.html
S2B-PH-SM4-TB(LF)(SN)JST5.00000.21191.0600C295747SMD,P=2mm,Surface Mount,Right Angle55Connector Header 2 position 2mm Pitch 2A Surface Mount, Right Angle -25℃~+85℃https://www.lcsc.com/product-detail/C295747.html
1.0-4PWTFG5.00000.04780.2400C2763614SMD,P=1mm,Surface Mount,Right Angle55Connector Header 4 position 1mm Pitch Surface Mount, Right Angle -20℃~+85℃https://www.lcsc.com/product-detail/C2763614.html
WS2812B-V5/WWorldsemi15.00000.09771.4700C2874885SMD5050-4P55SMD5050-4P LED Addressable, Specialty RoHShttps://www.lcsc.com/product-detail/C2874885.html
TCC0805X7R105M500FTCCTC50.00000.00820.4100C376929080550501uF ±20% 50V Ceramic Capacitor X7R 0805https://www.lcsc.com/product-detail/C376929.html
WJ15EDGK-3.81-03P-14-00AKANGNEX100.26072.61C8413P=3.81mm553 Position Male Plug 3.81mm Pitchhttps://www.lcsc.com/product-detail/C8413.html
DB2EK-3.81-4P-GN-SDORABO50.35771.79C395699P=3.81mm554 Position Plug 3.81mm Pitchhttps://www.lcsc.com/product-detail/C395699.html
WJ15EDGK-3.81-03P-14-00AKANGNEX100.26072.61C8413P=3.81mm553 Position Male Plug 3.81mm Pitchhttps://www.lcsc.com/product-detail/C8413.html
DB2EK-3.81-4P-GN-SDORABO50.35771.79C395699P=3.81mm554 Position Plug 3.81mm Pitchhttps://www.lcsc.com/product-detail/C395699.html