Introduction: ESP32-C3 Tiny Network Weather Station
A mini board based on the ESP32C3 controller has been released. It features a 0.42" OLED display with a resolution of 72x40 pixels. If you connect a TZT AHT20+BMP280 sensor module to it, you can easily create a network weather station or a device for measuring temperature, humidity, and pressure in a room, such as a server room.
Thanks to the WiFi interface, this module creates a website displaying the parameters, which can be imported into systems like Zabbix or PRTG. You only need to connect four wires and a USB power cable. The module is also configured via a virtual COM port over the same USB connection
Supplies
Step 1: Boards Connections
First, connect the ESP32 board and the sensor board as follows:
ESP32 board -> AHT20/BMP280 board
- GPIO 5 (SDA) -> SDA
- GPIO 6 (SCL) -> SCL
- 3.3V -> VCC
- GND -> GND
Step 2: Arduino IDE Setup and Compilation
Install Arduino IDE:
- Download Arduino IDE from arduino.cc
- Install on your computer
Add ESP32-C3 Support:
- In Arduino IDE, open File -> Preferences
- In "Additional Boards Manager URLs" add: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- Click OK
- Open Tools -> Board -> Boards Manager
- Search for "esp32"
- Find "ESP32 by Espressif Systems" and install latest version
- Close Boards Manager
Install Required Libraries:
- In Arduino IDE, open included Sketch -> Include Library -> Manage Libraries or download updated version of the sketch from here
- Install these libraries one by one:
- "U8g2" by olikraus (for OLED display)
- "Adafruit AHTX0" (for AHT20 sensor)
- "Adafruit BMP280 Library" (for BMP280 sensor)
- "Adafruit Unified Sensor" (may install automatically)
Project Configuration:
- Copy the complete sketch code into Arduino IDE
- Select board: Tools -> Board -> ESP32 Arduino -> "ESP32-C3 Dev Module"
- Configure settings:
- CPU Frequency: 160MHz (WiFi)
- Flash Size: "4MB (32Mb)"
- Partition Scheme: "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)"
- Upload Speed: "921600"
- Port: Select your ESP32-C3 COM port
Compilation and Upload:
- Click "Verify" (checkmark) to compile
- If no errors, click "Upload" (right arrow)
- Hold BOOT button on ESP32-C3 board when clicking upload if required
- Wait for upload to complete
Attachments
Step 3: Usage
First Boot (Setup Mode):
- Open Serial Monitor: Tools -> Serial Monitor
- Set baud rate to 115200
- Press RST (Reset) button on the board
- Display will show "SETUP"
- Serial Monitor will show setup wizard
Step-by-Step Setup:
- Enter device name (1-6 characters), e.g., "METEO1"
- Wait for WiFi scan
- Select network from list (enter number) or 'm' for manual entry
- Enter WiFi password
- Select connection type:
- 1 for DHCP (automatic IP)
- 2 for Static IP (manual)
- If Static IP selected, enter IP in format: 192.168.1.100/24
- Enter HTTP server port (default 80)
- Setup completes, device reboots
Device Operation:
- Display cycles through 3 screens (every 5 seconds):
- Temperature (large)
- Humidity and pressure
- Device name, IP address, and SSID
- Web interface available at: http://device-IP-address:port Page auto-refreshes every 5 seconds
Serial Monitor Commands:
Type command and press Enter:
- help - show all commands
- info - show sensor data and device name
- net - show network settings
- reset - factory reset
- set [parameter] [value] - change setting Parameters: ip, port, ssid, passw, name Example: set name METEO2
- save - save current settings
- scan - scan for WiFi networks
- apply - apply settings and reboot
Changing Settings via Commands:
- To change name: set name NEWNAME
- To change WiFi: set ssid NEW_SSID
- Then: set passw NEW_PASSWORD
- To change IP: set ip 192.168.1.150/24
- To change port: set port 8080
- Save: save
- Apply: apply
Step 4: Troubleshooting
- If sensors not detected:
- Check connections
- Verify I2C addresses don't conflict
- Check 3.3V power
- If WiFi won't connect:
- Verify SSID and password
- Use scan command to find networks
- Ensure network is 2.4GHz
- If web page inaccessible:
- Check IP with net command
- Ensure device and computer on same network
- Check firewall settings
- If display not working:
- Check SDA/SCL connections
- Verify display address (0x3C)
Important:
- AHT20 typically uses address 0x38
- BMP280 typically uses address 0x77
- OLED typically uses address 0x3C
If addresses conflict, BMP280 often has a jumper to change address from 0x77 to 0x76.
Factory Reset:
- Enter command: reset
- Confirm: yes
- Device enters setup mode
Device is ready after first successful setup. Settings are stored in non-volatile memory and restored after power cycle.


