Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital Tachometer Project

Not open for further replies.


New Member
Okay, here's the rundown:

I'm a undergrad mechanical engineering student and am taking a basic circuits course for non-electrical majors. We've been assigned a cumulative final project and I have chosen to build a simple digital tachometer.

The idea is to light an array of LEDs based on relative motor speed (something like you would see on the steering wheel of a high performance car). The faster the motor is running, the greater number of lit LEDs.

I'm not so interested in finding the actual RPM of the motor, simply the speed relative to the max or min. For example, if the motor is running at 75% of the max speed, 75% of the LEDs will be lit.

My group has access to a 3V Olimex microcontroller/development board.

Here's where I need some help: I'm a bit unsure as to what sort of sensor I will need to read off RPMs (likely not greater than 1500). I'd like to do this as cheap as possible since, after all, it's only for a simple project.

I was perhaps thinking about some sort of light sensor (like the ones in the Lego Mindstorms kits) with a white/black cylinder or disc. The sensor would read a stripe of the opposite color. I would consider hacking a LEGO sensor, but I'm not sure if it is capable of reading fairly fast transitions between colors (something around 350 RPM). Perhaps someone can shed some light (Ha, no pun intended)?

People have also suggested potentiometers and encoders. So far, encoders have been fairly expensive (and I have no idea how to tell if they're compatible with the microcontroller). As for potentiometers, I've only seen them used in volume knob-like applications. Would a pot be viable in a high(er)-speed (again, somewhere around 350 RPM) application?

This will all be mounted to a small (likely DC) motor which will be turning a flywheel and a simple 3-speed LEGO transmission.

So, I suppose the shortlist is this:
- Cheap
- Compatible with the microcontroller
- At least a 20 RPM resolution (I'd like perhaps 10 LEDs covering the range of 350 RPM)
- Can be mounted on something small (think Lego motor)

I think that's about it for now. Any info would be awesome, thanks in advance!
Last edited:
I did a project like this for my final exam about 4 years ago. I used 4 7-segment leds wich would display up to 9999 RPM. I used a motor as well, but it wasn't with a uC.

You can prob use a OPB829CZ and add a circular metal plate to the motor with a notch on it and connect that to the uC. You have to do some math to calculate the RPM.

I will look for my project and if I can find it I will scan a copy for you. My project worked pretty well. I was running of 120V AC then converting to DC using transformer and a 5V regulator, etc...etc...but it should be a lot simpler for you since you are using a pic.

a pot would be way easier as well.
Last edited:
For me I am rather fond of the LM2907 Frequency to voltage converter IC's.
By turning a variable frequency that can be derived from a rather wide range of possible sources into a proportional voltage its easier for for most A/D converters to work with.

As far as sensing goes these IC's can work well with simple photo interrupter or reflector senors and small magnetic sensors as well.
Using an off the shelf digital volt meter a full digital readout can also be made eliminating the need for a uC in order to work.

Just some thoughts.


  • LM2907 F V CONVERTER.pdf
    710.2 KB · Views: 712
A simple approach is to use an LM3914 bar-graph driver which will light 10 LEDs proportional to an analog input signal. You can generate the voltage with a frequency to voltage converter such as the LM2917. The frequency is generated by an optical or magnetic pickoff of the shaft speed.
This is awesome info guys, thanks a bunch.

I did a quick search on Google for photo interrupters and see prices ranging from $1.00 to $50.00. What sort of effect on performance does the price have? About how much would I have to spend for a project like mine?

Edit: It seems like the more expensive ones are proprietary parts for scanners and printers... Would I be able to get away with something like this?
Last edited:
You can get a photo interruptor for free from old equipment;

old (ball) mice - 2
FAX machines - 2 or 3 (used as paper detectors)
VCR recorders - 2 (under the drive spools)
CD and DVD drives - 1 used to detect drawer-in
hey drkidd22 that link dosn't get me any info. just a picture and descripion??
I have a use for such a device (schematic)

Is the use of digital solutions mandatory??

If not, use another small Per-Mag motor as a "tach generator". They can be had at "3 for a buck". (sometimes) 3 volt battery operated toy motors....

It will provide a reasonably linear voltage output, proportional to shaft speed. Put a small cap across the output to take out the commutator noise and use a series of comparators to drive the LEDs.(a la LM3914)

If the resultant circuit MUST be digital, use a small cap to pick off the commutator spikes and amplify them into a pulse train. Normally, there will be three per revolution, possibly five with better quality motors.

The first technique is still in use on large industrial motors. I have personally worked on such up to 500 HP.
yes digital is mandatory in my situational.
never thought about a cheap motor having communators
will investigate further
In the original post, PhotoNinja also states that his circuit needs to be compatible with a micro. If that's the case, the analog methods using LM2907's and LM3914's may not be suitable either.

im newbie here..erm..ive done assembling my own digital tachometer circuit using lm2917..when i tested i found that the led wont lit up unless i touched the resistor (470ohm) using my finger.. i wonder why this is happen..plz help me find solution..

**broken link removed**
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips