Circuit Documentation
Summary
This circuit is designed to interface various sensors and actuators with an ESP32 Devkit V1 microcontroller. The sensors include a DHT11 temperature and humidity sensor, an HC-SR04 ultrasonic sensor, a TDS (Total Dissolved Solids) sensor module, and a pH sensor module. Actuation is handled by a 5V 2-Relay module which controls two 5V mini water pumps. The circuit also includes three I2C LCD screens for data display. Power is supplied by a 220V source, which is interfaced with the relay module for controlling the water pumps. The ESP32 Devkit V1 microcontroller is the central processing unit of the circuit, responsible for reading sensor data, controlling the relay module, and updating the LCD displays.
Component List
ESP32 Devkit V1
- Microcontroller with WiFi capability.
- Pins: 3V3, GND, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, VIN.
5V 2-Relay JD-VCC
- Relay module with two channels.
- Pins: JD-VCC, VCC, GND, IN1, IN2, NO, COM, NC.
5V Mini Water Pump
- Small water pump operating at 5V.
- Pins: Positive pin, Negative pin.
Power 220V
- Main power source.
- Pins: Hot wire, Neutral wire.
I2C LCD 16x2 Screen
- Liquid Crystal Display with I2C communication.
- Pins: SCL, SDA, VCC (5V), GND, VDD, VO, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, BLA, BLK.
Modulo Sensor PH
- Sensor for measuring the pH level of a solution.
- Pins: -, +, A, SON.
HC-SR04 Ultrasonic Sensor
- Ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND.
DHT11
- Temperature and humidity sensor.
- Pins: 5V, S, GND.
TDS Sensor Module
- Sensor for measuring Total Dissolved Solids in water.
- Pins: TDS Negative, TDS Positive, TDS A.
Wiring Details
ESP32 Devkit V1
- 3V3: Connected to sensors and relay VCC.
- GND: Common ground for all components.
- D5: Connected to HC-SR04 TRIG pin.
- D18: Connected to HC-SR04 ECHO pin.
- D21: Connected to SDA pin of all I2C LCD screens.
- D22: Connected to SCL pin of all I2C LCD screens.
- D23: Connected to DHT11 S pin.
- D34: Connected to Modulo Sensor PH A pin.
- D25: Connected to 5V 2-Relay JD-VCC IN2 pin.
- D26: Connected to 5V 2-Relay JD-VCC IN1 pin.
- D27: Connected to TDS Sensor Module TDS A pin.
- VIN: Connected to VCC (5V) pin of all I2C LCD screens.
5V 2-Relay JD-VCC
- JD-VCC: Not connected (isolated for relay driving voltage).
- VCC: Connected to ESP32 VIN pin.
- GND: Common ground with ESP32.
- IN1: Controlled by ESP32 D26 pin.
- IN2: Controlled by ESP32 D25 pin.
- NO: Normally open contacts connected to the hot wire of the power source.
- COM: Common contacts connected to the positive pins of both mini water pumps.
5V Mini Water Pump
- Positive pin: Connected to COM pin of the relay module.
- Negative pin: Connected to the neutral wire of the power source.
Power 220V
- Hot wire: Connected to NO pin of the relay module.
- Neutral wire: Connected to the negative pins of both mini water pumps.
I2C LCD 16x2 Screen
- SDA: Connected to ESP32 D21 pin.
- SCL: Connected to ESP32 D22 pin.
- VCC (5V): Connected to ESP32 VIN pin.
- GND: Common ground with ESP32.
Modulo Sensor PH
- +: Connected to ESP32 3V3 pin.
- -: Connected to common ground.
- A: Connected to ESP32 D34 pin.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to ESP32 3V3 pin.
- TRIG: Controlled by ESP32 D5 pin.
- ECHO: Connected to ESP32 D18 pin.
- GND: Common ground with ESP32.
DHT11
- 5V: Connected to ESP32 3V3 pin.
- S: Connected to ESP32 D23 pin.
- GND: Common ground with ESP32.
TDS Sensor Module
- TDS Positive: Connected to ESP32 3V3 pin.
- TDS Negative: Connected to common ground.
- TDS A: Connected to ESP32 D27 pin.
Documented Code
No code was provided for the microcontroller. The documentation of the code would typically include the setup and loop functions for the ESP32, detailing how it interfaces with each sensor and actuator, including initialization, reading sensor values, controlling the relay module, and updating the LCD displays. Since no code is available, this section cannot be completed.
