Tachometer idea help

Thread Starter

jonasbschutz

Joined Aug 24, 2022
5
hello. I,m trying to design a bar graph tachometer for my motorcycle and i need some help on deciding which hardware should i use.

I started this project with a LM 2917 to convert the pulses from the ignition to a voltage reference for the 2 LM3914 LEDs driver, though I had some problems sincroyzing the second IC (think is a resistence value). since the LM2917 is a little expensive on my region, I tryed to replace it with the LM331 as a F to V converter but a friend told me that it would be so much better if I did it using an microcontroller as an arduino so i can change any reference on the programing or add new features in the future. Since this project uses 15 LEDs which will use many digital outputs on the microcontroller, is it worth to relpace the ICs for one microcontroller or would be better to keep the LEDs drivers and use the Microcontroller to replace only the F to V converter?
 

Attachments

crutschow

Joined Mar 14, 2008
30,788
If you want to use a F-V converter without the MCU, below is the LTspice simulation of a simple converter using a cheap LM324 quad or LM358 dual op amp chip, a transistor, diode, and a few R's and C's:
It averages the positive going ignition current pulses going through C2 and transistor Q1 into C1.
Transistor Q1 isolates the current pulses so the averaged voltage doesn't affect the value of the pulses.
Diode D1 provides a return current path for the negative going edge of the pulse.
Opamp U1 is configured as a gain of +1 follower to isolate the averaged signal and provide a low-impedance signal output.
R2C3 and opamp U2 provide additional (2nd order) filtering to further smooth the integrated pulses.
The circuit is essentially insensitive to pulse width but is sensitive to pulse amplitude.

The simulation is shown for ignition pulse frequencies of 33Hz (yellow traces) and 330Hz (green traces).
The values of R1 and C1 may need to be adjusted to get the output voltage you want for your ignition pulse frequency.
The values shown give a settling time for a change in RPM's of about two tenths of a second.

Where exactly in the ignition are the pulses coming from and what is their amplitude and frequency?

1661796522614.png
 
Last edited:

Ian0

Joined Aug 7, 2020
6,293
You could also count the pulses with a 4-bit counter, and output the result to the LEDs using a (74HC)4515. All it needs is a regular reset to the counter which also latches the input of the 4515, and that could be done with a 555.
So, completely digital solution with no microprocessor with 3 logic ICs.
[Edit] Answer @crutschow 's question about the source/amplitude of the pulses, and I'll draw it out. You also need to specify the maximum speed that it needs to indicate.
 

eetech00

Joined Jun 8, 2013
3,418
IMHO...

I think stay with hardware, its not that complex.
I don't remember when...but I seem to remember someone posting that its too much processing for the arduino and were wanting to change the front end to LM29x7.
 

crutschow

Joined Mar 14, 2008
30,788
You could also count the pulses with a 4-bit counter, and output the result to the LEDs using a (74HC)4515.
But that only lights one LED at a time, whereas the TS is showing a thermometer output, with all LEDs below the highest also lit.
You could perhaps do that with some added circuitry (16 OR gates?) or diodes.
 
Last edited:

Thread Starter

jonasbschutz

Joined Aug 24, 2022
5
If you want to use a F-V converter without the MCU, below is the LTspice simulation of a simple converter using a cheap LM324 quad or LM358 dual op amp chip, a transistor, diode, and a few R's and C's:
It averages the positive going ignition current pulses going through C2 and transistor Q1 into C1.
Transistor Q1 isolates the current pulses so the averaged voltage doesn't affect the value of the pulses.
Diode D1 provides a return current path for the negative going edge of the pulse.
Opamp U1 is configured as a gain of +1 follower to isolate the averaged signal and provide a low-impedance signal output.
R2C3 and opamp U2 provide additional (2nd order) filtering to further smooth the integrated pulses.
The circuit is essentially insensitive to pulse width but is sensitive to pulse amplitude.

The simulation is shown for ignition pulse frequencies of 33Hz (yellow traces) and 330Hz (green traces).
The values of R1 and C1 may need to be adjusted to get the output voltage you want for your ignition pulse frequency.
The values shown give a settling time for a change in RPM's of about two tenths of a second.

Where exactly in the ignition are the pulses coming from and what is their amplitude and frequency?


the pulses are comming directly from the ECU, I connected the analog tachometer and this bar graph tachometer in parallel.
in idle speed (2000RPM) i get 30hz and it goes up to 280hz in max rpm
 

Attachments

Thread Starter

jonasbschutz

Joined Aug 24, 2022
5
There should be a 20k resistor connected across LED9.
why on the LED 9? im having a problem sincronizing the second LEDs driver. until the 10th LED is fine but when enters on the second LM3914 it turns on all the 5 remaining LEDs too soon ( like it needs more resistence on the reference ) and the LM3914 is designed for 10 LEDs, dont know if is there a problem using only 5 pins.
 

Thread Starter

jonasbschutz

Joined Aug 24, 2022
5
Was the engine idling when that oscilloscope trace was photographed?
If so, what was the idle RPM?
What maximum RPM do you need to measure?
What output voltage does that correspond to, that goes to the LM3914's?
yes, the idle rpm is 2000 rpm.
the max RPM is 15000 rpm
with 2000 rpm it gives 0.20V and goes up to 1.9V with 15000 rpm, that configuration was set on the trimmer so it lights 1 LED for each 1000RPM
 

crutschow

Joined Mar 14, 2008
30,788
yes, the idle rpm is 2000 rpm.
the max RPM is 15000 rpm
with 2000 rpm it gives 0.20V and goes up to 1.9V with 15000 rpm, that configuration was set on the trimmer so it lights 1 LED for each 1000RPM
Below is the circuit with components adjusted to about 1.9V out at 15,000 RPM and .26V out at 2000 RPM.

1661806011942.png
 

eetech00

Joined Jun 8, 2013
3,418
why on the LED 9? im having a problem sincronizing the second LEDs driver. until the 10th LED is fine but when enters on the second LM3914 it turns on all the 5 remaining LEDs too soon ( like it needs more resistence on the reference ) and the LM3914 is designed for 10 LEDs, dont know if is there a problem using only 5 pins.
What voltage increments are you wanting the lights to represent?
The resistor is used across LED9 to implement a carry-out-carry-in function, so the LEDs bar sequence will span the devices correctly. See below. The bottom LED in the simulation graph is LED 1, the top is LED20. I didn't show all LEDs, just the ones of interest.

1661812004444.png
 

Thread Starter

jonasbschutz

Joined Aug 24, 2022
5
What voltage increments are you wanting the lights to represent?
The resistor is used across LED9 to implement a carry-out-carry-in function, so the LEDs bar sequence will span the devices correctly. See below. The bottom LED in the simulation graph is LED 1, the top is LED20. I didn't show all LEDs, just the ones of interest.

View attachment 275086
get it now
i want each LED to represent 1000rpm which starts with 0.12v up to 1.9v.
 

eetech00

Joined Jun 8, 2013
3,418
get it now
i want each LED to represent 1000rpm which starts with 0.12v up to 1.9v.
The F-V voltage range is too low to obtain descent linearity with the LM3914 standard configuration. But since @crutschow designed the F-V circuit anyway, an output of 0-2.5 volts would be more suitable and would not require additional LM3914 circuitry. 0-2.5v FSD would permit steps of 125mv/1000 RPM. The LM3914 would then be wired like I showed in the simulation and the operating range would be 0-20K RPM, so at 15k RPM, 15 LEDS would light (~11mA/LED or 150mA). The remaining 5 LED's would not light unless RPM reached 16K or greater. Keep in mind no LED will be lit if RPM is below 1K RPM.
 
Last edited:

crutschow

Joined Mar 14, 2008
30,788
It’s important that the output of your design is linear. Can you show a simulation stepped at, say, 10 even increments?
Here's the F-V circuit adjusted for 2.5V out @ 15,000 RPM (below):
Ten steps are a little crowded, so I did 7 steps, each √2 of the previous.
Each frequency is √2 of the one below, and the output voltage steps are also √2 apart with every 2nd output voltage being close to twice the lower as expected, so the linearity would seem to be good enough for this non-critical application.

1661828511318.png
 
Last edited:
Top