Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Solar-Powered Water Quality Monitoring System with GPS and Nokia 5110 LCD Display

Image of ESP32-Based Solar-Powered Water Quality Monitoring System with GPS and Nokia 5110 LCD Display

Circuit Documentation

Summary

This circuit is designed to interface with various sensors and a Nokia 5110 LCD display, controlled by an ESP32 microcontroller. The circuit includes a solar panel for power input, a TP4056 for charging a Li-Ion battery, and a rocker switch for power control. It features a GPS module for location tracking and multiple sensors for measuring temperature, turbidity, TDS (Total Dissolved Solids), pH, dissolved oxygen, electrical conductivity, and ORP (Oxidation-Reduction Potential). The Nokia 5110 LCD is used to display information such as sensor readings and system status.

Component List

  • TP4056: A lithium battery charger and protection module.
  • Rocker Switch: A switch to control the power supply to the circuit.
  • Solar Panel: A photovoltaic panel to convert solar energy into electrical power.
  • DS18B20 1-Wire Temperature Sensor Probe Cable: A digital temperature sensor for measuring temperature.
  • Modulo Sensor Turbidez/Turbidity: A turbidity sensor module for measuring the clarity of water.
  • Sonda Sensor Turbidez/Turbidity: A probe for the turbidity sensor module.
  • Sonda Sensor TDS: A probe for measuring Total Dissolved Solids in water.
  • Sonda Sensor PH: A probe for measuring the pH level of water.
  • Modulo Sensor TDS: A TDS sensor module.
  • Modulo Sensor Oxigeno Disuelto/Dissolved Oxygen: A dissolved oxygen sensor module.
  • Sonda Sensor Oxigeno Disuelto/Dissolved Oxygen: A probe for the dissolved oxygen sensor module.
  • Modulo Sensor Conductividad Electrica/Electrical Conductivity: A module for measuring electrical conductivity in water.
  • Sonda Sensor Conductividad Electrica/Electrical Conductivity: A probe for the electrical conductivity sensor module.
  • Nokia 5110 LCD: A liquid crystal display for user interface.
  • Modulo Sensor PH: A pH sensor module.
  • GPS NEO 6M: A GPS module for location tracking.
  • ESP32 - Expansion Board: A microcontroller board based on the ESP32 chip.
  • Module DS18N20: A digital temperature sensor module.
  • Modulo Sensor ORP: An ORP sensor module.
  • Sonda Sensor ORP: A probe for the ORP sensor module.
  • 18650 Li-Ion: A rechargeable lithium-ion battery.

Wiring Details

TP4056

  • IN- connected to Solar Panel (+)
  • IN+ connected to Solar Panel (-)
  • OUT- connected to ESP32 Expansion Board (-)
  • B- connected to 18650 Li-Ion (Negative)
  • B+ connected to 18650 Li-Ion (Positive)
  • OUT+ connected to Rocker Switch (1)

Rocker Switch

  • 2 connected to ESP32 Expansion Board (+)

DS18B20 1-Wire Temperature Sensor Probe Cable

  • shield connected to Module DS18N20 (DAT)
  • GND connected to Module DS18N20 (GND)
  • VDD connected to Module DS18N20 (VCC)

Solar Panel

  • + connected to TP4056 (IN-)
  • - connected to TP4056 (IN+)

Modulo Sensor Turbidez/Turbidity

  • g connected to ESP32 Expansion Board (G)
  • A connected to ESP32 Expansion Board (D22)
  • V connected to ESP32 Expansion Board (V)

Sonda Sensor Turbidez/Turbidity

  • + connected to Modulo Sensor Turbidez/Turbidity (1)
  • - connected to Modulo Sensor Turbidez/Turbidity (2)
  • S connected to Modulo Sensor Turbidez/Turbidity (3)

Sonda Sensor TDS

  • + connected to Modulo Sensor TDS (+)
  • - connected to Modulo Sensor TDS (-)

Sonda Sensor PH

  • SEN connected to Modulo Sensor PH (SEN)

Modulo Sensor TDS

  • A connected to ESP32 Expansion Board (D23)
  • - connected to ESP32 Expansion Board (G)
  • + connected to ESP32 Expansion Board (V)

Modulo Sensor Oxigeno Disuelto/Dissolved Oxygen

  • A connected to ESP32 Expansion Board (D18)
  • + connected to ESP32 Expansion Board (V)
  • - connected to ESP32 Expansion Board (G)
  • SON connected to Sonda Sensor Oxigeno Disuelto/Dissolved Oxygen (SON)

Modulo Sensor Conductividad Electrica/Electrical Conductivity

  • A connected to ESP32 Expansion Board (D5)
  • + connected to ESP32 Expansion Board (V)
  • - connected to ESP32 Expansion Board (G)
  • SEN connected to Sonda Sensor Conductividad Electrica/Electrical Conductivity (SON)

Nokia 5110 LCD

  • DN(MODI) (out) connected to ESP32 Expansion Board (D27)
  • D/C (out) connected to ESP32 Expansion Board (D14)
  • RST (out) connected to ESP32 Expansion Board (D12)
  • SCE (out) connected to ESP32 Expansion Board (D13)
  • GND (out) connected to ESP32 Expansion Board (G)
  • VCC (out) connected to ESP32 Expansion Board (V)
  • LED (out) connected to ESP32 Expansion Board (D25)
  • SCLK (out) connected to ESP32 Expansion Board (D26)

GPS NEO 6M

  • VCC connected to ESP32 Expansion Board (V)
  • RX connected to ESP32 Expansion Board (D17)
  • TX connected to ESP32 Expansion Board (D16)
  • GND connected to ESP32 Expansion Board (G)

Modulo Sensor PH

  • PO connected to ESP32 Expansion Board (D19)
  • G connected to ESP32 Expansion Board (G)
  • V connected to ESP32 Expansion Board (V)
  • SEN connected to Sonda Sensor PH (SEN)

Modulo Sensor ORP

  • A connected to ESP32 Expansion Board (D4)
  • + connected to ESP32 Expansion Board (V)
  • - connected to ESP32 Expansion Board (G)
  • SON connected to Sonda Sensor ORP (SON)

18650 Li-Ion

  • Negative connected to TP4056 (B-)
  • Positive connected to TP4056 (B+)

Documented Code

ESP32 - Expansion Board

/*
 * ESP32 LCD5110
 * This sketch initializes the ESP32 and interfaces with the Nokia 5110 LCD.
 * It displays a simple message on the LCD screen.
 */

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

// Pin definitions
#define LCD_CLK 26
#define LCD_DIN 27
#define LCD_DC 14
#define LCD_CS 13
#define LCD_RST 12

// Create an instance of the LCD display
Adafruit_PCD8544 display = Adafruit_PCD8544(LCD_CLK, LCD_DIN, LCD_DC, LCD_CS, LCD_RST);

void setup() {
  // Initialize the display
  display.begin();
  display.setContrast(50);
  display.clearDisplay();
  display.display();
  
  // Display a message
  display.setTextSize(1);
  display.setTextColor(BLACK);
  display.setCursor(0,0);
  display.println("Hello, World!");
  display.display();
}

void loop() {
  // Main loop does nothing
}

This code is for the ESP32 microcontroller and is responsible for initializing and controlling the Nokia 5110 LCD display. It sets up the display and prints "Hello, World!" on the screen. The pin definitions match the wiring details provided earlier.