Part 1: System Overview
Introduces the low-voltage DC model's architecture and the role of the ESP32, INA219, charge controller, storage battery, DC load, and MQTT.
Part 1: System Overview
The Solar Energy Monitoring and Control System with ESP32 is an educational engineering model for measuring the DC source from a solar panel, tracking a storage battery, and controlling a small DC load. The project's focus is understanding the energy flow correctly, how to measure voltage, how to measure current, and how to send data to MQTT for remote monitoring.
The model includes a solar panel, a solar charge controller, a protected storage battery, an ESP32, an INA219 sensor, a voltage divider, a 5V buck converter, and a DC load control module.
⚠️ This lesson's scope is limited to low-voltage DC systems under 24V. Do not connect 220V AC mains power, an inverter, a grid-tied system, or a high-voltage solar panel string.
Main Operating Flow
| Block | Function |
|---|---|
| Solar panel | Generates DC voltage when exposed to light. |
| INA219 | Measures bus voltage, current, and power on the monitored line. |
| Solar charge controller | Manages the battery-charging process, matched to the battery type. |
| Storage battery | Supplies power to the ESP32 and the DC load as needed. |
| ESP32 | Reads the sensor, applies safety thresholds, sends data, and receives MQTT commands. |
| Relay or MOSFET module | Switches the small DC load on/off per the ESP32's command. |
Goals After Completion
| Goal | Expected Outcome |
|---|---|
| Measuring energy | Can read voltage, current, and power from the INA219. |
| Measuring the battery | Can compute battery voltage from the voltage divider. |
| Controlling the load | Can switch the DC load on/off in AUTO or MANUAL mode. |
| IoT connectivity | Can send telemetry and receive control commands over MQTT. |
| Basic safety | Automatically cuts the load when battery voltage is low, and alerts via MQTT. |
Technical Limits to Remember
The INA219 is suited to measuring current and power within a low bus-voltage range. The ESP32 must never read a 6V, 9V, or 12V battery voltage directly at its ADC pin. To measure the battery via the ADC, use a voltage divider and check the voltage at the ADC pin with a multimeter before connecting.
