Minimal Pi Pico 2 Humidity Sensor Design


Add the minimum required components needed for this Pi Pico 2 to function properly. Keep the design as simple and minimal as possible.
You may include a single humidity sensor as the primary peripheral, along with any essential supporting components such as power regulation, pull-up resistors, decoupling capacitors, or required connectors.
I’ll build a minimal Pico 2 shield schematic: inspect the template pins, choose a simple humidity sensor, add only required power/I2C support parts, wire everything, then run checks and fix any schematic issues.
I selected the Sensirion SHTC3 because it runs directly from the Pico 2’s 3.3 V rail and only needs I2C pull-ups plus one 100 nF bypass capacitor, so no extra regulator is required.
Done — I added the minimal SHTC3 humidity/temperature sensor circuit with only R1/R2 10kΩ I2C pull-ups and C1 100nF decoupling, wired to Pico 2 GPIO4/GPIO5 and 3V3/GND. ERC now returns no unresolved categories.
I also created:
Next step is PCB layout placement; I’ll wait for your confirmation before moving into layout.
Start PCB layout
Place sensor near edge
Keep shield compact
Check BOM cost
Add test points

Waiting for input


Firmware Starter — Raspberry Pi Pico 2 + SHTC3
Platform & Toolchain
  • MCU: Raspberry Pi Pico 2 / RP2350 module
  • Framework: Arduino-Pico core for RP2350
  • Build system: PlatformIO
  • Sensor: Sensirion SHTC3, I2C address 0x70
Pin Mapping

Table


FunctionPico 2 PinNetConnected ToNotes
I2C0 SDAGPIO4I2C0_SDAU2:SDA, R1 10kΩ pull-upArduino Wire SDA
I2C0 SCLGPIO5I2C0_SCLU2:SCL, R2 10kΩ pull-upArduino Wire SCL
3.3 V3V33V3U2:VDD, C1, pull-upsSensor power
GroundGND/AGNDGNDU2:VSS, U2:EPAD, C1Common return
PlatformIO Setup
Create platformio.ini:

Ini


[env:pico2]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipico2
framework = arduino
board_build.core = earlephilhower
monitor_speed = 115200
lib_deps =
    sensirion/Sensirion I2C SHTC3@^1.0.0
If your PlatformIO installation already includes official Pico 2 support, you may use the standard raspberrypi platform instead of the Git URL above.
Complete Firmware Source
Create src/main.cpp:

Cpp


#include <Arduino.h>
#include <Wire.h>
#include <SensirionI2CShtc3.h>

// Schematic pin mapping
static constexpr uint8_t PIN_I2C0_SDA = 4;  // U1 GPIO4 -> U2 SDA
static constexpr uint8_t PIN_I2C0_SCL = 5;  // U1 GPIO5 -> U2 SCL

static constexpr uint32_t I2C_CLOCK_HZ = 400000;     // SHTC3 supports up to 1 MHz
static constexpr uint32_t SAMPLE_INTERVAL_MS = 2000; // Humidity response is not instantaneous

SensirionI2CShtc3 shtc3;
unsigned long lastSampleMs = 0;

static void printShtc3Error(uint16_t error) {
    if (error == 0) {
        return;
    }
    Serial.print("SHTC3 error: 0x");
    Serial.println(error, HEX);
}

static bool initShtc3() {
    Wire.setSDA(PIN_I2C0_SDA);
    Wire.setSCL(PIN_I2C0_SCL);
    Wire.begin();
    Wire.setClock(I2C_CLOCK_HZ);

    shtc3.begin(Wire);

    uint32_t serialNumber = 0;
    uint16_t error = shtc3.wakeUp();
    if (error) {
        printShtc3Error(error);
        return false;
    }

    error = shtc3.serialNumber(serialNumber);
    if (error) {
        printShtc3Error(error);
        return false;
    }

    Serial.print("SHTC3 serial: ");
    Serial.println(serialNumber);

    // Sleep between measurements for low power and datasheet-recommended operation.
    error = shtc3.sleep();
    if (error) {
        printShtc3Error(error);
        return false;
    }

    return true;
}

static bool readShtc3(float& temperatureC, float& relativeHumidity) {
    uint16_t error = shtc3.wakeUp();
    if (error) {
        printShtc3Error(error);
        return false;
    }

    // Normal precision, clock stretching disabled for broad controller compatibility.
    error = shtc3.measurePowerMode(SHTC3_CMD_CSE_RHF_NPM, temperatureC, relativeHumidity);
    if (error) {
        printShtc3Error(error);
        (void)shtc3.sleep();
        return false;
    }

    error = shtc3.sleep();
    if (error) {
        printShtc3Error(error);
        return false;
    }

    return true;
}

void setup() {
    Serial.begin(115200);
    delay(2000);

    Serial.println("Pico 2 SHTC3 humidity shield starting...");
    if (!initShtc3()) {
        Serial.println("SHTC3 init failed. Check 3V3, GND, SDA=GPIO4, SCL=GPIO5, and pull-ups.");
    } else {
        Serial.println("SHTC3 init OK.");
    }
}

void loop() {
    const unsigned long now = millis();
    if (now - lastSampleMs < SAMPLE_INTERVAL_MS) {
        return;
    }
    lastSampleMs = now;

    float temperatureC = NAN;
    float relativeHumidity = NAN;
    if (readShtc3(temperatureC, relativeHumidity)) {
        Serial.print("Temperature: ");
        Serial.print(temperatureC, 2);
        Serial.print(" C, Humidity: ");
        Serial.print(relativeHumidity, 2);
        Serial.println(" %RH");
    } else {
        Serial.println("SHTC3 read failed; retrying on next interval.");
    }
}
Build & Flash

Bash


pio run
pio run -t upload
pio device monitor -b 115200
Bring-Up Checklist
  1. Power the Pico 2 normally via its onboard USB connector.
  2. Open the serial monitor at 115200 baud.
  3. Confirm the firmware prints the SHTC3 serial number.
  4. Confirm temperature and humidity update every 2 seconds.
  5. If initialization fails, verify 3V3, GND, GPIO4/SDA, GPIO5/SCL, R1/R2 10kΩ pull-ups, and C1 100nF decoupling.
  • Platform & Toolchain

  • Pin Mapping

  • PlatformIO Setup

  • Complete Firmware Source

  • Build & Flash

  • Bring-Up Checklist