Circuit Documentation
Summary of the Circuit
This circuit is designed to control a set of four "Motor amarillo motorreductor hobby" DC motors using an Arduino UNO microcontroller and an L298N DC motor driver. The Arduino UNO is responsible for generating control signals that are sent to the L298N driver, which in turn drives the motors. The power for the circuit is provided by a pair of 18650 Li-ion batteries connected in series or parallel (not specified in the net list), which supply power to both the Arduino and the motor driver.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
L298N DC Motor Driver
- A dual H-bridge motor driver capable of driving a pair of DC motors or a single stepper motor.
- It has 2 H-bridges with high current carrying capacity and provides built-in diode protection.
Motor Amarillo Motorreductor Hobby (4 units)
- A yellow DC gear motor commonly used for hobby projects.
- It operates on a nominal voltage and has two terminals: Vcc and GND.
18650 Li-ion Battery x 2
- A standard rechargeable battery used in laptops, flashlights, and electric vehicles.
- It has a high energy density and long life cycle.
Wiring Details
Arduino UNO
- GND connected to the negative terminal of the 18650 Li-ion Battery and GND of L298N DC motor driver.
- Vin connected to the positive terminal of the 18650 Li-ion Battery and 12V of L298N DC motor driver.
- D10 connected to ENA of L298N DC motor driver.
- D9 connected to IN1 of L298N DC motor driver.
- D8 connected to IN2 of L298N DC motor driver.
- D7 connected to IN3 of L298N DC motor driver.
- D6 connected to IN4 of L298N DC motor driver.
- D5 connected to ENB of L298N DC motor driver.
L298N DC Motor Driver
- GND connected to the negative terminal of the 18650 Li-ion Battery and GND of Arduino UNO.
- 12V connected to the positive terminal of the 18650 Li-ion Battery and Vin of Arduino UNO.
- ENA, IN1, IN2, IN3, IN4, ENB connected to corresponding pins on the Arduino UNO.
- OUT1 and OUT2 connected to the Vcc and GND of two Motor amarillo motorreductor hobby motors.
- OUT3 and OUT4 connected to the Vcc and GND of the other two Motor amarillo motorreductor hobby motors.
Motor Amarillo Motorreductor Hobby
- Vcc of two motors connected to OUT1 of L298N DC motor driver.
- GND of the same two motors connected to OUT2 of L298N DC motor driver.
- Vcc of the other two motors connected to OUT3 of L298N DC motor driver.
- GND of these two motors connected to OUT4 of L298N DC motor driver.
18650 Li-ion Battery x 2
- + connected to Vin of Arduino UNO and 12V of L298N DC motor driver.
- - connected to GND of Arduino UNO and GND of L298N DC motor driver.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional code to control the motors or interact with the L298N motor driver. The user is expected to fill in the setup and loop functions with code to initialize the motor driver and control the motors based on the application requirements.
