Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

I.

Introduction
Proximity sensor is an instrumentation device that is utilized for
measuring distance from an object perpendicular to the device. It is utilized
primarily on detecting an object whether if it is near the device or not. The
boundary line between the near region and far region is programmable unto
the discretion of the user. Its function on the car is to help the driver avoid a
collision accident, which is the number one of the reasons of car accidents.
The proximity sensor is partnered with the LED array that acts as a bar graph
to display the distance of an object the device had measured. The sensor and
display is primarily controlled by a microcontroller to have a precise
measurement on the sensor state, and to display the distance measured. It is
also utilized to lessen the wirings needed and discrete components. To warn
the driver if the object is inside the near region, the beeper is utilized. Since
the drivers focus is on the road, he cannot constantly survey the display. The
beeper, if turned on, will notify the driver so that he can look at the display to
determine the nearness of the object to the car, hence, will avoid the collision
accident.
Voltmeter is also an instrumentation device that is utilized for
measuring potential difference between its probes. It is utilized primarily on
the application of car electrical system whether the current voltage of the car
battery is sufficient to supply the electrical needs of the engine starter. Its
function is to notify the driver the current state of the car battery whether the
electrical system will function normally or not. The voltmeter is on digital
form to give precise measurement in decimal basis.
Boost converter is a power supply that converts lower Direct Current
(DC) voltage into higher DC voltage. Its function on the car is to utilize the
power produced by the alternator to charge the battery and provides
electrical power to the electrical system. Boost converter can convert 10-32
Volts DC into 12-35 Volts DC which is an adjustable output provided that the
input voltage is less than the desired output voltage with a power of 150
Watts which is sufficient to charge the battery. Since the starter of the car can
act also as an alternator which is a dual purpose, the battery can be charged,
and also can power up the whole system.

II.

Features
1. Sensors Triangulation Method of measuring distance this method is
utilized in measuring distance because it is immune to color, direction,
and temperature of the object being measured.
2. Distance measurement range: 20 cm to 150 cm
3. LED array as bar graph it will display the distance measured from the
sensor as a bar graph within the measurement range.
4. Beeper it will get the attention of the driver as to look at the display
for the current distances.

5. Digital Voltmeter to notify the driver the current voltage state of the
car battery in decimal display.
6. Boost converter to convert the power from the alternator into usable
and stable DC voltage with an input voltage of 10-32 Volts DC to an
output voltage of 12-35 Volts DC which is adjustable.
III.

Block Diagram

Figure 3.1 Proximity System

Figure 3.2 Voltmeter System

Figure 3.3 Boost Converter System


IV.

Implementation

Figure 4.1 Proximity System Implementation (Near)

Figure 4.2 Proximity System Implementation (Far)


Figure 4.3 Voltmeter System Implementation

Figure 4.4 Boost Converter System


V.

Microcontroller Algorithm in Proximity System


1. Convert the analog signal of the sensor into digital signal
2. Convert the digital signal into voltage decimal representation
3. Convert the voltage decimal representation into the equivalent
distance set by the equation Distance = 3.218*exp(-3.486*voltage)
+1.036*exp(-0.6406*voltage)
4. Convert the distance value into bar graph language
5. Display the distance measured onto the LED bar graph

VI.

Microcontroller Program in Proximity System (in Arduino Language)


const int SHCP1=4;
const int STCP1=3;
const int SHCP2=7;
const int STCP2=6;
const int DS1=2;
const int DS2=5;
const int beepp=10;
int z[8];
int cc[4];
int cnt0=0;
float f;
float dist[4];
float volt[4];
int beep=0;
void shiftreg(int (*x)[8]);
void setup(){

Serial.begin(9600);
pinMode(SHCP1,OUTPUT);
pinMode(STCP1,OUTPUT);
pinMode(SHCP2,OUTPUT);
pinMode(STCP2,OUTPUT);
pinMode(DS1,OUTPUT);
pinMode(DS2,OUTPUT);
pinMode(beepp,OUTPUT);
digitalWrite(SHCP1,LOW);
digitalWrite(STCP1,LOW);
digitalWrite(SHCP2,LOW);
digitalWrite(STCP2,LOW);
digitalWrite(DS1,LOW);
digitalWrite(DS2,LOW);
digitalWrite(beepp,LOW);
}
void loop(){
for(int i=0;i<4;i++){
volt[i]=analogRead(i+1);
volt[i]=volt[i]*5.0/1023.0;
dist[i]=3.218*exp(-3.486*volt[i])+1.036*exp(-0.6406*volt[i]);
f=1.5-dist[i];
f=f/1.3;
if(f<0) cc[i]=0;
else cc[i]=f*8;
if(i<2){bargraph(cc[i],DS1,1); savecl(1);}
else {bargraph(cc[i],DS2,2); savecl(2);}
}
for(int i=0;i<3;i++){
if(cc[i]>=4) beep=1;
else beep=0;
}
if(beep==1&&cnt0<=200) digitalWrite(beepp,HIGH);
else if(beep==1) digitalWrite(beepp,LOW);
else {digitalWrite(beepp,LOW); cnt0=0;}
cnt0=cnt0+1;
if(cnt0>400) cnt0=0;
}
void transmit(int x,int y){
if(x==0) digitalWrite(y,LOW);
else if(x==1) digitalWrite(y,HIGH);
}
void savecl(int x){
switch(x){
case 1:
transmit(1,STCP1);
transmit(0,STCP1);

break;
case 2:
transmit(1,STCP2);
transmit(0,STCP2);
break;
}
}
void shiftreg(int x[8],int y,int z){
for(int i=8;i>=0;i--){
switch(z){
case 1:
transmit(0,SHCP1);
transmit(x[i],y);
transmit(1,SHCP1);
break;
case 2:
transmit(0,SHCP2);
transmit(x[i],y);
transmit(1,SHCP2);
break;
}
}
}
void bargraph(int x,int y,int x1){
switch(x){
case 1: z[0]=1; z[1]=0; z[2]=0; z[3]=0; z[4]=0; z[5]=0; z[6]=0; z[7]=0;
break;
case 2: z[0]=1; z[1]=1; z[2]=0; z[3]=0; z[4]=0; z[5]=0; z[6]=0; z[7]=0;
break;
case 3: z[0]=1; z[1]=1; z[2]=1; z[3]=0; z[4]=0; z[5]=0; z[6]=0; z[7]=0;
break;
case 4: z[0]=1; z[1]=1; z[2]=1; z[3]=1; z[4]=0; z[5]=0; z[6]=0; z[7]=0;
break;
case 5: z[0]=1; z[1]=1; z[2]=1; z[3]=1; z[4]=1; z[5]=0; z[6]=0; z[7]=0;
break;
case 6: z[0]=1; z[1]=1; z[2]=1; z[3]=1; z[4]=1; z[5]=1; z[6]=0; z[7]=0;
break;
case 7: z[0]=1; z[1]=1; z[2]=1; z[3]=1; z[4]=1; z[5]=1; z[6]=1; z[7]=0;
break;
case 8: z[0]=1; z[1]=1; z[2]=1; z[3]=1; z[4]=1; z[5]=1; z[6]=1; z[7]=1;
break;
default: z[0]=0; z[1]=0; z[2]=0; z[3]=0; z[4]=0; z[5]=0; z[6]=0; z[7]=0;
break;
}
shiftreg(z,y,x1);
}

VII.

Application
With these devices, we can now apply it for the safety factors of the
car in the race track. The proximity system is applied in avoiding collision
with the nearby cars without notifying the driver of the current situation as to
alert the driver. The voltmeter application is to check whether the electrical
system is functioning properly without the lacking features that has been
established into the car system. The boost converter application is to lessen
the probability of failure of the electrical system which is essential to the vital
functions of the car.

You might also like