Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller, an L298N DC motor driver, two DC motors, and a 2x 18650 battery pack. The Arduino UNO controls the L298N motor driver, which in turn drives the two DC motors. The 2x 18650 battery pack provides power to the motor driver.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- 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
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver that allows control of 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
DC Motor (Motor 1)
- Description: A simple DC motor.
- Pins: pin 1, pin 2
DC Motor (Motor 2)
- Description: A simple DC motor.
- Pins: pin 1, pin 2
2x 18650 Battery Pack
- Description: A battery pack containing two 18650 batteries.
- Pins: vcc, gnd
Wiring Details
Arduino UNO
- 5V connected to 5V of L298N DC Motor Driver
- GND connected to GND of L298N DC Motor Driver and gnd of 2x 18650 Battery Pack
- D13 connected to IN1 of L298N DC Motor Driver
- D12 connected to IN2 of L298N DC Motor Driver
- D11 connected to ENA of L298N DC Motor Driver
- D5 connected to IN3 of L298N DC Motor Driver
- D4 connected to IN4 of L298N DC Motor Driver
- D3 connected to ENB of L298N DC Motor Driver
L298N DC Motor Driver
- 5V connected to 5V of Arduino UNO
- GND connected to GND of Arduino UNO and gnd of 2x 18650 Battery Pack
- IN1 connected to D13 of Arduino UNO
- IN2 connected to D12 of Arduino UNO
- ENA connected to D11 of Arduino UNO
- IN3 connected to D5 of Arduino UNO
- IN4 connected to D4 of Arduino UNO
- ENB connected to D3 of Arduino UNO
- OUT1 connected to pin 1 of DC Motor (Motor 2)
- OUT2 connected to pin 2 of DC Motor (Motor 2)
- OUT3 connected to pin 2 of DC Motor (Motor 1)
- OUT4 connected to pin 1 of DC Motor (Motor 1)
- 12V connected to vcc of 2x 18650 Battery Pack
DC Motor (Motor 1)
- pin 1 connected to OUT4 of L298N DC Motor Driver
- pin 2 connected to OUT3 of L298N DC Motor Driver
DC Motor (Motor 2)
- pin 1 connected to OUT1 of L298N DC Motor Driver
- pin 2 connected to OUT2 of L298N DC Motor Driver
2x 18650 Battery Pack
- vcc connected to 12V of L298N DC Motor Driver
- gnd connected to GND of L298N DC Motor Driver and GND of Arduino UNO
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:
}
Additional Documentation (documentation.txt)
This documentation provides a comprehensive overview of the circuit, including a summary, detailed component list, wiring details, and the code used in the Arduino UNO.
