Mini USB WiFi thermometer with ESP32

This is the project page for the Mini USB WiFi thermometer with ESP32. The idea is to create a thermometer whose data is sent to the cloud, to a service like Adafruit.io or ThingSpeak. There will not be a display or anything, just a single LED which is onboard of the choosen controller, a Xiao ESP32-C6.

What I want with this project is a way of having real world temperature (and maybe humidity) data sent to the cloud for me to use. This of course demands two things: a chip capable of doing WiFi (which the Xiao ESP32-C6 is) and a home WiFi router, which I have a home.

The Xiao ESP32-C6 chip
The Xiao ESP32-C6 chip

Form-factor

My original idea is to have a product small enough (and low power enough) that it can be connected to a USB charger. I don’t want the USB connecting to be functional, just the power pins to power the circuit. Programming the ESP32-C6 is done via its own onboard USB-C connector.

You can see the schematic, PCB and 3D view below. The sensor is to be a HTU21D, a temperature and humidity i2c sensor.

thermometer schematic
Mini thermometer schematic
minimalist usb thermometer
Mini thermometer PCB layout
mini thermometer 3d view
Mini thermometer 3d view

Components

USB-A connector will be the male SMD version, just because this is easy to source locally for me (in Brazil). Controller IC will be the SeeedStudio Xiao ESP32-C6, which is a WiFi one. This could also be the -C3 version from the same manufacturer.

The sensor choice was an easy one, there are a bunch of option of ICs whose communication is over i2c and work at 3.3V. I could choose between (for example) BMP280, AHT10, SHT21, LM75 or HTU21D.

I end up going with the HTU21D because (again) it is easy to source locally here in Brazil. Of course I could just buy any of the options from Aliexpress.

Software/firmware

This section is largely under construction, since I have not yet started coding anything. My initial plan is to implement a WiFi connection and send temperature and humidity data over to services like Adafrui.io or Thingspeak (to name a couple). I have done something similar here.

Prototype

I have (as of 09/03/2024) sent the PCB files for manufacturing, and am waiting for them to arrive (it takes any time between 30 and 60 days to arrive for me in Brazil). As stated above I have not started coding yet, will do as soon as I have the components in hand. Talking about components, I do own a couple of Xiao ESP32-C6 but do not have any HTU21D. Will buy some as soon as the PCBs are arriving.