Homemade tachometer. DIY car tachometer DIY speed meter

What is it anyway tachometer? A tachometer is a device used to measure the RPM (revolutions per minute) of any rotating body. Tachometers are made on the basis of contact or non-contact ones. Non-contact optical tachometers typically use a laser or infrared beam to monitor the rotation of any body. This is done by calculating the time taken for one rotation. In this material, taken from an English site, we will show you how to make a portable digital optical tachometer using Arduino Uno. Let's consider an extended version of the device with an LCD display and a modified code.

Tachometer circuit on a microcontroller

Schematic parts list

  • Microcircuit - Arduino
  • Resistors - 33k, 270 ohm, 10k potentiometer
  • LED element - blue
  • IR LED and Photodiode
  • 16 x 2 LCD screen
  • 74HC595 shift register

Here, instead of a slot sensor, an optical one is used - reflection of the beam. This way they don't have to worry about the thickness of the rotor, the number of blades won't change the reading, and it can read the drum revolutions - which the slot sensor cannot.

So first of all you will need an IR emitting LED and a photodiode for the sensor. How to assemble it is shown in step-by-step instructions. Click on the photo to enlarge the size.

  • 1. First you need to sand the LED and photodiode to make them flat.
  • 2. Then fold the strip of paper sheet as shown in the picture. Make two such structures so that the LED and photodiode fit tightly into it. Connect them together with glue and paint them black.
  • 3. Insert LED and photodiode.
  • 4. Glue them together with superglue and solder the wires.

Resistor values ​​may vary depending on which photodiode you are using. The potentiometer helps to reduce or increase the sensitivity of the sensor. Solder the sensor wires as shown in the figure.

The tachometer circuit uses a 74HC595 8-bit shift register with a 16x2 LCD display. Make a small hole in the housing to fix the LED indicator.

Solder a 270 ohm resistor onto the LED and insert it into pin 12 of the Arduino. The sensor is inserted into a cubic tube to give additional mechanical strength.

That's it, the device is ready for calibration and programming. You can download the program from this link.

Video of a homemade tachometer working

A simple universal tachometer on the ATtiny2313 microcontroller

This simple tachometer on the ATtiny2313 can count the number of revolutions of any engine, be it multi-phase, multi-stroke, etc. It can be useful in automobiles and motorcycles to display engine speed. In this case, it does not matter at all how many strokes or cylinders the engine has. It can also be used in conjunction with electronic motor controllers, either single or three phase.

The tachometer circuit is very simple - one ATtiny2313 microcontroller and a four-character LED indicator. For simplicity purposes, there are no transistor switches. The indicator can be used with both a common cathode and a common anode - this is selected in the source code. The tachometer can count revolutions per second as well as per minute, making it completely versatile.

Additionally, the device has the ability to programmatically control the brightness: normal and reduced. If the jumper is open, then the normal brightness is set. When the contacts are closed, the brightness decreases.


Click to enlarge
Let's move directly to the diagram. If the device is connected directly to a motor controller with TTL levels, then pulses can simply be applied to pin 6 of the microcontroller. Otherwise, you should make a simple transistor level converter.

To obtain and stabilize the supply voltage of +5 volts, a linear stabilizer 1117 with a low voltage drop is used for greater efficiency.

An indicator from a microwave oven with a common anode is used as an LED indicator. Since it already contains 220 Ohm resistors, they are not provided on the printed circuit board.


There are as many as 10 jumpers on the top side of the PCB, but they are very easy to install.


SMD components are installed on the reverse side: these are two 22 pF capacitors for the quartz resonator, a stabilizer chip and filter capacitors.

The quartz resonator for the ATtiny2313 microcontroller can be set to 8 or 4 MHz, this is set in the source code and controls the prescaler.

The mode for displaying revolutions - per second or per minute - is set similarly in the source code. To display the number of revolutions per minute, the calculated number of revolutions per second is simply multiplied by software by 60. It is possible to programmatically round the calculated values. These nuances are commented in the source code.

When flashing the microcontroller firmware, you need to install fuses:

CKSEL1=0
BODLEVEL0=0
BODLEVER1=0
SPMEN=0

The source code is written in C in Codevision AVR. It was borrowed from another project - a tachometer for a three-blade helicopter.

Briefly about the setup: it is necessary to determine in advance how many pulses per 1 revolution will be supplied to the tachometer input. For example, if their source is a three-phase motor controller on LB11880, then it produces three impulse for each spindle revolution. Therefore, you should specify this value in your source code.

Selecting an indicator - with a common anode or with a common cathode (unnecessary value - comment out):

//#define Anode
#define Cathode

Number of tachometer pulses per 1 shaft revolution:

#define byBladeCnt 2

Selecting the frequency of the quartz resonator - 0x00 for 4 MHz, 0x01 - for 8 MHz:

#define Prescaler 0x01

RPM display selection:

lTmp = (62500L * 60L * (long)wFlashCnt);

To display the number of revolutions per second, you need to remove the multiplication by 60:

lTmp = (62500L * (long)wFlashCnt);

In order to disable rounding of values, you need to comment out the following lines:

If (byDisplay > 4)
{
wRpm++;
R += 10;
}

Since this particular design uses a very specific indicator, the PCB layout is not included.

A tachometer is a device designed to measure engine speed while driving and display this information to the driver. The received data is shown to the motorist on the dashboard or, if the device was installed additionally, on the corresponding screen in the cabin. This material will allow you to learn how to build a tachometer at home with your own hands.

[Hide]

Homemade microcontroller device

To make a homemade tachometer on a microcontroller for your car to measure engine speed, you will need the following spare parts:

  • the microboard itself, in this case the Arduino circuit will be used;
  • resistors;
  • to make an LED tachometer, you will need an LED element;
  • infrared and photo diodes;
  • display, in our case it is LCD;
  • shift register 74HC595.

In this case, an optical regulator will be used instead of a slot regulator. Thanks to this, you do not have to worry about the thickness of the rotor; the number of blades will not change the readings. In addition, the optical controller allows you to read the drum revolutions, unlike a slotted one.

To begin the task, prepare all the elements and you can begin:

  1. First of all, you need to sand the LED and photodiode with (fine-grained) sandpaper - you want them to be flat in the end.
  2. After this, you need to put a strip of paper - you need to make two similar elements so that the diodes can be tightly installed in them. Both parts ultimately need to be connected with glue, and then painted black.
  3. After this, the diodes themselves are installed, which are subsequently glued together with glue, then the wires are soldered to them.
  4. It should be noted that the nominal values ​​of the resistors may differ, it all depends on how the photodiode will be used. The potentiometer allows you to reduce or increase the sensitivity of the controller as a whole. The wires from the controller must be soldered as in the photo.
  5. From the circuit for making a car tachometer using LEDs, you can understand that it uses an eight-bit shift register. The tachometer circuit also includes an LCD screen. A small hole should be built in the housing to fix the diode light bulb.
  6. Next, you need to solder a 270 Ohm resistor to the diode element, and then install it in pin 12. The controller itself is inserted into a cubic tube - this will provide the device with additional strength.

A simple device based on a microcalculator

There is another option for making an electronic one for a gasoline or electric motor; in this case, a microcalculator will be used as the basis. This option will be especially relevant for those who have problems with the element base. It should be noted that ultimately the device will not be able to provide 100% accurate readings, and such a device will not show the number of revolutions per minute on the screen. However, the microcalculator itself is an excellent device for counting signals.

Inductive controllers and others can be used as a signal regulator. When the disk rotates, one signal should be shown on the display per revolution. In this case, the controller contacts must be open, and at the moment when the unit passes the disk tooth, these contacts must close. In general, it is optimal to use such a do-it-yourself tachometer in cases where measurements will not be taken frequently. If you want to install regular speed monitoring in your car, then, of course, it is better to use more reliable devices (the author of the video is Alexander Novoselov).

In our case, the contacts simply need to be soldered in parallel to the addition key of the calculator.

When you need to measure the rotation speed, the measurement is done according to the following scheme:

  1. First, you need to turn on the calculator itself.
  2. After this, press the “+” and “1” buttons simultaneously.
  3. After this, the device starts up and the measurement itself is performed on it. To do this, you first need to turn on the stopwatch at the same time as the calculator.
  4. Count until thirty seconds have passed, and then pay attention to the display - it should show the corresponding value.
  5. The resulting value is the number of revolutions the crankshaft made in half a minute. If you double this figure, you get the number of revolutions per minute.

Analog and digital tachometers

An analog tachometer for a diesel or gasoline engine is designed to convert an electronic pulse and output it to an indication device. As for digital devices, they convert an analog pulse into a certain sequence of ones and zeros, which, in turn, are recognized by controllers (video author - Alexander Jung).

Analog options consist of the following components:

  • microboard designed to convert an analog pulse;
  • wires that connect all structural components;
  • a scale where the indicators will be shown and an arrow that shows the desired value;
  • for normal operation of the arrow, a special reel with an axis installed on it is required;
  • any reading element, for example, it could be an inductive controller.

As for digital devices, their purpose is the same, but the design of a digital gadget is based on other components:

  • eight-bit converter;
  • directly the processor itself, which converts the pulse into a sequence of ones and zeros;
  • a screen on which the readings will be shown;
  • speed controller - a chopper device is used with amplifiers, but special shunts can also be used for this purpose, in this case everything depends specifically on the design;
  • an additional microboard that will reset the readings;
  • it will be possible to connect a temperature controller for antifreeze, cabin air, engine fluid pressure, etc. to the processor;
  • For normal operation of the device you will need a special program.

A tachometer is a device for converting a non-electrical parameter (rotation speed) into an electrical one (pulses, voltage, current). With its help, you can determine the number of revolutions per specific unit of time (most often the interval is 1 minute).

The tachometer is designed to convert a non-electrical parameter into an electrical one.

A homemade tachometer can be based on almost any reading device. Sensors are often used:

  • inductive;
  • Hall;
  • capacitive;
  • resistive;
  • photoresist;
  • terminal

The principle of operation of a tachometer on a microcontroller

If we take the modern element base as a basis, then using several microcircuits we can build a completely working homemade tachometer using LEDs or using an LCD display. Moreover, there can be a great variety of reading device options. It is possible to provide for the connection of both an inductive and a Hall sensor. The process of transformations in a tachometer on microcontrollers:

  1. On the axis of rotation there is a disk, on the edge of which there is a protrusion - one tooth of small height. The disk size can be absolutely any. The main thing is that the sensor response speed allows one revolution to be recorded.
  2. A sensor is installed opposite the disc tooth. It only works when a tooth passes near it.
  3. A signal is sent from the tachometer reading device to the converter if the signal level is low. The converter consists of an operational amplifier, which increases the signal level several times.
  4. The signal from the operational amplifier is fed to the pulse counter. It can be implemented on a simple microcontroller. Only it must contain software.
  5. The number of pulses counted by the controller is fed to the device, which performs the data calculation. This is the same microcontroller, but it contains a different algorithm. The device, according to a certain scheme embedded in it, counts the number of revolutions over a certain period of time.
  6. The next stage is the conversion of the digital signal into a visual form. An LCD indicator with a microcircuit that controls it copes with this task.

Return to contents

A simple device for measuring rotation speed

As a basis for making a tachometer, you can take a microcalculator.

But you can build a tachometer not only with microcontrollers. In the absence of an elemental base, even a simple microcalculator will help you get out of the situation. A homemade tachometer based on it will not have high accuracy, and it will not be possible to display the number of revolutions per minute. But the calculator will serve as a good impulse counter. Inductive sensors, as well as many others, can be used as a signaling device (sensor). When the disk rotates, only one pulse should appear on the sensor per revolution. Moreover, the sensor contacts should be normally open, and at the moment the disk tooth passes, they close.

This is ideal if you decide to use a homemade simple calculator-based tachometer. But such a device will be useful if measurements need to be carried out very rarely. If constant speed monitoring is required, then it is better to use more reliable devices. The contacts are simply soldered parallel to the addition button of the microcalculator. When measuring rotation speed, the following actions are performed:

  1. The calculator turns on.
  2. The “+” and “1” buttons are pressed.
  3. The device on which it is necessary to measure the rotation speed is started. At the same time, the stopwatch starts.
  4. A countdown of 30 seconds is made, after which the value is recorded on the microcalculator screen.
  5. This is the number of revolutions per 0.5 minutes. By doubling it, you get the value in 1 minute.

Return to contents

Analog and digital tachometers

A homemade tachometer can be of two types:

  1. Analog.
  2. Digital.

The differences are clear from the names. The first convert the electronic signal and output it to an indication device - voltmeters, ammeters, LEDs. The latter convert the analog signal into a sequence of zeros and ones, which are easily recognized by microcontrollers. The latter work with such complex combinations, ultimately converting the original value into numbers on the display.

Analog tachometers consist of the following main components:

  • an electronic microcircuit that acts as an amplifier and analog signal converter;
  • wiring connecting all elements of the tachometer;
  • scales with a specific graduation, which is applied by simultaneously measuring the rotation speed with a reference tachometer (instead of a scale, LEDs mounted one behind the other can be used);
  • an arrow indicating the current value of the desired value;
  • an electromagnetic coil on which the axis for the arrow is located;
  • a reading device - a breaker (this is often an inductive sensor).

Digital tachometers perform a similar function, but consist of different components:

  • ADC having 8 bits;
  • a central processor that performs the function of converting an analog signal into a sequence of 1s and 0s;
  • LCD display to display the current value of a certain value;
  • speed sensor - chopper, must be used either with an amplifier or with shunts, depending on the design;
  • a special chip that allows you to reset the current values ​​to zero;
  • in cars, sensors for fluid temperature, cabin temperature, oil pressure, speed, and many others can be connected to the CPU.

A tachometer using a microcontroller must have software.

In the “heart” of the microcircuit, with the help of a personal computer, a certain algorithm is laid according to which the work takes place. The processor calculates mathematical formulas that depend on what parameter needs to be measured. When monitoring one value, the algorithm will be the simplest.

But a digital tachometer in a car can also be used as a temperature, pressure, and speed recorder. The microcontroller has several inputs and outputs. Reading devices are connected to them via buffer cascades - converters and signal amplifiers. But it is worth noting that when introducing additional equipment into the tachometer design, it is necessary to take this into account in the algorithm and software of the microcontroller.

To make a homemade digital tachometer, you will need knowledge of a personal computer and a programming language. The ability to compose algorithms will also be useful. Therefore, it will be simpler to use conventional microcircuits that will amplify the breaker signal and output it to a strip of LEDs or a dial indicator. If there is a row of LEDs, consisting of 10 pieces for every thousand revolutions, then you can determine the current value with an accuracy of one hundred.


The tachometer is a very useful instrument on the dashboard of a car. Unfortunately, not all cars are equipped with it as standard. If you are planning to modify your car by installing a tachometer, you can purchase an electronic tachometer in a store, or make it yourself using one of the publications. But. Almost all electronic tachometers that I have seen on sale or studied in publications and literature are, to one degree or another, not good enough for everyday operational use in a car.

All electronic tachometers that you can buy in a store are digital. Such tachometers are good for adjusting the carburetor because they provide accurate information about the engine speed, but for operational use they are less convenient, since they provide information in digital form, and for the human consciousness, when driving a car, the form of presentation in the form of a diagram or position is more convenient arrows.

In addition, commercially available digital tachometers are almost all designed to work with four-cylinder engines. And now many foreign cars with two, three or six-cylinder engines are coming into the country. It turns out that there are no tachometers on sale for such cars at all. Therefore, in the literature there are often diagrams of analog tachometers showing the rotation speed in the form of a linear diagram of LEDs.

But not everything is good here either, since there are usually no more than 12 LEDs (control points) in such a diagram. If you look at the scale of a conventional dial tachometer, standard installed on a car, you will understand that there must be at least 20 control points. With fewer points, the diagram is even less convenient to use than a digital scoreboard.

The figure in the text shows a well-tested tachometer diagram, which takes into account the above comments. This is a diagram of an analog tachometer that displays the engine speed in the form of a line diagram. representing a growing luminous column of 20 LED segments.

The circuit consists of a frequency-voltage converter on transistor VT1 and a voltage meter on polycomparator circuits A1 and A2

Pulses from the breaker or switch of the ignition system are supplied through the chain R7-VD2, which limits their amplitude, to the short pulse shaper C3 R3. The time constant of the C3-R3 circuit is chosen significantly less than the smallest period of pulses on the ignition coil (that is, the highest rotation speed permissible for the engine), therefore the duration of the pulses generated on the basis of VT1 will be almost the same, both at idle and at maximum rotation speed.

Only the frequency of their repetition will change. Accordingly, current pulses from the emitter of transistor VT1 will appear, which are integrated by the circuit R4-C4 into a constant voltage, the value of which determines the speed of the motor.

One important property of this analog frequency-to-voltage conversion is that... that the conversion coefficient is set parametrically and depends on the time constant of the integrating circuit. Therefore, during the setup process, this circuit is very easy to configure to work with almost any number of engine cylinders (that is, with any number of pulses on the ignition coil per revolution of the engine crankshaft).

Now about the display circuit. Two LM3914 microcircuits are used here, which are ten-threshold indicators. An important property of these microcircuits is the ability to cascade them to obtain a theoretically unlimited number of indication thresholds.

This is possible due to the resistive divider circuit of the reference voltage. which is present in each microcircuit, has separate outputs - the upper one to pin 6 and the lower one to pin 4. By connecting pin 4 of one microcircuit to pin 6 of the other (that is, the end of one resistive divider with the beginning of another), you can make both resistive dividers work as a single divider that distributes the reference voltage between the comparators of both microcircuits.

In the circuit shown in the figure, a voltage of 1.25 V is supplied to the upper point of the divider from the reference voltage stabilizer present in the A1 chip (pins 6 and 7 of A1 are connected). The lower point of the divider (pin 4 A2) is connected to the common minus. Pins 5 (inputs) of both microcircuits are connected together. Thus, the meter measures DC voltage from zero to 1.25V with a 20-step indication.

The tachometer is mounted on a section of a prototype printed circuit board. LEDs are imported plate-shaped. Their brand is not known (they were sold in the store as rectangular LEDs, imported). All 20 LEDs are tightly assembled in one line. There are three colors - yellow to indicate the idle sector (up to 1000 rpm), green to indicate the working sector (1000-4500 rpm) and red to indicate the dangerous sector (more than 4500 rpm).

It is advisable to put digital indications of rotation speed along the scale (for example, “500”, “1500”, “2000”, “2500”, “3000”, “3500”, “4000”, “4500”, “5000”, “5500” , "6000"). LM3914 chips can be replaced with LM3915. LM3916

You can install the device directly on the car (by comparing the readings with a working digital tachometer) or in laboratory conditions, applying 12V peak-to-peak pulses of various frequencies to the input.

When setting up in the laboratory, you need to convert the frequency of control pulses in hertz into the rotation frequency in revolutions per minute. To do this, you need to find out how many times during one full revolution of the crankshaft of your car a pulse is formed on the low-voltage winding of the ignition coil (if there are several coils in the car, then on any of them).

The formula is: W = (F / N) 60, where W is the crankshaft rotation speed (rpm), F is the frequency of pulses from the control generator (Hz), N is the number of pulses in the ignition coil per full revolution.

Thus, for a conventional Lada engine: W = (F /2) 60 = F 30.

The desired results are achieved by adjusting resistors R4 and R5 using the method of successive approximations. In some cases, it may be necessary to select container C3.

Connection in the car - “GND” - to the case (battery negative). “+AKK” - to the positive terminal of the battery, “PR” - to the breaker or the output of the secondary switch to the coil of the ignition system.