Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Solar-Powered ESP32 DC Voltmeter with Wi-Fi and LCD Display

View and Edit Project In Cirkit DesignerImage of Solar-Powered ESP32 DC Voltmeter with Wi-Fi and LCD Display

Circuit Documentation

Summary

This circuit is designed to charge a 18650 battery using a solar panel and a TP4056 battery charging protection module. It also includes a 555 timer-based circuit for additional functionality, a voltage sensor, and an ESP32 microcontroller to monitor and display the voltage on an I2C display. The ESP32 also sends the voltage data to a Blynk application for remote monitoring.

Component List

  1. TP4056 Battery Charging Protection Module (Type C)

    • Pins: OUT +, B+, B-, OUT -, +, -
    • Description: Used for charging and protecting the 18650 battery.
  2. Solar Panel

    • Pins: +, -
    • Description: Provides power to charge the battery.
  3. Battery 18650

    • Pins: +, -
    • Description: Stores energy from the solar panel.
  4. 555 Timer

    • Pins: GND, TRIG, OUT, ~RESET, VCC, DIS, THR, CTRL
    • Description: Used for timing and control purposes.
  5. Electrolytic Capacitor

    • Pins: -, +
    • Description: Stores electrical energy.
    • Properties: Capacitance: 0.000001 Farads
  6. Resistor

    • Pins: pin1, pin2
    • Description: Limits current flow.
    • Properties: Resistance: 200 Ohms
  7. Diode

    • Pins: cathode, anode
    • Description: Allows current to flow in one direction only.
  8. Copper Coil - 30 Turns

    • Pins: 1 PIN, 2 PIN
    • Description: Used for inductance in the circuit.
  9. Bridge - 1N4007

    • Pins: 1 INPUT, 2 INPUT, + PIN, - PIN
    • Description: Converts AC to DC.
  10. 7805 Voltage Regulator

    • Pins: Vin, Gnd, Vout
    • Description: Regulates voltage to 5V.
  11. Voltage Sensor DC 25V

    • Pins: +, -, output, gnd, vcc
    • Description: Measures voltage up to 25V.
  12. ESP32

    • Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
    • Description: Microcontroller for processing and communication.
  13. I2C Display

    • Pins: GND, VCC, SDL, SCL
    • Description: Displays voltage readings.

Wiring Details

TP4056 Battery Charging Protection Module (Type C)

Solar Panel

Battery 18650

555 Timer

Electrolytic Capacitor

Resistor

Diode

Copper Coil - 30 Turns

Bridge - 1N4007

7805 Voltage Regulator

Voltage Sensor DC 25V

ESP32

I2C Display

Documented Code

#define BLYNK_TEMPLATE_ID "TMPL2Tfn-9Jrz"
#define BLYNK_TEMPLATE_NAME "dc voltmeter"
#define BLYNK_AUTH_TOKEN "xbbqQafjumDlL4D5eYwjtAAMN1DFeAzT"
#define BLYNK_PRINT Serial

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 20, 4);

// Calibration factor for DC voltage with 5V reference
const float vCalibration = 5.0 / 4095.0; // Adjust this value as needed

// Blynk and WiFi credentials
char auth[] = BLYNK_AUTH_TOKEN; // Blynk authentication token
const char* ssid = "C1"; // Your WiFi network SSID
const char* pass = "12345678"; // Your WiFi network password

void setup() {
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);

  // Initialize the LCD
  lcd.begin();
  // Display startup message
  lcd.setCursor(3, 0);
  lcd.print("group ");
  lcd.setCursor(3, 1);
  lcd.print("  45    ");
  delay(3000);  // Wait for 3 seconds

  // Clear the LCD and display "DC Voltmeter"