Ultrasonic automatic braking RC car project

Ultrasonic braking is a method of collision avoidance, that can automatically brake a vehicle before an impact to the object. So, whenever any obstruction came in front of the vehicle the system simultaneously disengages the power transmission to the wheels and activates the braking.automatic braking system using arduino

The system works based on ultrasonic ranging technique, which is a non-contact ultrasonic distance measuring method. An ultrasonic braking system consists of an ultrasonic transducer or sensor unit, control unit and braking mechanism.

The sensor unit consists of a pair of ultrasonic transducers, a transmitter and a receiver.

The ultrasonic transmitter which has placed in the front of a vehicle will continuously transmit the ultrasonic waves in a predetermined range. The transmission transducer is driven by the square wave output generated by the Arduino. The output signals are amplified and fed to the transducer. The transducer generates ultrasonic waves, from a 40khz electrical signal.

ultrasonic braking system

The ultrasonic receiver placed parallel to the transmitter, receives the ultrasonic signals that get reflected back from the obstacle. Then the reflected wave has analysed by the Arduino. Then it checks whether the distance to the object is safe to move forward or the vehicle requires a braking. If the distance is less than the safe range, the system will activate the braking.

Refer : » Servo motor interfacing with Arduino

» Arduino Relay module interface

In the here system the Arduino turns the servo motor from an angle of 45 degrees to 0 degrees. And simultaneously it energizes the relay to disconnect the motor driving supply. The servo arm is mechanically arrangement to brake the shaft of the RC car. It is similar to a disc brake arrangement, that uses calipers to squeeze the pad against the disc attached to the axle. When the obstruction in front of the sensor unit has removed, the system returns to normal state. Then the servo returns back to 45 degrees and the relay to NC (normally closed) position. In the normal state, the vehicle can drive forward without any system interruption. The braking can also do by electrically without any mechanical arrangement, by shorting the motor terminals to brake mode.

The system can be interfaced with a pneumatic braking mechanism for advanced project applications.

Ultrasonic braking using HC-SR04 module

ultrasonic car servo braking

Code

#include <Servo.h>
Servo servo;
const int  trig = 2, echo = 3 , relay  = 7;
int distance = 20, normalpos = 40 , brakepos = 0;
// Minimum distance for braking 20 centimeters.
void setup()
{
 pinMode(trig, OUTPUT);
 pinMode(echo, INPUT);
 pinMode(relay, OUTPUT);
 servo.attach(9);
}
void loop()
{
 if (radar() < distance) {
   servo.write(brakepos);
   // servo shaft angle for apply brake.
   digitalWrite(relay, HIGH);
   // To disconnect motor supply
 }
 else {
   servo.write(normalpos);
   // servo shaft angle for release brake.
   digitalWrite(relay, LOW);
   // To reconnect motor supply
 }
}
long radar(void)
{
 digitalWrite(trig, HIGH);
 delayMicroseconds(15);
 digitalWrite(trig, LOW);
 long  dur = pulseIn(echo, HIGH);
 dur = dur / 58;
 return dur;
}
1 Star2 Stars3 Stars4 Stars5 Stars Rate Us!
Loading...

You may also like...

16 Responses

  1. Dom says:

    Hello, does this need any relay? I’m doing a project exactly looks the same as yours but mine is just to make the car (simple toy car) stop if there is an obstacle ahead. Does yours would act the same as mine?

    • admin says:

      yes, this project is similar and works same as yours. Here the relay is to disconnect the motor supply while applying the brake. The relay charges only if the obstruction is removed.

  2. Abdullah says:

    Do we need to use any motor driver module?

  3. Yaswanth says:

    Can i get the video to make it

  4. yaswanth says:

    can i use motor shield instead of relay module

  5. Yaswanth says:

    What is the code for L293D

  6. yaswanth says:

    i want circuit diagram with L293D

  7. Harshita Singhal says:

    Hii.. I am doing a similar type of model which stops when it senses an obstacle using ultrasonic sensor. I am using L298N motor driver module. Can you please help with the necessary arduino code and circuit diagram ?.

  8. Dhanu says:

    Can I get the video?

  9. Aadhar says:

    What relay did you use

Leave a Reply

Your email address will not be published. Required fields are marked *