Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Square wave generation for automotive dashboard

Menticol

Active Member
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.
1721677484513.png


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.

diag.png


IMG_20240721_013921.jpg


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

oscillos.png


Thank you for your time
 
Last edited:
The tacho is possibly intended to work with a two wire inductive (reluctance) sensor, that has one side grounded so the signal is centred around 0V.

If that is the case, it probably needs a reasonably symmetrical signal, so somewhere near 50-50 duty cycle?

A larger coupling cap may also help, possibly 1uF?

Typical waveforms for different type of engine pickups - the two terminal reluctance type is the right one:

main-qimg-2e558621cc7e696e75bbec29f68f5f53
 
Are you trying to measure the tach pulse freq or its equivalent V ?
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
 
Last edited:
The tacho is possibly intended to work with a two wire inductive (reluctance) sensor, that has one side grounded so the signal is centered around 0V.

If that is the case, it probably needs a reasonably symmetrical signal, so somewhere near 50-50 duty cycle?

A larger coupling cap may also help, possibly 1uF?

Typical waveforms for different type of engine pickups - the two terminal reluctance type is the right one:

main-qimg-2e558621cc7e696e75bbec29f68f5f53
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.
 
Last edited:

New Articles From Microcontroller Tips

Back
Top