STEP 1 / 6ELECTRONICS

Microcontroller-Based Tachometer

A speedometer is just a simple digital electronic transducer. Usually, it is used to measure how fast a shaft is moving. The number of rotations per minute (rpm) is important to know in o…

Microcontroller-Based Tachometer - source illustration from page 240
PROJECT#125
TRACKElectronics
PARTS07
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

Microcontroller-Based Tachometer is a electronics project. A speedometer is just a simple digital electronic transducer. Usually, it is used to measure how fast a shaft is moving. The number of rotations per minute (rpm) is important to know in o…

Source pages
239-242
Named parts
7
Build goal
Working, tested prototype
02

Tools you need

  • Digital multimeter
  • Wire stripper and side cutters
  • Soldering iron with a fine tip
  • Current-limited bench supply

Use eye protection, good lighting, and a clean insulated surface throughout the build.

03

Safety precautions

  • Disconnect every power source before changing a connection.
  • Check component polarity, pinout, and supply voltage twice.
  • Use a current limit for the first power-up.
  • This project may involve hazardous voltage. Work only with qualified supervision and proper isolation.
Ready to continue?
STEP 2 / 6 · Parts library

Gather, identify, and understand every part.

Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.

NAMED PROJECT INVENTORY7 PART LINES
PARTTYPEQTYREADY
POperational amplifierPART1
What's this?Image, role, pros, cons, handling & specifications
Microcontroller-Based Tachometer - source illustration from page 240PART LEARNING VIEW

Operational amplifier

A named project component whose exact role is defined by the source circuit and build guide.

What it does here

It performs a documented electrical, control, interface, or construction function in this project.

Buy / compare this part

Advantages

  • Selected for this project
  • Can be checked independently
  • Supports modular troubleshooting

Limitations

  • Substitutes may differ
  • Generic names can hide variants
  • Pinouts and ratings vary

Handling

  • Compare the received part with the source
  • Keep it labelled
  • Do not force connectors or adjusters

Specifications to verify

  • Use the exact model, value, package, and rating listed for Operational amplifier; similar-looking parts are not always interchangeable.
  • Confirm dimensions, ratings, connection method, polarity, and environmental limits.
PTIP-ONPART1
What's this?Image, role, pros, cons, handling & specifications
Microcontroller-Based Tachometer - source illustration from page 240PART LEARNING VIEW

TIP-ON

A named project component whose exact role is defined by the source circuit and build guide.

What it does here

It performs a documented electrical, control, interface, or construction function in this project.

Buy / compare this part

Advantages

  • Selected for this project
  • Can be checked independently
  • Supports modular troubleshooting

Limitations

  • Substitutes may differ
  • Generic names can hide variants
  • Pinouts and ratings vary

Handling

  • Compare the received part with the source
  • Keep it labelled
  • Do not force connectors or adjusters

Specifications to verify

  • Use the exact model, value, package, and rating listed for TIP-ON; similar-looking parts are not always interchangeable.
  • Confirm dimensions, ratings, connection method, polarity, and environmental limits.
S2N2222SEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
PN2222A NPN RF transistorSEMICONDUCTOR LEARNING VIEW

2N2222

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for 2N2222; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
PNETWORKPART1
What's this?Image, role, pros, cons, handling & specifications
Microcontroller-Based Tachometer - source illustration from page 240PART LEARNING VIEW

NETWORK

A named project component whose exact role is defined by the source circuit and build guide.

What it does here

It performs a documented electrical, control, interface, or construction function in this project.

Buy / compare this part

Advantages

  • Selected for this project
  • Can be checked independently
  • Supports modular troubleshooting

Limitations

  • Substitutes may differ
  • Generic names can hide variants
  • Pinouts and ratings vary

Handling

  • Compare the received part with the source
  • Keep it labelled
  • Do not force connectors or adjusters

Specifications to verify

  • Use the exact model, value, package, and rating listed for NETWORK; similar-looking parts are not always interchangeable.
  • Confirm dimensions, ratings, connection method, polarity, and environmental limits.
SULN2003SEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
Microcontroller-Based Tachometer - source illustration from page 240SEMICONDUCTOR LEARNING VIEW

ULN2003

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for ULN2003; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
ST5 - transistor stage identified in the circuitSEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
Microcontroller-Based Tachometer - source illustration from page 240SEMICONDUCTOR LEARNING VIEW

T5 - transistor stage identified in the circuit

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for T5 - transistor stage identified in the circuit; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
PVR1 - preset potentiometer identified in the circuitPART1
What's this?Image, role, pros, cons, handling & specifications
10kΩ preset potentiometerPART LEARNING VIEW

VR1 - preset potentiometer identified in the circuit

A named project component whose exact role is defined by the source circuit and build guide.

What it does here

It performs a documented electrical, control, interface, or construction function in this project.

Buy / compare this part

Advantages

  • Selected for this project
  • Can be checked independently
  • Supports modular troubleshooting

Limitations

  • Substitutes may differ
  • Generic names can hide variants
  • Pinouts and ratings vary

Handling

  • Compare the received part with the source
  • Keep it labelled
  • Do not force connectors or adjusters

Specifications to verify

  • Use the exact model, value, package, and rating listed for VR1 - preset potentiometer identified in the circuit; similar-looking parts are not always interchangeable.
  • Confirm dimensions, ratings, connection method, polarity, and environmental limits.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. Keep motors, relays, pumps, and other loads on a suitable driver and external supply.

Common mistakes

Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.

Troubleshoot

Disconnect loads, continuity-test one path at a time, then test with a current limit.

02

Software preparation

No IDE, board package, library, or firmware upload is required for this project.

If you add a programmable controller as an extension, document its pin map separately.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

Power up safely

  • Inspect unpowered continuity first
  • Apply the lowest safe current limit
  • Measure supply rails before signals
  • Add one load at a time
  • Record expected and actual results
TROUBLESHOOT

Work from simple to complex

  • Confirm power, ground, polarity, and orientation
  • Compare each pin with the source
  • Test inputs separately from outputs
  • Replace only one variable at a time
  • Power off before every correction
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

A speedometer is just a simple digital electronic transducer. Usually, it is used to measure how fast a shaft is moving. The number of rotations per minute (rpm) is important to know in order to understand any system that moves. For example, there is an ideal speed for drilling a hole of a certain size in a piece of metal. There is also an ideal speed for sanding, which depends on the material being finished. You might also want to measure how fast your fans spin. This microcontroller-based tachometer is easy to make and can measure the rpm of most shop tools and many household machines without a mechanical or electrical connection. Working of a microcontroller-based tachometer Fig. 1: Circuit of microcontroller-based tachometer Just point the light-sensitive probe tip on top of the spinning shaft toward the spinning blade, disk, or chuck and read the rpm. The only rule is that you must first put down a mask of a different color. On the thing that is spinning, a strip of white adhesive tape would work well. Set it up so that as the object turns, the amount of light that is reflected from its surface changes. When the tape spins past the probe, the phototransistor picks up the momentary rise in light that comes back from the tape. The 4-digit, 7-segment display shows the rpm, which is calculated by the signal processor and microcontroller circuit. It does this by counting the increase in the number of these light reflections that it senses. The phototransistor is kept in a plastic tube with a convex lens on one end. A common part used by watch repairmen and in cine film viewer toys is a convex lens with a

diameter of about 1 cm and a focal length of 8 to 10 cm. They can give it to you so you can set up the experiment. The phototransistor is attached to a piece of cardboard so that it is about 8 cm away from the lens. The phototransistor's leads are taken off and put into the circuit shown in Fig. 1. Figure 2 shows how a phototransistor should be set up. The signal that is picked up is amplified by the transistor 2N2222 (T5) and then amplified even more by the operational amplifier CA3140 (IC3). The operational amplifier's reference voltage point is found by a resistor divider network made up of R2 and R3. Pin 6 of IC3 is connected to pin 12 of AT89C2051, which is a microcontroller. Note that the inputs (+ and -) of the microcontroller AT89C2051's internal analog comparator are pins 12 and 13. A potential divider made up of resistor R7 and preset VR1 is used across the supply to set Pin 13 to almost half the supply voltage. Fig. 2: Suitable arrangement of phototransistor The AT89C2051's internal comparator picks up the pulses picked up by the phototransistor. Each pulse represents one rotation of the object, so each pulse is seen as a rotation. By counting how many of these pulses there are on average per minute, the RPM can be found. It is shown by a software program that tells the 4-digit, 7- segment display's LEDs to light up.

02

Circuit description

Project build note

In Fig., you can see how the tachometer with a microcontroller works. The tachometer has an AT89C2051 microcontroller, a ULN2003 high-current Darlington transistor

array, a CA3140 operational amplifier, a common-anode 7-segment (4-digit multiplexed) display, and four anode-driving transistors. The AT89C2051 is an 8-bit microcontroller with 20 pins that is made by Atmel Corporation. It is part of Intel's 8051 family. Input pins 1 through 7 of the ULN2003 are connected to port-1 pins P1.7 through P1.2 and port-3 pin P3.7. The 10-kilohm resistor network RNW1 is used to pull up the pins on Port-1. They use internal inverters to power all seven segments of the display.

Ready to continue?
PROJECT ACHIEVED

You built Microcontroller-Based Tachometer.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

Temperature Control & Indicator System project thumbnail featuring Transformer, Temperature sensor, ATMEGA8535
NEXT ELECTRONICS ADVENTURE

Temperature Control & Indicator System

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects