Arduino UNO Battery-Powered Robotic Car with Force Sensing and Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, an L298N DC motor driver, force sensing resistors, pushbuttons, resistors, a 4xAA battery pack, and motors with wheels. The circuit is designed to control the motors based on inputs from the force sensing resistor and pushbuttons.
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 the speed and direction 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
Force Sensing Resistor
- Description: A resistor whose resistance changes when a force or pressure is applied.
- Pins: pin 0, pin 1
Resistor
- Description: A passive electrical component with a resistance of 220 Ohms.
- Pins: pin1, pin2
Pushbutton
- Description: A simple switch mechanism for controlling some aspect of a machine or a process.
- Pins: Pin 3 (out), Pin 4 (out), Pin 1 (in), Pin 2 (in)
4xAA Battery Pack
- Description: A battery holder for four AA batteries.
- Pins: POS, NEG
Motor and Wheels
- Description: A DC motor with attached wheels.
- Pins: vcc, GND
Wiring Details
Arduino UNO
- A0: Connected to pin1 of the Resistor.
- GND: Connected to GND of the Arduino UNO, NEG of the 4xAA battery pack, and GND of the L298N DC motor driver.
- 3.3V: Connected to pin 0 of the Force Sensing Resistor.
- D5: Connected to Pin 3 (out) of the first Pushbutton.
- D4: Connected to Pin 3 (out) of the second Pushbutton.
- D3: Connected to Pin 3 (out) of the third Pushbutton.
- 5V: Connected to 5V of the L298N DC motor driver.
- D11: Connected to IN4 of the L298N DC motor driver.
- D10: Connected to IN3 of the L298N DC motor driver.
- D9: Connected to IN2 of the L298N DC motor driver.
- D8: Connected to IN1 of the L298N DC motor driver.
- D7: Connected to ENB of the L298N DC motor driver.
- D6: Connected to ENA of the L298N DC motor driver.
L298N DC Motor Driver
- 5V: Connected to 5V of the Arduino UNO.
- GND: Connected to GND of the Arduino UNO and NEG of the 4xAA battery pack.
- 12V: Connected to POS of the 4xAA battery pack.
- IN4: Connected to D11 of the Arduino UNO.
- IN3: Connected to D10 of the Arduino UNO.
- IN2: Connected to D9 of the Arduino UNO.
- IN1: Connected to D8 of the Arduino UNO.
- ENB: Connected to D7 of the Arduino UNO.
- ENA: Connected to D6 of the Arduino UNO.
- OUT1: Connected to vcc of the second Motor and Wheels.
- OUT2: Connected to GND of the second Motor and Wheels.
- OUT3: Connected to GND of the first Motor and Wheels.
- OUT4: Connected to vcc of the first Motor and Wheels.
Force Sensing Resistor
- pin 0: Connected to 3.3V of the Arduino UNO.
- pin 1: Connected to pin2 of the Resistor.
Resistor
- pin1: Connected to A0 of the Arduino UNO.
- pin2: Connected to pin 1 of the Force Sensing Resistor.
Pushbutton (First)
- Pin 1 (in): Connected to GND of the Arduino UNO.
- Pin 3 (out): Connected to D5 of the Arduino UNO.
Pushbutton (Second)
- Pin 1 (in): Connected to GND of the Arduino UNO.
- Pin 3 (out): Connected to D4 of the Arduino UNO.
Pushbutton (Third)
- Pin 1 (in): Connected to GND of the Arduino UNO.
- Pin 3 (out): Connected to D3 of the Arduino UNO.
4xAA Battery Pack
- POS: Connected to 12V of the L298N DC motor driver.
- NEG: Connected to GND of the Arduino UNO and GND of the L298N DC motor driver.
Motor and Wheels (First)
- vcc: Connected to OUT4 of the L298N DC motor driver.
- GND: Connected to OUT3 of the L298N DC motor driver.
Motor and Wheels (Second)
- vcc: Connected to OUT1 of the L298N DC motor driver.
- GND: Connected to OUT2 of the 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)