Search models, users, collections, and posts

ESP32-C3 Wall Plug Temp & Humidity Sensor(SHT31-D)

Print Profile(1)

All
P1S
H2D
X1 Carbon
X1
H2D Pro
P1P
A1 mini
A2L
X1E
H2S
P2S
X2D
A1
H2C

0.16mm layer, 2 walls, 15% infill
0.16mm layer, 2 walls, 15% infill
Designer
2 h
1 plate

Open in Bambu Studio
Boost
2
0
0
1
0
0
Released 

Description

ESP32-C3 Wall Plug Temperature & Humidity Sensor (SHT31-D)

A compact, wall-outlet-mounted WiFi temperature and humidity sensor that looks like a clean white power adapter. An ESP32-C3 Super Mini and an SHT31-D sensor live inside a snap-together enclosure that slides over a standard USB wall charger — no cables, no batteries, no wall warts dangling off a USB cord. Plug it in and forget it.

I run several of these around the house and shop, feeding InfluxDB and Grafana dashboards. Firmware is included (link below) with sensor auto-detect, InfluxDB v2 reporting, and HTTP OTA updates so you never have to unplug them to reflash.

Features

  • Fully self-contained — the enclosure slips over a compact 5V/2.4A USB charger and encloses the ESP32-C3 + SHT31-D. Powered directly from the outlet.
  • Ventilated for accurate readings — slotted vents top and side keep the SHT31-D exposed to ambient air and let charger heat rise out the top, away from the sensor.
  • Two-piece design — body + lid, secured with two small self-tapping screws. Lid cutout clears the charger's prongs/label plate.
  • Mains stays enclosed — the 120/240V side never leaves the charger's own factory housing. Everything you touch is 5V.
  • OTA-updatable firmware — flash once over USB, update over WiFi forever after.

Bill of Materials

Note on the USB adapter: cut the adapter PCB right at the USB-A connector, then solder power and ground wires directly to the USB pins (5V and GND). This gives you a low-profile plug that mates with the charger's USB-A port inside the enclosure.

Wiring

 

USB-A plug 5V  → ESP32-C3 "5V" pin USB-A plug GND → ESP32-C3 GND SHT31 VIN → ESP32-C3 3.3V SHT31 GND → ESP32-C3 GND SHT31 SDA → GPIO6 SHT31 SCL → GPIO7

Firmware

Full ESP-IDF firmware (PlatformIO project) here: https://github.com/feetball/ESP32-C3-SHT31-D-TempAndHumidity

  • Auto-detects an SHT31-D on I2C at boot (falls back to DHT22 on GPIO3 if you'd rather use one)
  • Posts temperature, humidity, IP, RSSI, and firmware version to InfluxDB v2 every 30 seconds
  • HTTP OTA updates from a simple file server — bump the version, run the publish script, and every deployed sensor updates itself within ~30 seconds
  • Set your WiFi credentials, InfluxDB endpoint/token, and device name, then flash once over USB

Pairs perfectly with Grafana for multi-room dashboards.

Assembly

  1. Print the body and lid (no supports needed).
  2. Prep the USB-A adapter: cut the PCB at the connector, solder 5V and GND leads to the USB pins.
  3. Wire the SHT31-D to the ESP32-C3 per the table above.
  4. Flash the firmware over USB and confirm it's reporting before final assembly.
  5. Plug the USB-A adapter into the charger, seat the charger in the body, and tuck the C3 + SHT31 into the upper compartment near the vents.
  6. Fit the lid over the charger's prong plate and secure with the two screws.
  7. Plug it into an outlet — done.

Print Settings

  • Material: PLA or PETG (PETG recommended if the outlet runs warm)
  • Layer height: 0.2mm
  • Walls: 3
  • Infill: 15–20%
  • Supports: none
  • Both parts print flat on their open faces

Safety

The mains voltage side is entirely contained within the USB charger's original UL-listed housing — this enclosure only ever carries 5V DC. Don't modify the charger itself, and use a charger with the listed dimensions or verify fit before committing.

Comment & Rating (0)

(0/1000)