ESP32 and Voltage Sensor (25V) - aricoelhog/ESP32_Arduino_IDE GitHub Wiki

Using ESP32 and Voltage Sensor (25V) to read the voltage of a 30W solar panel. To develop the voltage reading, a direct current Led 12V (1A) was connected directly to the solar panel. The solar panel specifications are illustrated below:

PlacaSolarEspecific

In addition, the sensor was connected in parallel to the lamp. The GND(-) pin of the sensor was connected to the GND pin of the ESP32, VCC(+) to Vin, as it needs a voltage of 5V for correct reading, and the output pin S to the pin GPIO 39 using a voltage divider. ESP32 analog pin supports maximum voltage of 3.3V, so to avoid damage to the microcontroller, connections were made as illustrated below:

image Esp32_pin

For this sensor, it was necessary to calculate an equation that relates the input voltage with the voltage on the ESP pin, and this was done by measuring them using a multimeter, with the connected sensor. In this way, the graph was generated with the equation that calculates the measured values. EqVoltageSensor

With this equation, the present project was developed, and the readings were successfully performed.

FONT: GONÇALVES, A. Sistema de Monitoramento de Energia Solar Fotovoltaica com Armazenamento de Dados em Nuvem. Projeto de Conclusão de Curso — Universidade do Estado de Minas Gerais. https://drive.google.com/file/d/1ge0Wb9ZYfXhWafDIYcRNHqw6Q1MuCGXX/view