Hi! I'm currently adapting a motorcycle dashboard to use with a computer video game, using a raspberry pi.
At first replicated this circuit shown in Youtube. Its 12V square wave was not able to make the tachometer needle move.
Switched the Arduino for the Raspberry pi due limitations of Arduino's tone() function and even ordered a new dashboard (thinking the one I had was DoA) to no avail.
My bad luck ended when I found this great post by user Robmack that explains how this type of tachometers do require a a negative offset to work. After implementing the circuit and fiddling with the duty cycle, it worked perfectly.
However, my questions are:
1. How does the Arduino based circuit oscillate? It works, but I don't understand how.
2. Whats the technical name for Robmacks solution?
2.1. His solution it's heavily dependent on duty cycle and frequency, under some parameters it stops working. Is there another way to induce a positive or negative offset on a frequency-variable square wave signal? Thought about a Ad9833 module, but it does require an OP-AMP with a negative power supply, maybe for my application is an overkill?
Yellow channel represents the output from my TIP125, the purple one the tachometer-out output, ahufterdby the aforementioned resistor and capacitor technique
Negative I'm just trying to understand how the zener diode version of the circuit works, and why adding a resistor and a capacitor to a existing square wave can trick the Chinese tachometer into believing it's receiving a negative voltage instead of the original +12 - 0 pulses
Thank you for sharing the graphs! they makes sense.
Just by curiosity I followed your advice and tried with a bigger cap to see what happens with the tacho: and it stops working. The original signal (channel 1, yellow) shifts upward and the modified one with the capacitor and the resistor (purple) stays the same. You are right regarding the frequency. When the frequency goes up the tachometer stops working, and I need to wiggle the duty cycle to return it to the working condition. The capacitor / resistor trick is highly dependent on the frequency and duty cycle, but I would like to learn why.
If you are trying to measure freq just code for edge, rising or falling. And use a set of
diodes to clamp waveform to PI or Arduino logic levels :
Something like above, cap not needed if noise levels low. The Schottkys can be simple
silicon diodes like 1N914, the R tailored circuit loading on source sensor.