Microcontrollerapplication
Microcontrollerapplication
MICROCONTROLLER
BY:
HARINI.R
HARSHENI.S
RAJA MEENAKSHI.V
1
DIGITAL SPEEDOMETER
2
INDEX :
● OBJECTIVE
● SCOPE
● PROBLEM DEFINITION
● SURVEY
● EXISTING MODEL/SYSTEM
● PROPOSED SYSTEM
● REQUIREMENT ANALYSIS
● IMPLEMENTATION
● CONCLUSION
3
OBJECTIVE :
● The main objective is to design a speedometer that measures the
speed of a rotating object.
4
SCOPE :
● The speedometer can be used by all automobile industries
● They can be used by all automobiles like bikes,cars etc to measure
the speed of the vehicle efficiently.
5
PROBLEM DEFINITION :
● This speedometer aims at replacing analog to digital.
● Since analog is difficult to use we replace it by digital
speedometer.
6
SURVEY :
7
EXISTING MODEL/SYSTEM :
8
PROPOSED SYSTEM :
9
PROPOSED SYSTEM (CONT) :
10
REQUIREMENT ANALYSIS :
11
COMPONENTS REQUIRED :
● PIC16F877A
● 7805 Voltage Regulator
● Hall Effect Sensor (US1881/04E)
● 16*2 LCD display
● A small piece of magnet
● Connecting wires
● Capacitors
● Breadboard.
● Power supply
12
ARCHITECTURE :
13
ALGORITHM :
● Once the time taken is known we can calculate the
RPMby using the below formulae, Where 1000/time
taken will give us the RPS and further multiplying it
with 60 will give you the RPM
rpm = (1000/timetaken) * 60;
● Where (1000/timetaken) gives the rps (Revolutions per
second) and it is multiplied by 60 to convert rps to rpm
(Revolutions per minute).
The value is also multiplied with 0.37699 since we know that Velocity =
(RPM (diameter * Pi) / 60). The formulae is simplified down to
15
ALGORITHM (CONT) :
● Once we calculate the velocity we can also calculate the distance covered
by using a similar method.
● With our Hall and magnet arrangement we know that how many times
the wheel have rotated.
● We also know the radius of the wheel, using which we can find the
circumference of the wheel, assuming the radius of the wheel to be
0.3m(R) the values of circumference Pi*R*R will be 0.2827.
16
ALGORITHM (CONT) :
● This means that for every time the hall sensor meets the magnet a
distance of 0.2827 meters is covered by the wheel.
● Distance_covered = distance_covered + circumference_of_the_circle
17
IMPLEMENTATION:
TRISD = 0x00;
TRISB0 = 1;
OPTION_REG = 0b00000101;
TMR0=100;
TMR0IE=1;
GIE=1;
PEIE=1;
INTE = 1;
void interrupt speed_isr() {
if(TMR0IF==1) {
TMR0IF=0;
milli_sec++;
}
18
IMPLEMENTTION (CONT) :
if (INTF==1)
{
rpm = (1000/milli_sec) * 60;
speed = 0.3 * rpm * 0.37699;
INTF = 0;
milli_sec=0;
distance= distance+028.2;
}
}
19
CONCLUSION :
● Thus the digital speedometer helps us to measure the speed of the
vehicle per minute.
● Further the future advancement includes features like calculating
the speed of the vehicle per second.
20