ADAS RC Car

This robot uses a combination of sensors and output devices to simulate features of an Advanced Driver Assistance System (ADAS). It includes four sensors:
- Ultrasonic Sensor (HC-SR04) to detect and avoid obstacles in front.
- Infrared Sensor (REES252) at the rear to detect motion or proximity for applications like parking and rear-collision alerts.
- Two Light Dependent Resistors (LDRs) to monitor ambient light and adjust lighting accordingly.
An Arduino Uno with a motor shield controls the robot's functions. The robot’s body is built on a steel chassis, powered by two DC motors, and includes output devices like LEDs and a buzzer for feedback. Breadboards and resistors are used for circuit assembly and voltage regulation. Overall, the robot demonstrates basic ADAS functionality, enhancing environmental awareness and adaptive responses.
Supplies
- Sensors:
- Ultrasonic Sensor HC-SR04(x1)
- Infrared Sensor REES252 (x1)
- Light Dependant Sensor(x2)
- Circuit Boards:
- Arduino Uno
- Motor Shield
- Breadboard:
- Small Breadboard(x1)
- Large Breadboard(x1)
- Output Devices:
- Red LED(x2)
- Blue LED(x2)
- Multicolour Led(x1)
- Active Buzzers(x1)
- Resistors:
- 330Ω Resistors(x4)
- Body:
- Steel Chassis (x1)
- Motors:
- DC Motors(x2)
What Is ADAS

ADAS refers to a set of electronic systems in vehicles that use advanced technologies to assist drivers in making safer decisions while driving. These systems rely on sensors, cameras, radar, LiDAR, and software algorithms to monitor the environment around the vehicle and either warn the driver or automatically take control of certain functions.
Main Objectives of ADAS:
- Enhance vehicle safety
- Reduce human errors
- Prevent accidents
- Provide
Use of ADAS
Collision Avoidance – Detects obstacles and helps prevent accidents by alerting the driver or automatically applying brakes.
Lane Departure Warning – Warns the driver if the vehicle unintentionally drifts out of its lane.
Adaptive Cruise Control – Maintains a safe distance from the vehicle ahead by adjusting speed automatically.
Blind Spot Detection – Alerts the driver to vehicles in the blind spot during lane changes.
Parking Assistance – Helps with safe parking by detecting objects around the vehicle.
Traffic Sign Recognition – Identifies and displays road signs like speed limits.
Automatic Headlight Control – Adjusts headlights based on surrounding light conditions.
Driver Monitoring – Detects signs of driver fatigue or distraction.
Working of Each Component
Ultrasonic Sensor HC-SR04: It is a sensor that is used to gauge the distance between the sensor and the object that is being scanned.
Infrared Sensor REES252: It is a sensor that is used to detect heat and the motion of an object.
Light Dependant Sensor: It is a sensor that is used to detect high intensity of light and then send the single back to the Arduino.
Arduino UNO &Motor Shield: These Circuit boards are used to control the motion of the robot and take inputs and give out outputs.
Breadboard: This is used to connect wires in serial or parallel, depending on the breadboard size.
Output Devices: This is used by the Arduino to express its out via LED or Active Buzzers.
Resistors: These are used to convert the 5V provided by the Arduino to a lower voltage that can be used by the output devices.
Function of the Robot as a whole:
The Ultrasonic sensor present at the front of the robot is used to detect the distance in front of it, and depending on the distance, make turns in order to avoid that obstacle.
The Infrared sensor present at the rear of the robot is used to detect any motion behind the robot. This has 2 applications.
- In parking systems to determine the distance between the car and the wall.
- In proximity system is used to detect if a car is too close to the rear of another car.
The Light Dependant Resistor is placed on the side of the robot it is used to detect the light conditions of the surroundings and accordingly change the lighting of the headlights and car interior accordingly.
Code
const int trigPin =A5;
const int echoPin = A4;
int a;
int b;
int c;
int d;
long duration;
int distance;
void init_motors(){
pinMode(5, OUTPUT);
pinMode(4, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(12, OUTPUT);
pinMode(8, OUTPUT);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
}
void forward(){
digitalWrite(4, HIGH);
digitalWrite(12, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
}
void reverse(){
digitalWrite(4, LOW);
digitalWrite(12, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
}
void right(){
digitalWrite(4, HIGH);
digitalWrite(8, HIGH);
digitalWrite(7, LOW);
digitalWrite(12, LOW);
}
void left(){
digitalWrite(7, HIGH);
digitalWrite(12, HIGH);
digitalWrite(4, LOW);
digitalWrite(8, LOW);
}
void left_forward(){
digitalWrite(12, HIGH);
digitalWrite(8, LOW);
digitalWrite(7, LOW);
digitalWrite(4, LOW);
}
void right_forward(){
digitalWrite(4, HIGH);
digitalWrite(8, LOW);
digitalWrite(7, LOW);
digitalWrite(12, LOW);
}
void right_reverse(){
digitalWrite(8, HIGH);
digitalWrite(7, LOW);
digitalWrite(12, LOW);
digitalWrite(4, LOW);
}
void left_reverse(){
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(4, LOW);
digitalWrite(12, LOW);
}
void stop(){
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(4, LOW);
digitalWrite(12, LOW);
}
void setup(){
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
pinMode(A0,INPUT);
Serial.begin(9600);
init_motors();
}
void loop(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
a=digitalRead(A0);
b=digitalRead(A1);
c=digitalRead(A2);
d=digitalRead(A3);
if(a==0)
{
digitalWrite(11,HIGH);
digitalWrite(10,HIGH);
}
else
{
digitalWrite(11,LOW);
digitalWrite(10,LOW);
}
if(c==1)
{
digitalWrite(5,HIGH);
digitalWrite(9,HIGH);
}
else
{
digitalWrite(5,LOW);
digitalWrite(9,LOW);
}
Serial.println(b);
if(distance>10){
digitalWrite(A3,HIGH);
}
else
{ digitalWrite(A3,LOW);}
if(distance<10){
digitalWrite(9,HIGH);
} else{
digitalWrite(9,LOW);
}
forward();
if(distance<10&&distance>0){
stop();
reverse();
left();
stop();
reverse();
left();
}
}
Downloads
Circuit Diagram



The above circuit is designed using TinkerCad software
Conclusion
In conclusion the robot has a total of 4 sensors which are currently being used in ADAS (Advance Driver Assistance Systems).This make the robot more aware of it surroundings and adapt accordingly.