|
Project 45:
ENVIRONMENT NETWORK |
|
Environment Network has 3 views to monitor up to 20 sensor nodes: (CLICK TO ENLARGE)
Temperature & Humidity: WiFi Signal Strength: TCP/IP address:
Sensor Clients (ESP32-C3 ) have 5 views:
MASTER: v2.1 Schematic, Board Layout, Top & Bottom PCB BOM: Master
Client Sensor Node: v5.3 Schematic, Board Layout, Top & Bottom PCB BOM: Sensor Node
ENVIRONMENT NETWORK
Overview: Client/server application. Several client sensor nodes can be installed throughout a building to report to a master server node that records and displays the data: temperature in Celsius, humidity percentage, air quality (using VoC) and lighting level.
Design Changes: I first designed this environment monitoring system using Espressif's ESPNOW network protocol which is layer 2 only, no routing: communication was direct from sensor node client to the server, without the router's help so server positioning was critical. I found the system was not reliable enough so it was completely redesigned to use a network layer 3 TCP/IP router located on the middle level of a 3-level building. As you can see in the two Signal Diags screens most of the signal strengths are in the "green" and some are in the "yellow". None of the client nodes was trying to communicate with a weak signal as would be shown by "red" bars.
Features: Each client node has an AHT10 sensor to report temperature and humidity to the server, and nodes containing SGP40 sensors report on the Air Quality. Additionally, there is an LDR to report on the lighting level in the room being monitored. Motion detection, e.g., someone walking by the sensor node will cause it to display its current stats in a carousel fashion and then return to a dark screen. Additionally, stats are written to the Master's SD drive periodically.
Microcontroller & Docs: 1) ESP32-C3 Super Mini Dev Board: https://github.com/sidharthmohannair/Tutorial-ESP32-C3-Super-Mini/ 2) Random Nerd Tutorial on the Super Mini
Master receiver Arduino sketch: ENS_6f_HTTP_XXX.zip Sensor node Arduino sketch: ENC_6b_HTTP_XXX.zip
Note: when you compile the code to upload to your "Nologo ESP32-C3 Super Mini", you must select ESP32 by Espressif Systems v3.2.1. Running anything newer may break other ESP32 sketches. Running anything less, example v2.x, will cause continual errors with this sketch. Server code is uploaded to an ESP32-2432S028R, also known as a CYD.
ESP32 Forget: If your ESP32's cache of WiFi MAC addresses seems corrupt, run this file to hopefully clean it up: ESP32-C3_Super_Mini_Forget_Cache.ino If your ESP32 misbehaves, remember to press and hold RESET, press and hold BOOT, release RESET and then release BOOT, in that specific order. Then upload your sketch.
Note: If the ESP32-C3 sensor nodes are too close together when testing in the lab, the receiver won't appear to work. That's most likely due to the transmitter's signal being too strong given the receivers' proximity. Either move them far apart (not likely during testing!) or add the code snippet below to all of the transmitters in the lab area. This setup() code will alter and show the TX strength.
WiFi.setTxPower(WIFI_POWER_2dBm);
// 2 = 8dBm, 5 = 20dBm. 0 to 20.5 in 0.5 increments. 2,5,7,19 work
with ESP32-C3. |
Updated 2026-07-07