Arduino UNO and L293D Motor Driver Shield-Based Battery-Powered Robotic Vehicle with Ultrasonic Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO, an L293D motor driver shield, multiple motors with reducers, HC-SR04 ultrasonic sensors, and a power source consisting of two 18650 Li-ion batteries. The circuit is designed to control the motors and read distance measurements from the ultrasonic sensors.
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
L293D Motor Driver Shield
- Description: A motor driver shield capable of driving four DC motors or two stepper motors.
- Pins: 5v, GND, A0, A1, A2, A3, A4, A5, M+, M2, M1, M3, M4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, gnd, Aref, ser1, Servo2, +, -, 9v
Motor with Reducer
- Description: A DC motor with a gear reducer.
- Pins: 3 - 6 VCC, GND
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND
18650 Li-ion Battery x 2
- Description: A power source consisting of two 18650 Li-ion batteries.
- Pins: +, -
Wiring Details
Arduino UNO
- Connected to L293D Motor Driver Shield:
- 5V to 5V
- GND to GND
L293D Motor Driver Shield
Connected to HC-SR04 Ultrasonic Sensor (Instance 1):
- 5V to VCC
- GND to GND
- A0 to TRIG
- A1 to ECHO
Connected to HC-SR04 Ultrasonic Sensor (Instance 2):
- 5V to VCC
- GND to GND
- A2 to TRIG
- A3 to ECHO
Connected to 18650 Li-ion Battery x 2:
- M+ to +
- GND to -
Connected to Motor with Reducer (Instance 1):
- M1 to 3 - 6 VCC
- M1 to GND
Connected to Motor with Reducer (Instance 2):
- M2 to 3 - 6 VCC
- M2 to GND
Connected to Motor with Reducer (Instance 3):
- M3 to 3 - 6 VCC
- M3 to GND
Connected to Motor with Reducer (Instance 4):
- M4 to 3 - 6 VCC
- M4 to GND
HC-SR04 Ultrasonic Sensor (Instance 1)
- Connected to L293D Motor Driver Shield:
- VCC to 5V
- GND to GND
- TRIG to A0
- ECHO to A1
HC-SR04 Ultrasonic Sensor (Instance 2)
- Connected to L293D Motor Driver Shield:
- VCC to 5V
- GND to GND
- TRIG to A2
- ECHO to A3
18650 Li-ion Battery x 2
- Connected to L293D Motor Driver Shield:
-
- to M+
-
- to GND
-
Motor with Reducer (Instance 1)
- Connected to L293D Motor Driver Shield:
- 3 - 6 VCC to M1
- GND to M1
Motor with Reducer (Instance 2)
- Connected to L293D Motor Driver Shield:
- 3 - 6 VCC to M2
- GND to M2
Motor with Reducer (Instance 3)
- Connected to L293D Motor Driver Shield:
- 3 - 6 VCC to M3
- GND to M3
Motor with Reducer (Instance 4)
- Connected to L293D Motor Driver Shield:
- 3 - 6 VCC to M4
- GND to M4
Documented Code
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO, with setup and loop functions defined but not yet implemented.