CERN-OHL-S-2.0|226

AI Use Disclaimer

  • I have used AI throughout the design process
  • Usage went something like this:
    1. I want to design a PCB to do whole HVAC performance analysis
    2. Refine parts selection for that based on availability, practicality and personal goals
    3. Personally realize two PCB design made more sense
    4. Continue down path with that new understanding and focusing on re-use
  • Takeaways:
    • AI does sometimes hallucinate
    • AI does not have accurate pricing/availability in many cases (stale data? data accessibility?)
    • It’s nearly impossible to keep my mental model in sync with AI so drifts occur where the model was misaligned…this was frequent and I usually just ask guiding questions until things get too far off track
    • I tried to use AI as a fast research tool, that I then followed up with web searches to back up the models suggestions, fill-in my understand, or correct it where necessary
  • How much is straight up AI?
    • Sensor selection 50%
      • Useful, but sometimes misguided, highly tailored based on availability and practicality
    • Chip selection 75%
      • Good starting point, sometimes I find my own parts after I understand the HW purpose behind the chip inclusion
    • System Design 10%
      • Most of the system design came from me or my guidance based on the things I knew I want measured

Alpha Revision

This is an alpha revision design, please take this into account when reviewing or using this product.

Overview

The goal of this PCB is to prototype some of the most common sensor types, power generation, communication protocols and non-secondary MCU module, either first party module or chip-down.

System Diagram

Circuit Design

Subsystems:

  • Microcontroller
  • Power
  • Current Measurement
  • Phase Detection
  • Temperature Sensing
  • Pressure Sensing
  • 24VAC Presence Detection
  • Humidity & Temperature Sensing
  • Wireless Interfaces
  • Wired Interfaces

Microcontroller

  • Use ESP32-S3
    • I have changed from the ESP32-C3 due to IO needs
  • Integrated Wi-Fi
  • Integrated BLE
  • Large RAM and ROM
  • Good IO compliment and versatile IO Mux System

Power

  • Utilize 24VAC input from the present system this is installed in
  • Convert to 12VDC and 5VDC using Buck Converters
    • …Since this board is no longer being used for control and will now be used only for sensing, I’m not sure 12VDC is needed, I might drop this?
  • Convert to 3.3VDC using and LDO

Current Measurement

  • Target using a Current Transformer (CT) via TRS connector
  • Leaning towards current output, requiring a burden resistor on PCB
  • …This was my original thinking, however, I have since realized that with the varieties of ways a unit can be powered this might be very finicky to set up, yet is critical for the COP calculation
    • Move towards using a Modbus based Power Analyzer
    • This allows to adapt to the need of the customer
    • It requires a little more setup and know-how, but will probably achieve better results for comparable cost

Phase Detection

  • Rely on 24VAC presence detection
  • Pass the Current Transformer signal to the same circuit
  • Compare the delta time between signals, which will indicate phase shift for power analysis
    • …this is no longer needed if we are using a 3rd party power analyzer

Temperature Sensing

  • Most commonly people use a 10KOhm NTC Thermistor
  • There are some PTC sensors out there that have better linearity, but they are uncommon
  • Relying on DS18B20 saves IO, improves accuracy, reduces circuit complexity, although it adds sensor cost

Pressure Sensing

  • Design for a 5V ratiometric pressure sensor

24VAC Presence Detection

  • Opto-isolator with load resistor for 24VAC detection

Humidity and Temperature Sensing

  • Rely on I2C sensors as they are common

Wireless Interfaces

  • Wi-Fi is built into the ESP32 chip
  • BLE is built into the ESP32 chip
  • Add 915MHz LoRA chip onboard
  • Add NFC Chip / Antenna onboard
    • I might not do this as it adds a lot complexity to the PCB design and BLE is nearly as good/can do proximity based stuff. Maybe a later revision?

Wired Interfaces

  • RS-485 chip interface
    • Modbus
    • BACnet
  • USB Port

Interface Assignment

DNPIO / InterfaceIndoor FunctionOutdoor FunctionNotes
DNPADS1115[0]Return Plenum Static PressureSuction Pressure
ADS1115[1]Supply Plenum Static PressureDischarge Pressure
ADS1115[2]Heating Liquid PressureLiquid Pressure
ADS1115[3]Hydronic Pressure
I2C0[0x48]ADS1115ADS1115
I2C0[0x44]SHT85/SHT40 - Return T/RHSHT85 - OAT T/RHShared address?
Consider power enable?
I2C1[0x44]SHT85/SHT40 - Supply T/RHN/ASearch google for “Probe”
I2C1[0x76]ATM Barometric Pressure
DNPI2C1[0x55] / GPIO[FD] / GPIO[RST]NFC NTAG I2C+
(NT3H2111W0FT1X)
NFC NTAG I2C+
(NT3H2111W0FT1X)
LED on FD
GPIO[TS_DATA]DS18B20DS18B20
DS18B20[0]Evap Surface TempSuction
DS18B20[1]Backup Return TempDischarge
DS18B20[2]Backup Supply TempLiquid Line
SPI / GPIO[RXEN] / GPIO[BUSY] / GPIO[TXEN] / GPIO[RST]915MHz Radio
(RA-01SH)
915MHz Radio
(RA-01SH)
LED on BUSY
USB[DP] / USB[DM] / VBUS (optional)USBUSBConsider a 5V bypass to power board from USB
LED on VBUS
GPIO[LED_DATA]WS2812 LEDsWS2812 LEDs
WS2812[00]Status LEDStatus LED
WS2812[01]WiFi LEDWiFi LED
WS2812[02]BLE LEDBLE LED
WS2812[03]LoRA LEDLoRA LED
WS2812[04]NFC LEDNFC LED
WS2812[05]Indoor Current LEDOutdoor Current LED
WS2812[06]Return Pressure LEDSuction Pressure LED
WS2812[07]Supply Pressure LEDDischarge Pressure LED
WS2812[08]ATM Pressure LEDLiquid Pressure LED
WS2812[09]Evap Surface Temp LEDSuction LED
WS2812[10]Backup Return Temp LEDDischarge LED
WS2812[11]Backup Supply Temp LEDLiquid Line LED
WS2812[12]T/RH ReturnT/RH OAT
WS2812[13]T/RH SupplyN/A
DNPSPIFlashFlashESP32 has enough flash?
UART1 (RS-485_OUT) / GPIO[RS485_OUT_DE]Power - UnitPower - UnitModbus
UART1 (RS-485_OUT) / GPIO[RS485_OUT_DE]Power - FanPower - CompressorModbus
UART1 (RS-485_OUT) / GPIO[RS485_OUT_DE]Power - FanModbus
UART0 (RS-485_IN) / GPIO[RS485_IN_DE]Modbus InBACnet / Modbus In
GPIO[Button]Multi-use Button
GPIO[Y1]TSTAT_Y1
GPIO[Y2]
GPIO[W1]
GPIO[W2]
GPIO[G]
GPIO[O/B]
GPIO[AUX]

MCU Utilization

Option 1: I2C Shared

TypeCountUsage
GPIO15RST, BUSY, TX_EN, RX_EN, LED_DATA, TS_DATA, RS485_IN_DE, RS485_OUT_DE, Button, Y1, Y2, W1, W2, G, O/B, AUX, RS485_IN_DE
SPI1LoRA / External
I2C21: SHT40, ADS1115; 2: SHT40, Headers
USB1USB Debug / Programming
UART2Modbus In (BACnet?), Modbus Out

Interface Cost Breakdown

Indoor

InterfaceExpensive
Components
ConnectorSensorOther
RH/T Return$0.05$4
RH/T Supply$0.05$4
Evap Surface Temp$0.50$2.50
Heating Liquid Temp$0.50$2.50
Supply Pressure$0.50[50?)
Return Pressure$0.50[50?)
Heating Liquid Pressure$0.50$50
Spare Pressure
Barometric Pressure$3.30
ESP32-S3-WROOM-1U$5.66
LoRA$10$15
Breakout Connector$0.50
Power Circuit~$15
ADS1115$5.30
Power Analyzer$20x2
Wiring$10
PCB$5

Really rough estimate for indoor board is ~

Outdoor

InterfaceExpensive
Components
ConnectorSensorOther
RH/T OAT$0.05$4
Discharge Temp$0.50$2.50
Suction Temp$0.50$2.50
Liquid Temp$0.50$2.50
Hydronic Inlet Temp$0.50$2.50
Hydronic Outlet Temp$0.50$2.50
Discharge Pressure$0.50$50
Suction Pressure$0.50$50
Liquid Pressure$0.50$50
Hydronic Pressure$0.50$50
Placeholder
Barometric Pressure$3.30
ESP32-S3-WROOM-1U$5.66
LoRA$10$15
Breakout Connector$0.50
Power Circuit~$15
ADS1115$5.30
Power Analyzer$20x2
Wiring$10
PCB$5

ESP32-S3 Pin Assignment

ESP32-C3-MINI-1(U) Datasheet ESP32-C6-WROOM Datasheet ESP32-S3-WROOM Datasheet

NameNo.EdgeTypeFunctionInterface
GND1LPowerGround
3V32LPowerSupply
EN3LEnableENABLEButton
IO44LI/OI2C0_SDASHT40 bus 0
IO55LI/OI2C0_SCLSHT40 bus 0
IO66LI/OI2C1_SDASHT40 bus 1
IO77LOutputLORA_RSTLoRa
IO158LInputLORA_BUSYLoRa
IO169LOutputLORA_TXENLoRa
IO1710LOutputLORA_RXENLoRa
IO1811LI/OI2C1_SCLSHT40 bus 1
IO812LOutputLED_DATAWS2812s
IO1913LI/OUSB_DMUSB
IO2014LI/OUSB_DPUSB
IO315BI/OBREAKOUT0
IO4616BI/OBREAKOUT1
IO917BOutputTS_DATADS18B20s
IO1018BOutputLORA_CSLoRa
IO1119BInputFSPIQLoRa / Breakout
IO1220BOutputFSPICLKLoRa / Breakout
IO1321BOutputFSPIDLoRa / Breakout
IO1422BOutputBRK_CSBreakout
IO2123BOutputRS485_TXModbus
IO4724BI/OBREAKOUT2
IO4825BInputRS485_RXModbus
IO4526BI/OBREAKOUT3
IO027RInputBOOTButton
IO3528ROutputRS485_DEModbus
IO3629RInputBUTTONButton
IO3730RInputTSTAT_Y1Thermostat
IO3831RInputTSTAT_Y2Thermostat
IO3932RInputTSTAT_W1Thermostat
IO4033RInputTSTAT_W2Thermostat
IO4134RInputTSTAT_GThermostat
IO4235RInputTSTAT_OBThermostat
RXD036RInputRS485_IN_RXOptional Log
TXD037ROutputRS485_IN_TXOptional Log
IO238ROutputRS485_IN_DE
IO139RInputTSTAT_AUX1Thermostat
GND40RPowerGround
EPAD41REPADEPAD

External Header

PinFunctionFunctionPin
012V12V1
2PGNDPGND3
45VBREAKOUT05
63V3BREAKOUT17
8GNDBREAKOUT29
10FSPIQBREAKOUT311
12FSPICLKBREAKOUT413
14FSPIDBRK_CS15

Power Analyzers

PZEM-016 SDM120-D