ESP8266 NodeMCU Controlled Water Pump and Solenoid Valve System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question appears to be designed to control a water pump and a plastic solenoid valve using two KY-019 1-channel relay modules, which are in turn controlled by an ESP8266 NodeMCU microcontroller. The relays are powered by a 5V battery, while the pump and valve are powered by a 12V battery. A diode is used in the circuit, likely for protecting against reverse current flow.
Component List
ESP8266 NodeMCU
- Microcontroller with WiFi capability.
- Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN.
KY-019 Relay Module 1 Channel (Two Instances)
- Relay module for controlling high power devices.
- Pins: S, 5V, GND, NC, COM, NO.
Water Pump
- Device for moving water.
- Pins: Positive, Negative.
12V Battery
- Power source for the water pump and solenoid valve.
- Pins: VCC, GND.
5V Battery
- Power source for the relay modules and ESP8266 NodeMCU.
- Pins: +, -.
Diode
- A semiconductor device that allows current to flow in one direction only.
- Pins: Cathode, Anode.
Plastic Solenoid Valve
- An electrically controlled valve for controlling the flow of water.
- Pins: Pin1, Pin2.
Wiring Details
ESP8266 NodeMCU
- D3 connected to Relay Module 1 (5V input).
- D4 connected to Relay Module 2 (5V input).
- GND connected to the 5V Battery negative terminal and GND of both Relay Modules.
KY-019 Relay Module 1 Channel
- Relay Module 1:
- S (Signal) connected to 5V Battery positive terminal.
- 5V connected to ESP8266 NodeMCU D3.
- GND connected to 5V Battery negative terminal.
- COM (Common) connected to 12V Battery VCC.
- NO (Normally Open) connected to the cathode of the Diode and Pin1 of the Plastic Solenoid Valve.
- Relay Module 2:
- S (Signal) connected to 5V Battery positive terminal.
- 5V connected to ESP8266 NodeMCU D4.
- GND connected to 5V Battery negative terminal.
- COM (Common) connected to 12V Battery VCC.
- NO (Normally Open) connected to the positive pin of the Water Pump.
Water Pump
- Positive connected to NO of Relay Module 2.
- Negative connected to the anode of the Diode and Pin2 of the Plastic Solenoid Valve.
12V Battery
- VCC connected to COM of both Relay Modules.
- GND connected to the anode of the Diode, negative pin of the Water Pump, and Pin2 of the Plastic Solenoid Valve.
5V Battery
- Positive (+) connected to S of both Relay Modules.
- Negative (-) connected to GND of both Relay Modules and GND of ESP8266 NodeMCU.
Diode
- Cathode connected to NO of Relay Module 1 and Pin1 of the Plastic Solenoid Valve.
- Anode connected to GND of the 12V Battery, negative pin of the Water Pump, and Pin2 of the Plastic Solenoid Valve.
Plastic Solenoid Valve
- Pin1 connected to NO of Relay Module 1 and cathode of the Diode.
- Pin2 connected to GND of the 12V Battery, negative pin of the Water Pump, and anode of the Diode.
Documented Code
No code has been provided for the ESP8266 NodeMCU or any other microcontrollers in the circuit. Therefore, this section is left blank until the relevant code is supplied. The code would typically include the logic for controlling the relay modules based on sensor inputs or network commands, considering the ESP8266 NodeMCU's WiFi capabilities.