0% found this document useful (0 votes)
84 views4 pages

PIC 16F72 Based Contactless Tachometer: Mudit Aggarwal

This document describes how to build a contactless tachometer using a PIC16F72 microcontroller and proximity sensor. The tachometer counts the pulses from the proximity sensor detecting a rotating shaft's reflective disk to measure revolutions per minute (RPM) without physical contact. It displays the RPM reading on a 7-segment LED and can measure up to 0999 RPM over 60 seconds. The circuit diagram and component layout are provided.

Uploaded by

01ei55
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views4 pages

PIC 16F72 Based Contactless Tachometer: Mudit Aggarwal

This document describes how to build a contactless tachometer using a PIC16F72 microcontroller and proximity sensor. The tachometer counts the pulses from the proximity sensor detecting a rotating shaft's reflective disk to measure revolutions per minute (RPM) without physical contact. It displays the RPM reading on a 7-segment LED and can measure up to 0999 RPM over 60 seconds. The circuit diagram and component layout are provided.

Uploaded by

01ei55
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CONSTRUCTION

PIC 16F72 Based EM TESTED


EM TESTED

Contactless Tachometer EM TES


TED

MUDIT AGGARWAL
A tachometer (also called a revolution-counter, IR Transmitter
&MUDIT
Receiver AGARWAL
rev-counter, or RPM gauge) is an instrument that
measures the rotation speed of a shaft or disk, as in
a motor or other machine. The device usually Tachometer
Rota
ting S
haft
ssed
IR Pa
displays the revolutions per minute (RPM). Reflective Disk

Tachometers on automobiles, aircraft, and other


vehicles show the rate of rotation of the engine's
crankshaft, and typically have markings indicating
IR Transmitter
a safe range of rotation speeds. This can assist the & Receiver
driver in selecting appropriate throttle and gear
IR Reflected
settings for the driving conditions. Prolonged use at haft
Tachometer Reflective Disk ting S
high speeds may cause excessive wear and other IR Pa
ssed Rota

damage to engines. This is more applicable to


manual transmissions than to automatics. This
article describes how to build a contact -less
tachometer (device used to count the revolutions the picture. Those pulses will be fed to the
per minute of a rotating shaft) using a PIC16F72 microcontroller and counted. A tachometer is a
microcontroller and a proximity Sensor. As the digital transducer and is used to measure the speed
name implies, what makes this device special, is of the rotating device. The number of revolution per
that it can very accurately measure the rotational minute is an impotent paramete for a rotating
speed of a shaft without even touching it. This is very device.This is an easy contactless RPM meter which
interesting when making direct contact with the uses photoelectic phenomenon. Here an IR LED
rotating shaft is not an option or will reduce the and IR Diode is used as transmitter and receiver.
velocity of the shaft giving faulty readings. This Place the rotationg disk in front of this proximity
device is built on an PIC16F72 microcontroller, sensor and make a cut in the disk so that light can
and Common Cathod Seven Segment display and pass from it and the place where is no cut on the
and a proximity sensor to detect the rotation of the rotating disk reflect light, this light which is reflected
shaft whose speed is being measured. Pin diagram is received by the IR diode.
of seven segment common cathode display is This signal is amplified by OP amp and applied to a
shown in figure 1. pin of microcontroller, microcontroller count the
The idea behind tachometers, is a micro-controller, number of pulses and displyed on seven segment
used to count the pulses coming from a sensor or display. There is a button for RPM measurement. It
any other electronic device. In the case of this can measures maximnum value 0999 RPM. The
tachometer, the counted switch SW1(DWN),is used to start the
a
pluses will come from measurement(60 second) or the counting process.
f g b
g f C a b
proximity sensor, which When the switch is pressed, the device measures
.
O
M
e C
Dot
will detect any reflective the RPM of the shaft under test, and constantly
d
element passing i updates the reading on the Seven Segment LED
display.
C
O
.
e d M c
. nfront of it, and thus, will
give an output pulse for Circuit diagram of PIC16F72 Based
Contactless Tachometer is shown in figure 2.
each and every rotation
Fig. 1:Pin Diagram of Seven of the shaft, as show in Component Layout of PIC16F72 Based
Segment Display Contactless Tachometer is shown in figure 3 and
CONSTRUCTION

#DEFINE setu PORTB.F2


#DEFINE sclk PORTB.F3
#DEFINE sdta PORTB.F4
g f a b g f a b g f a b org0x00
goto init
org0x04
init:
e d c • e d c • e d c •
Bcf STATUS,RP0
clrf GPIO
+
movlw 0x07
+5 V DC
20 18 movwf CMCON
VDD 17 2.2K
16 2.2K bcf INTCON,GIE
15 2.2K
4.7K
14 2.2K bsf STATUS,RP0
1 13 2.2K
MCLR
12 2.2K movwf OSCCAL
2.2K
movlw 0xF8
25
24 movwf TRISIO
23

2.2K
PIC16F72 bcf STATUS,RP0
22pf Movlw 0x01
9
movwf contor
4MHZ

28
10 call led_ini
8
22pf GND
Count
loop
19 GND
call act
11 movlw 0x74
+ +5 V DC + +5 V DC + +5 V DC call act
movlw 0x40
IR Diode
10K call act
IR LED
5 8 movlw 0xD2
+
1K 10K Lm358
7 4.7K call act
LED
10K
6
- 4 Bc547
movlw 0xD0
call act
2.2K
movlw 0xCD
call act
movlw 0xBA
call act
call pause
call set_timer
12V Transformer
movf contor, W
+5 V DC
D2 D1 7805
+ call halta
1 3
230V 1N4007
2 bcf T1CON,0
A.C. 1000uf
D3 D4
.1uf .1uf movf TMR1L,W
movwf LO_count
movf TMR1H,W
movwf HI_count
bcf blank,0
Fig.2. Circuit diagramPIC16F72 Based Contactless Tachometer movlw 0x27
movwf count3
movlw 0x10
PCB layout of PIC16F72 Based movwf count2
Contactless Tachometer is shown in figure 4. call convb
movlw 0x03
movwf count3
Software movlw 0xE8
list p=16f72 movwf count2
#include pic116f72 call convb
__CONFIG _MCLRE_OFF & _CPD_OFF &_CP_OFF & clrf count3
_PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT & movlw0x64
_BODEN_OFF movwfcount2
cblock 0x20 callconvb
count1 clrfcount3
count2 movlw0x0A
count3 movwfcount2
count4 callconvb
Transo clrfcount3
buff movlw0x01
LO_count movwfcount2
HI_count bsfblank,0
blank callconvb
contor call led_home
endc call timp
CONSTRUCTION

movfcount3,W
2.2k subwfHI_count,W
2.2k btfssSTATUS,C
2.2k gotoconv_end
Count 2.2k btfssSTATUS,Z
2.2k gotoconv_low
2.2k movfcount2,W
2.2k subwfLO_count,W
DIGIT1 DIGIT2 DIGIT3 2.2k btfssSTATUS,C
gotoconv_end
12V AC

2.2k
LED
conv_low:
+
movfcount3,W
4.7k subwfHI_count,F
PIC16f72 movfcount2,W
1000uf/25v 14n007

1 subwfLO_count,F
4mhz btfssSTATUS,C
J1 decfHI_count,F
1n4007

.1uf .1uf
14n007
14n007

incfcount1,F
+
+

J2 bsfblank,0

10k
22pf 22pf gotoconv_high
+

1 23 Ir Diode conv_end:
4.7k 7805 movlw0xB0
10k a addwfcount1,W
a btfssblank,0
Ir LED
A
+

LED1 movlw0xA0
10K movwfbuff
Bc547 Lm358 callpush_led
1k
IR LED
2.2k

return
1 led_home
call act
movlw0x74
Actual size Components layout callact
movlw0x80
callact
movlw0x02
callact
return
push_led:
movlw0x74
callact
movlw0x40callact
movfbuff,W
callact
return
set_timer:
clrfT1CON
clrfTMR1L
clrfTMR1H
clrfINTCON
bsfSTATUS,RP0
clrf PIE1
bcf STATUS,RP0
clrf PIR1
movlw 0x03
movwf T1CON
return
led_ini:
movlw0x74
callact
movlw0x00
callact
movlw0x01
callact
movlw0x21
callact
Actual size PCB layout
movlw0xA0
callact
goto loop
movlw0x07
clrfcount1
callact
CONSTRUCTION

movlw0x24 movlw0x01 movwfcontor


callact callact calliict
movlw0x0F movlw0x0C movlw0x74
callact callact callact
movlw0x06 calliicp movlw0x80
callact return callact
calliict act: movlw0x1C
movlw0x74 movwf transo callact
callact movlw0x1C
movlw0x80 Movlw 0x08 callact
callact movwf count3 calliicp
movlw0x40 vbitbcfsclk callpause
callact callpause calliict
movlw0x40 btfsc transo,7bsfsdta movlw0x74
callact btfss transo,7 callact
movlw0x00 bcfsdta movlw0x40callact
callact callpause movlw0xB0
movlw0x00 bsfsclk addwfcontor,Wcallact
callact call pause calliicp
movlw0x00 bcfsclk gototset
callact call pause tset6
movlw0x00 rlftranso,f movlw0x01
callact decfsz count3,f movwfcontor
movlw0x00 gotovbit calliict
callact callackp movlw0x74
movlw0x00 return callact
callact iicpbcfsdtacallpause movlw0x80
movlw0x00 bsfsclk callact
callact callpause movlw0x10
movlw0x00 bsfsdta callact
callact callpause calliicp
movlw0x00 bcfsclk callpause
callact callpause calliict
movlw0x00 return movlw0x74
callact iictbsfsdta callact
movlw0x00 bsfsclk movlw0x40callact
callact callpause movlw0xB0
movlw0x00 bcfsdtacallpause addwfcontor,Wcallact
callact bcfsclk calliicp
movlw0x00 callpause tsetcallhaltb
callact return btfsssetu
movlw0x00 ackpbsfsclkcallpause gototset1
callact bcfsclk callhaltb
movlw0x00 callpause btfsssetu
callact return gototset1
movlw0x00 timpcalliict callhaltb
callact movlw0x74 btfsssetu
movlw0x00 callact gototset1
callact movlw0x40callact return
movlw0x00 movlw0xC2callact Pausemovlw0x10 movwfcount2
callact movlw0xE1 d2decfszcount2,Fgoto d2 return
movlw0x00 callact haltbmovlw0xFA
callact movlw0xFA movwfcount1
movlw0x00 callact j1movlw0xFA movwfcount2
callact movlw0xE1callact j2nop
movlw0x00 movlw0xBAcallact decfszcount2,Fgoto j2decfszcount1,Fg o t o
callact movlw0xB0 j1return
movlw0x00 addwfcontor,Wcallact Haltamovwfcount4
callact movlw0xF3 r4movlw0x04
movlw0x00 callact movwfcount3
callact calliicp r3movlw0xFA
movlw0x00 callhaltb movwfcount1
callact btfscsetu r1movlw0xFA movwfcount2
movlw0x74 gototset r2nop
callact tset1movlw0x01 decfszcount2,Fgoto r2decfszcount1,Fg o t o
movlw0x00 subwfcontor,W r1decfszcount3,F goto r3 d e c f s z
callact btfssSTATUS,Z count4,F goto r4 return
movlw0x30 gototset6 End
callact movlw0x06

You might also like