Circuit Documentation
Summary of the Circuit
This circuit is designed to control two DC motors and a servo motor using an ESP8266 NodeMCU microcontroller. The ESP8266 NodeMCU interfaces with an L298N DC motor driver to control the speed and direction of the DC motors. A servo motor is directly controlled by the ESP8266 NodeMCU. The circuit is powered by a 12V battery, and a rocker switch is used to control the power supply to the circuit. The L298N motor driver receives its power from the 12V battery and also provides a 5V output that is controlled by the rocker switch.
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.
L298N DC Motor Driver
- Dual H-bridge motor driver for controlling two DC motors.
- 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.
Motor Amarillo Motorreductor Hobby (x2)
- Yellow hobby gear motors for robotics projects.
- Pins: vcc, GND.
Battery 12V
- Power source for the circuit.
- Pins: +, -.
Servomotor SG90
- Small and lightweight servo motor for precise control.
- Pins: SIG, VCC, GND.
Rocker Switch
- A switch to control the power supply to the circuit.
- Pins: output, input.
Wiring Details
ESP8266 NodeMCU
- D0 -> L298N DC Motor Driver IN1
- D1 -> L298N DC Motor Driver IN2
- D2 -> L298N DC Motor Driver IN3
- D3 -> L298N DC Motor Driver IN4
- D4 -> Servomotor SG90 SIG
- 3V3 -> Servomotor SG90 VCC
- GND -> Servomotor SG90 GND, L298N DC Motor Driver GND, Motor Amarillo Motorreductor Hobby GND (x2)
- D5 -> L298N DC Motor Driver ENA
- D6 -> L298N DC Motor Driver ENB
- VIN -> Rocker Switch output
L298N DC Motor Driver
- IN1 -> ESP8266 NodeMCU D0
- IN2 -> ESP8266 NodeMCU D1
- IN3 -> ESP8266 NodeMCU D2
- IN4 -> ESP8266 NodeMCU D3
- ENA -> ESP8266 NodeMCU D5
- ENB -> ESP8266 NodeMCU D6
- GND -> ESP8266 NodeMCU GND, Battery 12V -
- 12V -> Battery 12V +
- 5V -> Rocker Switch input
- OUT1 -> Motor Amarillo Motorreductor Hobby GND
- OUT2 -> Motor Amarillo Motorreductor Hobby vcc
- OUT3 -> Motor Amarillo Motorreductor Hobby vcc
- OUT4 -> Motor Amarillo Motorreductor Hobby GND
Motor Amarillo Motorreductor Hobby
- vcc -> L298N DC Motor Driver OUT2, OUT3
- GND -> L298N DC Motor Driver OUT1, OUT4
Battery 12V
-
- -> L298N DC Motor Driver 12V
-
- -> L298N DC Motor Driver GND
Servomotor SG90
- SIG -> ESP8266 NodeMCU D4
- VCC -> ESP8266 NodeMCU 3V3
- GND -> ESP8266 NodeMCU GND
Rocker Switch
- output -> ESP8266 NodeMCU VIN
- input -> L298N DC Motor Driver 5V
Documented Code
No code has been provided for the microcontroller. The documentation of the code would typically include a description of the functionality implemented, setup and loop functions, and any additional functions or libraries used. Since no code is available, this section remains empty.
