Circuit Documentation
Summary
The circuit in question appears to be a control system utilizing an ESP-8266 microcontroller to manage various components including LEDs, a DC motor with an L9110 motor driver, Hall sensors, and switches. The circuit is powered by a 12V power supply, and the ESP-8266 is responsible for handling the logic and control signals. The circuit includes input devices (Hall sensors and switches) and output devices (LEDs and a DC motor), making it a versatile setup for a range of applications such as automation, sensing, and indication.
Component List
LEDs
- LED: Two Pin (red): A red LED used for indication purposes.
- LED: Two Pin (green): Two instances of green LEDs, also used for indication.
Switches
- 2Pin Push Switch: A push-button switch used as an input device to trigger events.
- Rocker Switch: A rocker switch used to control the power flow to certain parts of the circuit.
Motor and Driver
- DC Motor: A motor that converts electrical energy into mechanical motion.
- L9110 IC DC Motor Driver: A motor driver IC that controls the operation of the DC motor.
Microcontroller
- ESP-8266 Controller: A Wi-Fi capable microcontroller used for processing and controlling the circuit.
Sensors
- Hall Sensor: Two instances of Hall effect sensors used to detect magnetic fields.
Power Supply
- 12v power supply: Provides the necessary power to the circuit.
Resistors
- Resistor (220 Ohms): Two instances of resistors used to limit current to the LEDs.
- Resistor (10000 Ohms): A pull-up resistor, likely for one of the input devices.
- Resistor (220 Ohms): Another instance of a resistor for current limiting purposes.
Wiring Details
LED: Two Pin (red)
- Cathode connected to the cathode of green LEDs and Rocker Switch.
- Anode connected to a 220 Ohm resistor.
LED: Two Pin (green)
- Cathode connected to the cathode of the red LED and Rocker Switch.
- Anode connected to a 220 Ohm resistor.
2Pin Push Switch
- Input + connected to Hall sensors and ESP-8266 Controller (3V3).
- Output + connected to a 10000 Ohm resistor.
Rocker Switch
- Pin 1 connected to the cathodes of the red and green LEDs.
- Pin 2 connected to the GND of the ESP-8266 Controller and Hall sensors.
DC Motor
- Pin 1 connected to Out A of the L9110 IC DC Motor Driver.
- Pin 2 connected to Out B of the L9110 IC DC Motor Driver.
L9110 IC DC Motor Driver
- Out A/B connected to the DC Motor.
- VCC connected to the 12V power supply and ESP-8266 Controller (Vin).
- GND connected to the ESP-8266 Controller (GND).
- In A connected to ESP-8266 Controller (D6).
- In B connected to ESP-8266 Controller (D7).
ESP-8266 Controller
- Various pins connected to Hall sensors, resistors, switches, the motor driver, and power supply as detailed in the wiring list.
Hall Sensor
- connected to ESP-8266 Controller (3V3) and 2Pin Push Switch (Input +).
- connected to ESP-8266 Controller (GND) and Rocker Switch (Pin 2).
- S connected to ESP-8266 Controller (A0).
Resistor (220 Ohms)
- One side connected to the anode of the red LED and the other side to ESP-8266 Controller (D3).
- One side connected to the anode of a green LED and the other side to ESP-8266 Controller (D4).
- One side connected to the anode of another green LED and the other side to ESP-8266 Controller (D5).
Resistor (10000 Ohms)
- One side connected to 2Pin Push Switch (Output +) and ESP-8266 Controller (D2).
- The other side connected to ESP-8266 Controller (GND) and Rocker Switch (Pin 2).
12v power supply
- connected to L9110 IC DC Motor Driver (VCC) and ESP-8266 Controller (Vin).
- connected to ESP-8266 Controller (GND).
Documented Code
ESP-8266 Controller Code (sketch.ino)
void setup() {
}
void loop() {
}
The provided code is a template with empty setup()
and loop()
functions, which are the standard structure for Arduino sketches. The setup()
function is intended to contain initialization code that runs once when the microcontroller is powered on or reset. The loop()
function is for code that runs continuously as long as the microcontroller is powered.
Additional Notes
- The code for the ESP-8266 is minimal and does not include any functionality. It needs to be populated with the logic required to control the circuit based on the intended application.
- The documentation file for the code is empty and should be filled with relevant information about the code's functionality, usage, and any other important details.