Arduino-Controlled Robotics Platform with IR Sensors and Ultrasonic Distance Measurement
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit is designed to interface an Arduino UNO with various sensors and actuators, including IR sensors, an HC-SR04 Ultrasonic Distance Sensor, a Tower Pro SG90 servo, and four hobby motors through an L298N DC motor driver. A 12V battery powers the system, with a step-down regulator providing voltage regulation. The IR sensors are used for detecting obstacles, the ultrasonic sensor measures distance, the servo can be used for steering or other rotational control, and the motors drive the main mechanism of the application. The Arduino UNO serves as the central processing unit, controlling the sensors and actuators based on the programmed logic.
Component List
IR Sensors
- Description: Infrared sensors used for obstacle detection.
- Pins:
out,gnd,vcc.
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins:
UNUSED,IOREF,Reset,3.3V,5V,GND,Vin,A0toA5,SCL,SDA,AREF,D0toD13.
L298N DC Motor Driver
- Description: Module for controlling up to two DC motors with direction and speed control.
- 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.
HC-SR04 Ultrasonic Distance Sensor
- Description: Sensor for measuring distances using ultrasonic waves.
- Pins:
VCC,TRIG,ECHO,GND.
12V Battery
- Description: Power source for the circuit.
- Pins:
+,-.
Regulator Stepdown DC XL4015 CC CV
- Description: Voltage regulator for stepping down the voltage to a desired level.
- Pins:
IN +,IN -,OUT +,OUT -.
Hobby Motors
- Description: DC motors used for driving mechanisms.
- Pins:
vcc,GND.
Tower Pro SG90 Servo
- Description: Servo motor for precise angular control.
- Pins:
Signal,+5V,GND.
Wiring Details
IR Sensors
- VCC: Connected to the 5V power rail.
- GND: Connected to the ground rail.
- OUT: One sensor's output connected to Arduino's
A3, another toA0.
Arduino UNO
- GND: Connected to the ground rail.
- Vin: Connected to the L298N DC motor driver's
5Vpin. - A0, A3: Connected to the IR sensors' outputs.
- D5, D6, D7, D8, D9, D10, D11, D12, D3: Connected to the L298N motor driver's control pins and the HC-SR04 sensor's
TRIGandECHOpins, and the servo'sSignalpin.
L298N DC Motor Driver
- GND: Connected to the ground rail.
- 5V: Connected to Arduino's
Vin. - 12V: Connected to the output of the voltage regulator.
- IN1, IN2, IN3, IN4: Controlled by Arduino's digital pins
D7,D8,D9,D10. - ENA, ENB: Controlled by Arduino's digital pins
D5,D6. - OUT1, OUT2, OUT3, OUT4: Connected to the hobby motors.
HC-SR04 Ultrasonic Distance Sensor
- VCC: Connected to the 5V power rail.
- GND: Connected to the ground rail.
- ECHO: Connected to Arduino's
D12. - TRIG: Connected to Arduino's
D11.
12V Battery
- +: Connected to the input of the voltage regulator.
- -: Connected to the ground rail.
Regulator Stepdown DC XL4015 CC CV
- IN +: Connected to the 12V battery's
+. - IN -: Connected to the 12V battery's
-. - OUT +: Connected to the L298N motor driver's
12V. - OUT -: Connected to the ground rail.
Hobby Motors
- VCC: Connected to the L298N motor driver's output pins
OUT1,OUT2,OUT3,OUT4. - GND: Connected to the ground rail.
Tower Pro SG90 Servo
- Signal: Connected to Arduino's
D3. - +5V: Connected to the 5V power rail.
- GND: Connected to the ground rail.
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional logic. It needs to be populated with the specific commands to control the components as per the circuit design.