Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes various components such as microcontrollers, motor drivers, sensors, and other peripherals. The circuit is designed to control multiple motors, a water pump, LEDs, and other devices using an ESP8266 NodeMCU and Arduino UNO microcontrollers. The document includes a component list, wiring details, and documented code for the microcontrollers.
Component List
ESP8266 NodeMCU
- Description: A low-cost Wi-Fi microcontroller.
- 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
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
7805 Voltage Regulator
- Description: A voltage regulator that outputs 5V.
- Pins: Vin, Gnd, Vout
Center Shaft Metal Geared Motor
- Description: A DC motor with a metal gearbox.
- Pins: +, -
OV7725 Camera Module
- Description: A camera module for capturing images.
- Pins: 3V3, GND, SIOC, SIOD, VSYNC, HREF, PCLK, XCLK, D9, D8, D7, D6, D5, D4, D3, D2, RESET, D1, D0, PWDN
1 Channel Relay 5V
- Description: A single-channel relay module.
- Pins: VCC, GND, IN, NC, COM, NO
Pushbutton
- Description: A simple pushbutton switch.
- Pins: Pin 2, Pin 1, Pin 3, Pin 4
Water Pump
- Description: A small water pump.
- Pins: VCC, GND
40 Fan 12V
- Description: A 12V cooling fan.
- Pins: +12V, -12V
DC Motor
- Description: A standard DC motor.
- Pins: pin 1, pin 2
Rocker Switch
- Description: A simple on/off switch.
- Pins: output, input
Power LED 12V 10W 0.8-0.9A
- Description: A high-power LED.
- Pins: +, -
Arduino UNO
- Description: A popular microcontroller board.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
HC-SR501 Motion Sensor
- Description: A motion detection sensor.
- Pins: GND, OUT, VCC
Piezo Speaker
- Description: A small piezoelectric speaker.
- Pins: pin1, pin2
Solar Panel
- Description: A solar panel for generating electricity.
- Pins: +, -
12V 7Ah Battery
- Description: A rechargeable battery.
- Pins: 12v +, 12v -
LED: Two Pin (red)
- Description: A standard red LED.
- Pins: cathode, anode
48V to 5V Converter
- Description: A voltage converter.
- Pins: out+, out--, in+, in--
YL-83 Rain Sensor - Detection Board
- Description: A rain detection sensor.
- Pins: POS, NEG
Wiring Details
ESP8266 NodeMCU
- D2 connected to IN1 of L298N DC Motor Driver
- D3 connected to IN2 of L298N DC Motor Driver
- D4 connected to IN3 of L298N DC Motor Driver
- D5 connected to IN4 of L298N DC Motor Driver
- VIN connected to 5V of L298N DC Motor Driver
- GND connected to:
- GND of L298N DC Motor Driver
- GND of 12V 7Ah Battery
- GND of Pushbutton
- GND of Power LED 12V 10W 0.8-0.9A
- GND of Arduino UNO
- GND of 1 Channel Relay 5V
- GND of 7805 Voltage Regulator
- GND of DC Motor
- GND of 48V to 5V Converter
- GND of OV7725 Camera Module
- GND of 40 Fan 12V
L298N DC Motor Driver
- IN1 connected to D2 of ESP8266 NodeMCU
- IN2 connected to D3 of ESP8266 NodeMCU
- IN3 connected to D4 of ESP8266 NodeMCU
- IN4 connected to D5 of ESP8266 NodeMCU
- 5V connected to VIN of ESP8266 NodeMCU
- GND connected to GND of ESP8266 NodeMCU
- OUT1 connected to:
- + of Center Shaft Metal Geared Motor
- + of Center Shaft Metal Geared Motor
- OUT2 connected to:
- - of Center Shaft Metal Geared Motor
- - of Center Shaft Metal Geared Motor
- OUT3 connected to:
- + of Center Shaft Metal Geared Motor
- + of Center Shaft Metal Geared Motor
- OUT4 connected to:
- - of Center Shaft Metal Geared Motor
- - of Center Shaft Metal Geared Motor
- 12V connected to 12v + of 12V 7Ah Battery
7805 Voltage Regulator
- Vin connected to 12v + of 12V 7Ah Battery
- Gnd connected to GND of ESP8266 NodeMCU
- Vout connected to:
- VCC of 1 Channel Relay 5V
- 3V3 of OV7725 Camera Module
Center Shaft Metal Geared Motor
- + connected to OUT1 of L298N DC Motor Driver
- - connected to OUT2 of L298N DC Motor Driver
- + connected to OUT3 of L298N DC Motor Driver
- - connected to OUT4 of L298N DC Motor Driver
OV7725 Camera Module
- 3V3 connected to Vout of 7805 Voltage Regulator
- GND connected to GND of ESP8266 NodeMCU
1 Channel Relay 5V
- VCC connected to Vout of 7805 Voltage Regulator
- GND connected to GND of ESP8266 NodeMCU
- IN connected to Pin 2 of Pushbutton
- COM connected to GND of ESP8266 NodeMCU
- NO connected to GND of Water Pump
Pushbutton
- Pin 2 connected to IN of 1 Channel Relay 5V
- Pin 4 connected to GND of ESP8266 NodeMCU
Water Pump
- VCC connected to input of Rocker Switch
- GND connected to NO of 1 Channel Relay 5V
40 Fan 12V
- +12V connected to 12v + of 12V 7Ah Battery
- -12V connected to GND of ESP8266 NodeMCU
DC Motor
- pin 1 connected to NO of 1 Channel Relay 5V
- pin 2 connected to output of Rocker Switch
Rocker Switch
- input
