Circuit details The full circuit details for the LED Strobe and Tachometer is shown. It consists of a PIC16F88-I/P microcontroller (IC1), a 16×2 LCD module and not much else. So, in spite of the seemingly complex operation, the circuit itself is really very simple.
Most of the ‘smarts’ are hidden inside the micro, which is really the heart of the circuit. It runs at 20MHz using crystal X1 as its timebase, and this signal is also divided by four to derive the 5MHz oscillator that’s used for the RPM calculations.
In operation, IC1 monitors the external trigger signal (if one is present) at its RB0 input (pin 6), while RB1, RB3 and RB2 monitor the Up, Down and Mode switches respectively. In addition, IC1’s AN4 analogue port monitors the position of potentiometer VR1, which is used for fine RPM adjustments.
Note that RB1 to RB3 have internal pull-up resistors, so these inputs are normally pulled high to +5V. When a switch is closed, the associated input is pulled to 0V and so IC1 can detect this button press.
IC1 also directly drives the LCD module. RA0 to RA3 are the data outputs, while RB6 and RB7 drive the register select and enable lines respectively. Trimpot VR2 sets the display contrast voltage.
When IC1 is operating in trigger mode, the signal applied to the RB0 input (pin 6) is used as the trigger for RPM measurements. This input is protected from excessive current using a 1kW series resistor, while a
1nF capacitor filters out any transient voltages to prevent false counts.
The external trigger circuit is connected via a 3.5mm jack socket and is fed with a +5V rail via the socket’s
ring terminal and a 2.2W resistor. The tip carries the external trigger signal and in the absence of signal, is pulled high via a 10kW pull-up resistor to the +5V rail.
Potentiometer VR1 is connected across the 5V supply and the wiper (moving contact) can deliver any voltage from 0V to 5V to the AN4 analogue input of IC1. IC1 converts this input voltage to a digital value to set the fine frequency adjustment over a 100 RPM range (but only when IC1 is operating in the generator mode).
Note that the operational range of VR1 has been deliberately restricted to 0.54V to 4.46V. This has been done because potentiometers often have abrupt resistance changes towards the ends of their travel. Using a 0.54V to 4.46V range ensures that the more linear section of the potentiometer is used.