Circuit Documentation
Summary
The circuit in question appears to be a complex system involving multiple DC motors, motor drivers, ultrasonic sensors, a microcontroller, a relay module, a power supply system with a battery, solar panel, and charge controller, and a power connector. The microcontroller used is an ESP32 on a baseboard, which interfaces with the ultrasonic sensors and controls the motors through the motor drivers. The relay module is also controlled by the ESP32. The power supply system is designed to provide power to the circuit components, with the solar panel charging the battery through the charge controller, and the battery supplying power to the motor drivers and the ESP32.
Component List
DC Motor
- Description: A standard DC motor used for converting electrical energy into mechanical rotation.
- Pins: pin 1, pin 2
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor that uses sonar to determine the distance to an object.
- Pins: VCC, TRIG, ECHO, GND
Esp32 on Baseboard
- Description: A powerful microcontroller with Wi-Fi and Bluetooth capabilities, used for controlling various components in the circuit.
- Pins: Multiple GPIOs, power (3V, 5V), ground (GND), communication (TX, RX), etc.
12v 7ah Battery
- Description: A rechargeable battery that provides a 12V power source for the circuit.
- Pins: 12v +, 12v -
L298N DC Motor Driver
- Description: A motor driver module capable of driving two DC motors or one stepper motor.
- Pins: OUT1, OUT2, OUT3, OUT4, 12V, GND, 5V, ENA, ENB, IN1, IN2, IN3, IN4, etc.
1 Channel 5V Relay Module
- Description: A relay module that allows a low-power signal to control a higher power circuit.
- Pins: VCC+, VCC- (GND), IN, N.O., COM, N.C.
Solar Charge Controller
- Description: A device that controls the charging of a battery from a solar panel and provides load regulation.
- Pins: Solar Cell +, Solar Cell -, Battery +, Battery -, Load +, Load -
Solar Panel
- Description: A photovoltaic panel that converts sunlight into electrical energy.
- Pins: gnd, vcc
2.1mm Barrel Jack with Terminal Block
- Description: A power connector that allows for easy connection to an external power source.
- Pins: POS, NEG
Wiring Details
DC Motor
- pin 1: Connected to motor driver OUT pins (OUT1 or OUT3)
- pin 2: Connected to motor driver OUT pins (OUT2 or OUT4)
HC-SR04 Ultrasonic Sensor
- VCC: Connected to ESP32 power pin (V)
- TRIG: Connected to ESP32 GPIO pins (GPIO16, GPIO18, GPIO4)
- ECHO: Connected to ESP32 GPIO pins (GPIO17, GPIO19, GPIO5)
- GND: Connected to ESP32 ground pin (G)
Esp32 on Baseboard
- GPIOs: Connected to various components such as ultrasonic sensors, relay module, and motor drivers
- Power (3V, 5V): Provides power to ultrasonic sensors and relay module
- Ground (GND): Common ground for the circuit
- Communication (TX, RX): Available for serial communication, not used in current wiring
12v 7ah Battery
- 12v +: Connected to motor driver 12V pin and solar charge controller Battery -
- 12v -: Connected to solar charge controller Battery +
L298N DC Motor Driver
- OUT1, OUT2, OUT3, OUT4: Connected to DC motor pins
- 12V: Connected to 12v 7ah Battery and ESP32 power pin (V)
- GND: Connected to ESP32 ground pin (G)
- ENA, ENB: Enable pins, not detailed in current wiring
- IN1, IN2, IN3, IN4: Connected to ESP32 GPIO pins (GPIO26, GPIO25, GPIO33, GPIO32 for one driver; GPIO13, GPIO12, GPIO14, GPIO27 for the other driver)
1 Channel 5V Relay Module
- VCC+: Connected to ESP32 power pin (V)
- VCC- (GND): Connected to ESP32 ground pin (G)
- IN: Connected to ESP32 GPIO pin (GPIO23)
- N.O.: Connected to DC motor pin 1
- COM: Connected to ESP32 power pin (V)
- N.C.: Not detailed in current wiring
Solar Charge Controller
- Solar Cell +: Connected to Solar Panel vcc
- Solar Cell -: Connected to Solar Panel gnd
- Battery +: Connected to 12v 7ah Battery 12v -
- Battery -: Connected to 12v 7ah Battery 12v + and motor driver 12V pin
- Load +: Connected to 2.1mm Barrel Jack with Terminal Block NEG
- Load -: Connected to 2.1mm Barrel Jack with Terminal Block POS
Solar Panel
- gnd: Connected to Solar Charge Controller Solar Cell -
- vcc: Connected to Solar Charge Controller Solar Cell +
2.1mm Barrel Jack with Terminal Block
- POS: Connected to Solar Charge Controller Load -
- NEG: Connected to Solar Charge Controller Load +
Documented Code
No code has been provided for the microcontroller. The documentation of the code would typically include details on how the ESP32 interfaces with the ultrasonic sensors, motor drivers, and relay module, including the initialization of GPIO pins, setup of communication protocols, and the main control loop with logic for sensor data processing and actuator control.