The document describes a digital tachometer circuit built using a PIC microcontroller, infrared diode and detector. The circuit non-contactly measures the RPM of a rotating object like a fan or motor shaft. It works by using the IR detector to sense pulses from the IR diode as the object interrupts their path. The PIC microcontroller times the period between these pulses to calculate RPM using an algorithm. The RPM is then displayed on an LCD screen. The circuit provides an accurate, non-contact way to measure rotational speed.
3. A tachometer is a tool that mechanics or
engineers in general use very often.
A good example is on cars, you will see a
tachometer counting the RPMs of your engine.
With the new smaller microcontrollers and
some simple circuitry, it's actually very easy to
build your own digital tachometer. This
tutorial will make use of an infrared diode and
detector to build the digital tachometer/rpm
counter.
4. Digital tachometer are classified into following
types
Contact type
A tachometer that need a physical contact
with rotating shaft.
Contact less type
A tachometer that does not need any
physical contact with the rotating shaft.
5. Time measurement:
It calculate the speed by measuring the time
interval between incoming pulses.
The resolution of this type is independent of
the speed of measurement.
It is more accurate for measuring low speed.
6. Frequency measurement:
It calculate the speed by measuring the
frequency interval between incoming pulses.
The resolution of this type is dependent of the
speed of measurement.
It is more accurate for measuring low speed.
It has more efficiency.
7.
8.
9. Anytime a pulse is detected the PIC will interrupt
the current software and run a special subroutine
to take note that the change on the signal occurred.
Now, if we keep track of how often that change
occurs using a timer, we can estimate the
instantaneous RPMs, making a digital tachometer.
The actual output signal from the photo-
interruptor portion of the circuit will look similar
to what you see above. The length of the +5 pulses
are determined by how long the emitter and
detector are interrupted.
11. Variable resistor:
In our project variable resistor are used to control the
contrast of LCD and to adjust the voltage of pulse
generated from the IR sensor.
IR Emitter:
The IR Emitter device sends an infrared signal just
like any normal LED lights up a room.
The difference is you won't see any light shinning
from the IR Emitter because our eyes cannot see it.
IR Detector:
The IR Detector will detect if any infrared light is
being shined at it.
If IR light shines at the detector, it allows current
to pass through it to ground.
13. Why we don't used the IR sensor instead of LDR.
The reason is that while using the LDR all visible
lights are detected on the LDR and it will may
effect our calculation.
While the IR sensor will only detect Infrared light.
16x4 LCD:
14. CCP MODULE:
CCP stands for Compare/Capture/PWM
Capture Mode, allows timing for the duration of
an event. This circuit gives insight into the current
state of a register which constantly changes its
value.
Compare Mode compares values contained in two
registers at some point. One of them is the timer
TMR1 register.
PWM – Pulse Width Modulation can generate
signals of varying frequency and duty cycle.
PIC18F452 have 1 CCP and 1 ECCP(Enhanced CCP)
15. Steps used to program in capture mode for
measuring time period of a pulse.
In capture/Compare mode TIMER1 or TIMER3 is
used.
In PWM mode TIMER2 is used.
For C18 Code of this Project Contact Us on
INSTAGRAM as @electrical_engineers_
16. Let me explain the overall theory of how the
circuit and microcontroller will work to achieve
our goal of building an rpm counter. The IR
circuit will output pulses whenever it is
interrupted (this type of IR circuit is also known
as a 'photo-interruptor' circuit).
Electrically, the photo-interrupter is two
independent parts - the IR LED, and the photo-
transistor.
17.
18. OUT1 will go LOW when the LED light is
detected by IR sensor.
OUT2 will go HIGH when the LED light is
detected by IR sensor.
19.
20. By timing the generated pulse period by the
infra red reflective object sensor we could
easily calculate the RPM using this following
formula:
Frequency = 1/T Hz; T is the generated pulse
period in second.
RPM (Rotation per Minute) = Frequency x 60
21. This circuit can be used to calculate speed of
rotating wheels, discs and motor shafts.
This circuit can be used at places where direct
contact with motor shafts or wheels is not
possible to be made, as in case of vehicles and
also in industrial machines.
This circuit can be used at homes to check
speed of small battery operated fans and other
motor based devices.
22. The main limitation of this project is that IR
sensor for measuring the RPM need to be kept
very close to the moving object.
Also the IR sensor used in this project have
some limitations of maximum switching
frequency. So we can measure RPMS with in
that limitations.
23. For C18 Code of this Project Contact us
on INSTAGRAM as
@electrical_engineers_