we have developed very basic prototype to reduced horn usage which we can describe in technical term as bluetooth & ultrasonic sensor controlled car to car communication.
it's very basic prototype that can only present very basic level of reduced horn system but it can describe what's the purpose of this idea and how actual important it is;
so let'sexplore this idea///
First, if you're not familiar with arduino learn stuff from arduino ide as well
as its website, and make yourself compatible with sensors, modules etc
HARDWARE:Divide all the parts in different perspective.
- Arduino LCD interfacing
- Arduino ultrasonic sensor interfacing
- Arduino to bluetooth module
1.Arduino LCD interfacing
NOTE:
make sure that your 3rd pin (contrast) of lcd must be connected with resistor of 1k ohm or simple adjust with potentiometer. otherwise your lcd won't workout properly. it will only blink.
2. Arduino ultrasonic sensor interfacing
check it as distance measurement
3. Arduino to bluetooth module
check it for Tx and Rx pin,, is it working or sending data to arduino properly or not??
if all the above worked out..(1/3) of the work is completed.
Assemble all the parts as below diagram, Your hardware part completed, you can move for program uploading in arduino uno.
Circuit Diagram:
Below code won't work if you do just copy and paste!!
Note:You need to add header file liquidcrystal for LCD. if you have done arduino lcd interfacing part. also you need to define pin above void setup as ultrasonic pins. make sure your pin before enter in code, otherwise it won't work out.
As our code below you could understand approach of what we are trying to do
- if distance of car is so close it will automatically print("alert")
- else if you want to send predefined message just press "2"
#define trigPin 8
#define echoPin 12
#define led 13
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(13,OUTPUT);
lcd.begin(16,2);
lcd.setCursor(0,0);
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
pinMode(led,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
long duration,distance;
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
duration=pulseIn(echoPin,HIGH);
distance=(duration/2)/29.1;
Serial.print(distance);
int temp=1;
while(Serial.available()!=NULL || (distacne&&temp)!=0)
{
data =Serial.read();
if (data=='1' || distance<=30)
{
lcd.print("Alert");
digitalWrite(led,HIGH);
delay(10000);
lcd.clear();
}
else if(data=='2')
{
lcd.print("please,move");
digitalWrite(led,HIGH);
delay(10000);
lcd.clear();
}
temp--;
}
}
you can add more functions using bluetooth if you did arduino to bluetooth module connection as per our instruction and try to use on different way.
So that's it for this project solution!!
So many things left out as problem fixing of this technology(real time implementation)- what if multiple car stand on traffic
- 2 cars send on same other car
- what about encryption(security purpose)
- what if our module isn't working(worst case)
- what other module we can use to get accurate communication
Ayush shah( Team Leader)
Mit patel
Prashant ranpura
*it takes lot of efforts and hardworking due to short durationof time on this project
you can explore more on this project if you have time and solution.
don't forget who startedcomment if you have any query
thanks...
Comments
Please log in or sign up to comment.