Temperature and Humidity Sensor Node Design

0:03

Work done
  • Built the USB-C powered ESP32-C3 temperature/RH sensor node schematic with USB-C CC pull-downs, TPS259530 protection, TLV75533 3.3 V regulation, SHTC3 I2C sensor, decoupling, reset/boot circuitry, UART header, and GPIO2 boot strap pull-up.
  • Cleaned ERC warnings by wiring R10 and marking unused ESP32-C3 GPIOs intentional no-connects.
  • Set the PCB to a 50 mm × 50 mm rounded 4-layer board and placed all components with USB-C at the edge, ESP32 antenna at the top edge, sensor away from heat, and header accessible on the right.
  • Updated Design Notes and created Firmware Starter — ESP32-C3-MINI-1-N4.
Success criteria review
  • ✅ Required schematic components and power protection are present.
  • ✅ Electrical support parts are included: CC resistors, I2C pull-ups, 100 nF decoupling, EN RC reset, BOOT controls, and programming header.
  • ✅ ERC is clean for the checked schematic issues; footprints, invalid layers, and overlapping copper checks pass.
  • ✅ Preliminary PCB layout planning is complete with board outline, stackup, and RF-aware placement.
  • ⚠️ Routing is not complete yet: the board still has 43 airwire reports because traces have not been routed.
Next steps
  • Route the PCB next, then re-run DRC/airwire checks and prepare manufacturing exports if desired.
Route remaining airwires
Full design review
Prepare manufacturing exports
Verify antenna keepout
2 days

Refine this doc
Ask about this doc
Firmware Starter — ESP32-C3-MINI-1-N4
Platform & Toolchain
  • MCU module: ESP32-C3-MINI-1-N4
  • Framework: Arduino on PlatformIO
  • Sensor: Sensirion SHTC3 on I2C
  • Debug/programming: UART0 via J2 plus BOOT and RESET buttons

Pin Mapping


FunctionESP32-C3 PinSchematic NetConnected ToDirectionNotes
I2C SDAGPIO4 / IO4I2C_SDAU4 SDA, R3 4.7k pull-upBidir3.3 V bus
I2C SCLGPIO5 / IO5I2C_SCLU4 SCL, R4 4.7k pull-upOutput/Bidir3.3 V bus
BOOT strapGPIO9 / IO9ESP_BOOT_GPIO9R6 10k pull-up, SW2 to GND, J2 pin 6InputHold low during reset for bootloader
Boot robustness strapGPIO2 / IO2ESP_GPIO2_STRAPR10 10k pull-upInputPull-up for reliable normal boot
Reset / enableENESP_ENR5 10k pull-up, C7 1µF to GND, SW1 to GND, J2 pin 5InputActive low reset/enable
UART TXTXD0UART0_TXJ2 pin 3OutputDebug/programming serial
UART RXRXD0UART0_RXJ2 pin 4InputDebug/programming serial
3.3 V3V33V3U2 output railPowerRegulated rail
GroundGND pinsGNDSystem groundPowerCommon reference
Dependencies & Project Setup
Create platformio.ini:

Ini


[env:esp32-c3-mini-shtc3]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
upload_speed = 460800
lib_deps =
    adafruit/Adafruit SHTC3 Library@^1.0.1
    adafruit/Adafruit Unified Sensor@^1.1.14
Complete Firmware Source
Create src/main.cpp:

Cpp


#include 
#include 
#include 
#include 

// Schematic-grounded pin assignments
#define I2C_SDA_PIN 4
#define I2C_SCL_PIN 5
#define BOOT_PIN    9
#define GPIO2_STRAP_PIN 2

// User configuration
const char* WIFI_SSID = "YOUR_SSID";
const char* WIFI_PASSWORD = "YOUR_PASSWORD";

static constexpr uint32_t SERIAL_BAUD = 115200;
static constexpr uint32_t SENSOR_INTERVAL_MS = 5000;

Adafruit_SHTC3 shtc3 = Adafruit_SHTC3();
unsigned long lastSensorReadMs = 0;

void initWiFi() {
  WiFi.mode(WIFI_STA);
  WiFi.setSleep(true);  // Lower average current between radio activity bursts.

  if (strlen(WIFI_SSID) == 0 || strcmp(WIFI_SSID, "YOUR_SSID") == 0) {
    Serial.println("WiFi credentials not configured; continuing offline.");
    return;
  }

  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("Connecting to WiFi");

  for (int i = 0; i = SENSOR_INTERVAL_MS) {
    lastSensorReadMs = now;

    float temperatureC = NAN;
    float humidityPercent = NAN;
    if (readShtc3(temperatureC, humidityPercent)) {
      publishReading(temperatureC, humidityPercent);
    } else {
      Serial.println("ERROR: SHTC3 read failed.");
    }
  }

  delay(10);
}
Build & Flash Instructions

Bash


pio run
pio run -t upload
pio device monitor -b 115200
To force the ROM bootloader using the schematic hardware: hold BOOT/SW2 low, tap RESET/SW1, release RESET, then release BOOT after upload starts.
Bring-up Notes
  • Confirm 3.3 V is present before plugging in a UART adapter.
  • Use a 3.3 V UART adapter only; do not connect 5 V logic to J2 UART pins.
  • If sensor reads fail, verify the I2C pull-ups R3/R4 are fitted and inspect SDA/SCL continuity to U4.
  • Replace the Wi-Fi credential placeholders before testing network features.

    Platform & Toolchain

    Pin Mapping

    Dependencies & Project Setup

    Complete Firmware Source

    Build & Flash Instructions

    Bring-up Notes

Documents

    Design Notes

    Firmware Starter — ESP32-C3-MINI-1-N4

Assets

No assets added.

USB-C ESP32 Environmental Sensor

USB-C ESP32 Environmental Sensor thumbnail
Low-power USB-C environmental sensor node using an ESP32-C3 Wi‑Fi/BLE module, Sensirion SHTC3 I2C temperature/RH sensor, USB-C 5 V sink input, TPS259530 eFuse protection, and 3.3 V LDO regulation.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$1.78–$2.01

Digi-Key

$3.18–$3.29

LCSC

$4.28–$4.30

Mouser

$2.42

TME

$3.53

Verical

$2.63–$2.88

Controls