Arduino-Controlled Robotic Vehicle with LDR and IR Sensing Capabilities
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control a set of motors and wheels, an LDR (Light Dependent Resistor), an IR sensor, and a 5V mini water pump using an Arduino UNO microcontroller. The motors are driven by an L298N DC motor driver, which is powered by a 12V battery. The Arduino UNO is responsible for controlling the motor driver inputs and reading signals from the LDR and IR sensor. The 5V power required by the Arduino UNO and other 5V components is supplied by the Arduino's onboard voltage regulator.
Component List
Motor and Wheels
- Description: A set of motors attached to wheels, typically used for providing motion to robots or vehicles.
- Pins:
vcc,GND
DC Motor
- Description: A direct current motor that converts electrical energy into mechanical energy.
- Pins:
pin 1,pin 2
Arduino UNO
- Description: A microcontroller board based on the ATmega328P, widely used for building digital devices and interactive objects.
- Pins:
UNUSED,IOREF,Reset,3.3V,5V,GND,Vin,A0toA5,SCL,SDA,AREF,D0toD13
LDR (Light Dependent Resistor)
- Description: A sensor that changes its resistance based on the light intensity.
- Pins:
A0,D0,GND,VCC
IR Sensor
- Description: An infrared sensor used for detecting obstacles or measuring distances.
- Pins:
out,gnd,vcc
Battery 12V
- Description: A 12-volt battery used to provide power to the circuit.
- Pins:
+,-
L298N DC Motor Driver
- Description: A dual H-bridge motor driver that allows for the control of two DC motors.
- Pins:
OUT1,OUT2,OUT3,OUT4,12V,GND,5V,ENA,IN1,IN2,IN3,IN4,ENB
Resistor
- Description: A passive two-terminal electrical component that implements electrical resistance as a circuit element.
- Pins:
pin1,pin2 - Properties:
Resistance: 1000 Ohms
5V Mini Water Pump
- Description: A small pump that operates at 5 volts, used for moving water or other liquids.
- Pins:
positive pin,negative pin
Wiring Details
Motor and Wheels
vccconnected to L298N DC motor driverOUT4orOUT1GNDconnected to L298N DC motor driverOUT3orOUT2
DC Motor
- No wiring information provided.
Arduino UNO
5Vconnected to L298N DC motor driver5V, LDRVCC, IR sensorvcc, and 5V mini water pumppositive pinGNDconnected to LDRGND, IR sensorgnd, and 5V mini water pumpnegative pinA0connected to LDRA0D10connected to L298N DC motor driverENBD9connected to L298N DC motor driverIN4D8connected to L298N DC motor driverIN3D7connected to L298N DC motor driverIN2D6connected to L298N DC motor driverIN1D5connected to L298N DC motor driverENAD2connected to IR sensorout
LDR (Light Dependent Resistor)
A0connected to Arduino UNOA0VCCconnected to Arduino UNO5VGNDconnected to Arduino UNOGND
IR Sensor
outconnected to Arduino UNOD2vccconnected to Arduino UNO5Vgndconnected to Arduino UNOGND
Battery 12V
+connected to L298N DC motor driver12V-connected to L298N DC motor driverGND
L298N DC Motor Driver
OUT1,OUT2,OUT3,OUT4connected to Motor and WheelsvccandGND12Vconnected to Battery 12V+GNDconnected to Battery 12V-5Vconnected to Arduino UNO5VENA,IN1,IN2,IN3,IN4,ENBconnected to Arduino UNOD5,D6,D7,D8,D9,D10
Resistor
- No wiring information provided.
5V Mini Water Pump
positive pinconnected to Arduino UNO5Vnegative pinconnected to Arduino UNOGND
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:
}
Note: The provided code is a template and does not contain any functional code to control the circuit components. It needs to be populated with the appropriate setup and loop code to manage the inputs and outputs as per the circuit design.