Arduino UNO-Based DC Motor Controller with Current Sensing and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller, an ACS712 current sensor, a 16x2 I2C LCD, a DC power source, an L298N DC motor driver, and a DC motor. The Arduino UNO serves as the central controller, interfacing with the current sensor, LCD, and motor driver to monitor current and control the motor.
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
ACS712 Current Sensor 5A 20A 30A
- Description: A current sensor module that provides an analog voltage output proportional to the current passing through it.
- Pins: 1, 2, GND, OUT, VCC
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
DC Power Source
- Description: A power source providing DC voltage.
- Pins: Ground, Positive
L298N DC Motor Driver
- Description: A dual H-bridge motor driver module 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
- Description: A simple DC motor.
- Pins: pin 1, pin 2
Wiring Details
Arduino UNO
- 5V: Connected to VCC of ACS712 Current Sensor and VCC of 16x2 I2C LCD
- GND: Connected to GND of ACS712 Current Sensor and GND of 16x2 I2C LCD
- A3: Connected to OUT of ACS712 Current Sensor
- A4: Connected to SDA of 16x2 I2C LCD
- A5: Connected to SCL of 16x2 I2C LCD
- D9: Connected to IN1 of L298N DC Motor Driver
- D8: Connected to IN2 of L298N DC Motor Driver
- D3: Connected to ENA of L298N DC Motor Driver
ACS712 Current Sensor 5A 20A 30A
- 1: Connected to Positive of DC Power Source
- 2: Connected to 12V of L298N DC Motor Driver
- GND: Connected to GND of Arduino UNO
- OUT: Connected to A3 of Arduino UNO
- VCC: Connected to 5V of Arduino UNO
16x2 I2C LCD
- GND: Connected to GND of Arduino UNO
- VCC: Connected to 5V of Arduino UNO
- SDA: Connected to A4 of Arduino UNO
- SCL: Connected to A5 of Arduino UNO
DC Power Source
- Ground: Connected to GND of L298N DC Motor Driver
- Positive: Connected to 1 of ACS712 Current Sensor
L298N DC Motor Driver
- OUT1: Not connected
- OUT2: Not connected
- 12V: Connected to 2 of ACS712 Current Sensor
- GND: Connected to Ground of DC Power Source
- 5V: Not connected
- OUT3: Connected to pin 2 of DC Motor
- OUT4: Connected to pin 1 of DC Motor
- 5V-ENA-JMP-I: Not connected
- 5V-ENA-JMP-O: Not connected
- +5V-J1: Not connected
- +5V-J2: Not connected
- ENA: Connected to D3 of Arduino UNO
- IN1: Connected to D9 of Arduino UNO
- IN2: Connected to D8 of Arduino UNO
- IN3: Not connected
- IN4: Not connected
- ENB: Not connected
DC Motor
- pin 1: Connected to OUT4 of L298N DC Motor Driver
- pin 2: Connected to OUT3 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:
}
Additional Documentation (documentation.txt)