Arduino UNO Controlled Battery-Powered DC Motor System with L298N Drivers and Encoders
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control multiple DC motors with encoders using two L298N DC motor drivers and an Arduino UNO. The motors are powered by a Lipo Battery, and the Arduino UNO is used to control the motor drivers. The circuit includes connections for power, ground, and control signals between the components.
Component List
L298N DC Motor Driver
- Description: Dual H-Bridge motor driver capable of driving 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 with Encoder
- Description: DC motor with an integrated encoder for feedback.
- Pins: Encoder B, Encoder A, GND - Encoder, VCC - Encoder Power, Motor +ve, Motor -ve
Arduino UNO
- Description: 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
Lipo Battery
- Description: Rechargeable lithium polymer battery.
- Pins: VCC, GND
GND
- Description: Ground connection.
- Pins: GND
Comment
- Description: Placeholder for comments.
- Pins: None
Wiring Details
L298N DC Motor Driver (1)
- OUT1 connected to Motor +ve of DC Motor with Encoder (4)
- OUT2 connected to Motor -ve of DC Motor with Encoder (4)
- 12V connected to VCC of Lipo Battery
- GND connected to GND of Lipo Battery, GND, and GND of Arduino UNO
- OUT3 connected to Motor +ve of DC Motor with Encoder (3)
- OUT4 connected to Motor -ve of DC Motor with Encoder (3)
- ENA connected to D11 of Arduino UNO
- IN1 connected to D13 of Arduino UNO
- IN2 connected to D12 of Arduino UNO
- IN3 connected to D9 of Arduino UNO
- IN4 connected to D8 of Arduino UNO
- ENB connected to D10 of Arduino UNO
L298N DC Motor Driver (2)
- OUT1 connected to Motor +ve of DC Motor with Encoder (2)
- OUT2 connected to Motor -ve of DC Motor with Encoder (2)
- 12V connected to VCC of Lipo Battery
- GND connected to GND of Lipo Battery, GND, and GND of Arduino UNO
- OUT3 connected to Motor +ve of DC Motor with Encoder (1)
- OUT4 connected to Motor -ve of DC Motor with Encoder (1)
- ENA connected to D5 of Arduino UNO
- IN1 connected to D7 of Arduino UNO
- IN2 connected to D4 of Arduino UNO
- IN3 connected to D3 of Arduino UNO
- IN4 connected to D2 of Arduino UNO
- ENB connected to D6 of Arduino UNO
DC Motor with Encoder (1)
- Motor +ve connected to OUT3 of L298N DC Motor Driver (2)
- Motor -ve connected to OUT4 of L298N DC Motor Driver (2)
DC Motor with Encoder (2)
- Motor +ve connected to OUT1 of L298N DC Motor Driver (2)
- Motor -ve connected to OUT2 of L298N DC Motor Driver (2)
DC Motor with Encoder (3)
- Motor +ve connected to OUT3 of L298N DC Motor Driver (1)
- Motor -ve connected to OUT4 of L298N DC Motor Driver (1)
DC Motor with Encoder (4)
- Motor +ve connected to OUT1 of L298N DC Motor Driver (1)
- Motor -ve connected to OUT2 of L298N DC Motor Driver (1)
Arduino UNO
- GND connected to GND of Lipo Battery, GND, and GND of L298N DC Motor Driver (1) and (2)
- D11 connected to ENA of L298N DC Motor Driver (1)
- D13 connected to IN1 of L298N DC Motor Driver (1)
- D12 connected to IN2 of L298N DC Motor Driver (1)
- D9 connected to IN3 of L298N DC Motor Driver (1)
- D8 connected to IN4 of L298N DC Motor Driver (1)
- D10 connected to ENB of L298N DC Motor Driver (1)
- D5 connected to ENA of L298N DC Motor Driver (2)
- D7 connected to IN1 of L298N DC Motor Driver (2)
- D4 connected to IN2 of L298N DC Motor Driver (2)
- D3 connected to IN3 of L298N DC Motor Driver (2)
- D2 connected to IN4 of L298N DC Motor Driver (2)
- D6 connected to ENB of L298N DC Motor Driver (2)
Lipo Battery
- VCC connected to 12V of L298N DC Motor Driver (1) and (2)
- GND connected to GND of L298N DC Motor Driver (1) and (2), GND, and GND of Arduino UNO
GND
- GND connected to GND of Lipo Battery, GND of L298N DC Motor Driver (1) and (2), 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:
}
Documentation (documentation.txt)