Tachometer RPM PWM Signal

Hey guys,

I love to play sim racing games. In the Web I found the following project and tried to copy the setp:

The wiring is attached to the topic.

After getting all the parts soldering them togther i got disappointed. It didn’t work.

The output signal is only 4.9V in the modulated PWM freuqency meassured with a oscilloscope.
And I guess the connected tachometer is only reacting on a 12V signal?
If somebody could help me with that would be fine.

Can you find a specification of that tachometer? Voltage range, current and input signal.
Also post your sketch.
I find it strange that a tachometer would be driven by pwm and not simply count pulses or is that just a test?
The circuit is also odd in that an npn transistor is used to switch on the high side and it is not clear what the diode is for.

There have been some other projects driving automotive tachometers e.g. speed and rpm,too they all use a pwm signals. Using the tone.h library. And like typical China hardware there is no documentation about the voltage or frequency. Unfortunately

warlock2511:
There have been some other projects driving automotive tachometers e.g. speed and rpm,too they all use a pwm signals. Using the tone.h library. And like typical China hardware there is no documentation about the voltage or frequency. Unfortunately

OK. If the tone library can be used, then try that. Or have you tried it ? Without seeing your sketch it is not clear.

Since you were using PWM, I assumed that you thought the duty cycle controlled the display of the tachometer, but the use of the tone() library implies it is the frequency which is important.

Anyway, the standard PWM frequencies 1000Hz or 500Hz are probably far too high and, depending on the engine being simulated, could be the equivalent of the order of 60,000 RPM.

Edit:

The circuit you are using will deliver only 5 volts because you are using an NPN transistor on the on the high 12 volt side, but with a base voltage of 5 volts from an Arduino pin. To get 12 volts, you need both a pnp and an npn transistor in this configuration :

from: transistors - Best way to get +5V or +12V or 0V from arduino pin - Electrical Engineering Stack Exchange

In order to give you the correct arduino source Code simply download the program https://www.simhubdash.com/
please watch the youtube video I posted before. The simhub software is able to upload the code into the arduino directly. But you can also load it into the arduino software. I am going to upload the source code after work. This should be around 10:00 pm
AFAIK the soldered parts work. On the oscilloscope you can see the different signals beloning to the different rpm.