r/arduino Open Source Hero 7d ago

Open Source Compact Wi-Fi Temp/Humidity Sensor (ESP32-C3 Pro Mini + HTU21D) with WebSerial Browser Installer and Friction-Fit Case

Dear fellow tinkerers,

Just wanted to share a weekend project that, over a number of weeks, turned into a polished little device. I wanted a fleet of cheap, reliable temperature and humidity sensors around the house, so I designed this sensor using an ESP32-C3 Super Mini and an HTU21D module, written using the Arduino ESP32 core.

Quick Specs & Highlights:

  • The Code: Built on the Arduino framework for ESP32, leveraging libraries for seamless I2C communication and Wi-Fi stability.
  • Hardware: ESP32-C3 Super Mini + HTU21D. Total cost per unit from AliExpress is under $10.
  • Assembly: Dead simple. Just 4 wires (VCC, GND, SDA, SCL) directly bridged between the boards.
  • Case: Custom 3D-printed friction-fit enclosure (no screws or brass inserts required). I tested it with high speed PLA (Bambu Lab PLA basic) and Sunlu PETG
  • Flashing: To save people from installing toolchains, I set up a GitHub web installer. You can flash the precompiled Arduino firmware directly from your browser over WebSerial. It includes a captive portal to configure Wi-Fi, Home Assistant, and ThingSpeak.
  • Calibration: It allows you to calibrate temperature and humidity, and also set the level of data smoothing to get nice charts.
  • BOM & Hardware Notes
    • Microcontroller: ESP32-C3 Pro Mini (~$4-$5 on AliExpress)
    • Sensor: HTU21D I2C Module (~$3-$4 on AliExpress)
    • Note on the sensor: When ordering from other AliExpress vendors, just double-check user reviews to ensure people are receiving true HTU21D chips rather than mislabeled clones!

The project is entirely open-source. You can find the source code and web flasher on my GitHub account, and the 5-minute full build video on my YouTube channel (links in my bio).

 

Any feedback regarding your experience building it, highly appreciated.

132 Upvotes

15 comments sorted by

View all comments

Show parent comments

9

u/LeanMCU Open Source Hero 7d ago

Compared to commercial sensors, my sensor allows you to keep data local (Home Assistant), print enclosure in any color you want, and have the source code to modify it any way you like ;-)

-1

u/RadioSubstantial8442 7d ago

Just reflash a tuya sensor they are 2 bucks, same benefits

5

u/LeanMCU Open Source Hero 7d ago

Not exactly the same benefits, but sure, that's an option if you prefer hacking versus building, learning and customizing.

1

u/RadioSubstantial8442 7d ago

Yeah I get that. And I understand you are proud of what you have build. But battling against cheap Chinese products is impossible

5

u/sheffy55 6d ago

Fortunately the goal (I assume I guess) isn't to compete with cheap Chinese electronics

3

u/LeanMCU Open Source Hero 5d ago

Yes, I also thought we are here on a makers' forum, where people like to learn, build and share. Based on the reactions to my post, I start to believe I got it all wrong. Seems we shouldn't build anything anymore, because we can't compete with mass produced goods. My bad, I apologize for confusion. Probably Arduino (we are on r/arduino) is a finished mass produced good and I didn't even understand that in my many years of using it

2

u/sheffy55 5d ago

Personally I'm greatly considering building what you built with things I have laying around

2

u/LeanMCU Open Source Hero 5d ago

I would be glad to help if needed, and also get your feedback to make it better