Build A Digital Tachometer
By Robert Nance Dee
This project arose from the need to tell, accurately, the speed of a
small machine. After completing the Tach-Plus I found many other
uses for it. Modelers’ for instance, can use it to check propeller speeds
and it comes in handy when I have to set my generator to 3700 rpms.
To increase its versatility a turn counter has been added for those
of you who wish to count turns on coil winding machines or lathes.
Besides this, it can be employed to monitor things as diverse as turntables,
lathe tool post grinders and windmills.
Theory:
The Tach-Plus works by monitoring the time it takes for a spinning
shaft or object, to make one complete revolution. It does this by ‘reading’
a reflective strip of aluminum tape placed on a rotating surface. Any point
on a wheel will take equal time to revolve to its original position. This
is why slow spinning windmills with massive blades have such tremendous
terminal tip velocities. The tip runs at a much greater velocity to keep
it in line with the much slower velocity of the core.
Once we know the time it takes to make one revolution we can then determine
the frequency or how many turns in a given period of time our spinning
object makes. Keep in mind that at 20 rpms it will take three seconds for
a displayed reading and at 15,000 rpms for instance, it will only take
four milliseconds.
The turn counter section of the Tach-Plus counts each time the reflective
strip passes the sensor.
How it works:
At the heart of the Tach Plus is an Atmel AT90S2313 microchip running
at 4 megahertz. It takes care of the math and coordinates the switches.
The firmware, that is, the program code that makes the chip work is availible
for download from the Poptronics web site or a preprogrammed chip is availible
from Design Specialties (see parts sources).
Power for the circuit is supplied from either a nine volt battery or
an external wall transformer through jack J2. Bridge rectifier D3 allows
the use of a wall transformer with either a positive or a negative tip,
this means that it’s not possible to have the wall transformer backwards,
although the nine volt battery must have correct polarity.
U3 regulates the incoming voltage to plus 5 volts for the ICs and display.
R1 and C1 with U1D form a forty-kilohertz oscillator that is inverted
by U1E and U1F to drive transistor Q1 and establish D4’s path to ground.
D4 is powered by 5 volts through Q2 and is controlled by the 2313 chip,
U2 pin 3. This is done to save power. The emitter diode is only powered
when reading the reflective strip off a rotating object.
On the detection side inductors LI and L2 have a low inductive reactance
to DC, which is represented by daylight. This essentially stops daylight
from affecting the sensor. The forty-kilohertz pulse from the IR emitter
diode reflects a high inductive reactance through the inductors and we
sense this at pin 3 of the LM358 op amp U4A. U4A amplifies the relatively
small signal from D2 twenty times and this signal passes through C5 to
block any DC offset from the opamp before reaching the rectifier circuit
comprised of D6, D5, C2 and R6.
This rectified signal passes through the second half of U4 in a DC
state and is amplified twenty times again before reaching U1A the schottky
inverter which cleans up the signal before sending it to the 2313 microchip
U2 pin 6.
You may wonder why if we are using an infared diode we need to be concerned
with daylight. Both daylight and artificial light are rich in infared radiation
and while we could shield the sensor from strong light we would have to
reduce its amplification to prevent false triggering in all but the dimmest
light. This would greatly reduce the distance our Tach-Plus would be able
to effectively measure the reflective strip. As a test, with D2 out of
the circuit, place the leads from a voltmeter (use a low DC voltage scale)
across D2 and move the sensor towards then away from a standard light bulb.
As you do this, watch the meter reading change.
Construction:
I have gone to great lengths to make the Tach-Plus as easy to construct
as possible. No special lenses or optics are required and there are no
costly or dangerous laser diodes used. There are no critical pots or adjustments
and all the parts are availible from electronic suppliers.
I built the Tach-plus on a 2.70 inch by 3.90 inch double sided circuit
board which is availible from Design Specialties (see parts section). The
board fits inside a Radio Shack case (#270-213) but any case you might
have that fits the board will work as well. It is possible to build the
circuit without a PC board but I strongly advise following the general
parts layout to keep stray noise to a minimum. I also recommend building
the circuit to a larger scale if you do not make your own pc board or purchase
one.
For those of you making your own pc boards the traces have been kept
thick (.030”) and no traces run between IC pins. While many hobbyists can
make double-sided boards most can’t make plated through holes to connect
opposite side board traces. So to limit the number of vias parts have been
used to connect traces from and to different board layers. Make sure all
the parts are in before testing as some traces may not be connected. Also
make sure the two vias that were placed, isolated from components, are
through connected. Notice also that the components sitting flat on the
top layer have no top traces to solder. It’s best to solder the IC sockets
in first and the display and switches in last.
The display attaches to the top of the board with a fourteen-pin sip
socket. Solder the connector to the board with about a sixteenth of an
inch showing and on the other end with the same distance showing through
the display board. When this is done the display should be just higher
than any other objects on the board excepting the indicator diode D1 that
extends through the case.
Please study illustration 1 carefully as it will help in the
setting up and aligning of the sensor and emitter for best performance.
Notice that the sensor is mounted slightly above the circuit board. This
will allow you to adjust it a small amount if any corrections are needed.
Substiting other devices for D2 and D4 is not reccomended. They have
been chosen very carefully.
Switches S1 and S2 have the pins removed to make them momentary push
button. To do this pull spring on the front of the switch forward and remove
the short wire partially held in place by it. The switch should no longer
lock when pushed in. The wire can be replaced should the need arise.
Test and Troubleshooting:
Before inserting the ICs in their sockets power up the unit and
check for plus 5 volts on pin 20 of the 2313 microchip (U2). Insert the
ICs and press the power switch. The display should show either ‘Rpms’ or
‘Turn Counter’ depending on the position of S3. An unlit display may mean
U2 is not working. Check its oscillator or the leads to the display for
shorts or opens. With the HOLD/RUN switch released move your hand up and
down in front of the sensor. The red indicator LED (D1) should light. If
it does not determine if the sensor side or the emitter side is not funtioning.
The Tach-Plus sensor circuitry has been designed with a forty-kilohertz
oscillator, which is the same frequency, as most IR remote controls. Place
a remote control from a TV or VCR in front of the sensor and press any
button on it. (It’s best to trouble shoot in the TURNS position because
in the RPM position the IR diode is more tightly controlled by U2.) The
indicator light should flash. If it does, the trouble is in the emitter
side of the circuit. Check the emitter of Q2 for about 5 volts to find
out if U2 pin 3 is turning on the transistor. Make sure the HOLD
switch is in the RUN position, as U2 will turn off Q2 in the HOLD position.
Check both oscillators if you have an oscilloscope or frequency counter
to make sure they are working. U2’s clock frequency at pins 4 and 5 is
4 megahertz and the sensor circuitry is 40 kilohertz measured at pin 8
of U1. Check for solder bridges also. Again, the PC board has been laid
out without any traces passing through IC pins to facilitate assembly and
hopefully, eliminate this problematic area in home construction.
Make sure the sensor and the emitter are correctly inserted (Illustration
2 shows their correct polarity). Also, check the polarity of the electrolytic
capacitors.
The two coils (L1 and L2) can be inserted in any direction but
the diodes D5 and D6 must be inserted correctly. The band indicates the
cathode of these devices and the board is marked with a ‘K’ to show their
proper direction.
Check a malfunctioning sensor circuit by moving a piece of aluminum
foil infront of the sensor and emitter. Place a voltmeter on pin 5 of U4B
while doing this. The voltage should vary from zero to about 3 volts. Pin
two of U1A should vary from zero to 5 volts at the same time and pin six
of U2 should also vary from zero to 5 volts.
Do not place both the emitter and the sensor behind a clear plastic
face. The sensor is much too sensitive and will pick up the slightest light
from the IR emitting diode. Dark plastic lenses from old remotes for instance,
are not reccomended as they will shorten the working distance of the instrument.
Final check:
Cut a two-inch round disk out of cardboard or index card.
Scotch tape a strip of 1/4 or 3/8 inch aluminum foil, shinny
side out, to it from the center to an outside edge. (See illustration 2).
It is not necessary to blacken the background of the card. Now attach the
disk to a small hobby motor and the leads from the motor to a variable
power supply.
Vary the speed of the motor with the power supply and point the
Tach-Plus towards the spinning disk until the indicator light blinks on
and off. A constant on indicates that you are to close to the disk and
a constant off indicates that you are to far away. With the indicator
flashing move the Tach-Plus until you get a consistent reading. An inconsistent
reading can be caused by too much of the emitter diode unshielded by the
shrink tubing or metalic objects reflecting the D4’s emissions into the
sensor.
A four to eight inch distance should yield the best results.
You can adjust the emitter to achieve this . Make all of your adjustments
before you place the circuit in any case or container. This will also separate
case troubles from circuit troubles. Make sure there is at least a 5/8”
high by 1” wide window in front of the sensor D2.
Another display can be used but resistor R13 may have to be
changed to correct for display brightness.
The distance the Tach-Plus works from can be shortened by increasing
the value of R2.
The sensor and emitter can be remotely mounted also. To do this
set them on a small piece of ‘perf’ board and house the unit in PVC
pipe. Blacken the inside with magic marker. Use a shielded cable from the
sensor / emitter to the circuit.
Using the Tach-Plus:
Examine the Switch Function chart for each switch use.
The best reflector material is aluminum tape used for ductwork.
Most good hardware stores or plumbing supply houses sell this tape. Cut
a strip of one quarter to three eight inch tape about an inch long and
place it on the spinning shaft or object. (See illustration 2).
Readings are held in the display (latched) for one half a second
before being updated. Again, remember that at twenty rpms the display will
show ’20 rpms’ for 3 -1/2 seconds and at twenty thousand rpms for one half
a second before being updated.
As previously stated, the Tach-Plus should work well from four
to eight inches away from the spinning object. While it has excellent light
immunity, outside readings in strong daylight will shorten the reading
distance. It is best in these applications to stand with the sun behind
you. Also, don’t point the sensor directly into the sun.
The turn counter works best if temporarily or permanently
mounted to hold it stationary during use. The best location for the instrument
can be found by reading a slowly turning shaft, prepared with a reflective
strip, while making sure no false turns occur. False turns can result from
being to close or too far away from the metalic strip. While a shaft for
reading turns or rpms, does not have to be completely black make sure there
are no shiny places on it that can reflect false emissions from D4 into
the sensor.
The power consumption with the instrument reading is about 20 ma. ,
with it stopped about 50 ma. and in the HOLD position about 12 ma. So after
taking a reading it’s best to push the HOLD / RUN switch if no more readings
are immediately required. While using the turn counter for long periods
a wall transformer is suggested as current draw is about 50 ma. during
this application.
The turn counter is designed to work at a relatively slow speed.
However, it will function to about one thousand turns per minute.
The Tach-Plus has been tested mechanically to over thirty five
thousand rpms. The accuracy should be within a few parts per ten thousand
at the worst, well within most needs. I have found that the AC motors in
my house run fast and my turntable could take up to a minute to reach the
proper speed.
SWITCH FUCTION:
POSITION OUT IN
HOLD / RUN: RUN Reads or counts
HOLD Press momentarily (one to
20 ma. drain
two read cycles). Holds
last reading.
About 12 ma. drain.
Press RESET to restart
run cycle
RESET: RESET
Resets Tach-Plus waits
for next reflective pass.
50 ma. drain
RPMS /TURNS: RPMS Reads rpms
TURNS Reads turns. Maximum
20 ma. drain
speed is about 1000
rpms. 50 ma. drain
ON / OFF
OFF Power off
ON Power on. Waiting for
Reflective reading.
50 ma. drain.
-------------------------------------------------------------------
Acknowledgements:
Bruce Reynolds of Reynolds Electronics for his IR help.
Robert Nance Dee
Delhi, NY, August 2001
-------------------------------------------------------------------------
BOM (Bill of Materials):
1 1
.001uF C1
2 3
.1uF C2,C5,C6
3 2
22pF C3,C4
4 2
470uF C7,C8
5 1
.01uF C9
6 1
indicator D1
7 1
detector D2 *(DO
NOT SUBSTITUTE)
LTR-516AD
8 1
DB103 D3
9 1
emitter D4 *(DO NOT SUBSTITUTE)
OED-EL-8L
10 2
1N914A D5,D6
11 1
DISP1 L167100J (MOUSER ELECTRONICS))
12 1
CONN J1
13 1
Wall Jack J2
14 2 82mH CHOKE
L1,L2
15 2
PN2222A Q1,Q2
16 2
47k R1,R7
17 1
39 R2
18 2
1k R3,R15
19 4
10k R4,R9,R11,R12
20 1
470 R5
21 1
22k R6
22 1
1Meg R8
23 1
10k R10
24 1
680 R13
25 1
390 R14
26 1
1Meg R16
27 1
S1
28 1 SWPB_DPDT
S2
29 1 SWPB_DPDT
S3
30 1 SWPB_DPDT
S4
31 1 40106
U1
32 1 AT90S2313
U2
33 1 78L05
U3
34 1 LM358N
U4
35 1 4.0
Mhz XTAL1