Author Topic: RPM Signal Conditioner  (Read 1930 times)

0 Members and 2 Guests are viewing this topic.

Offline sawie04Topic starter

  • Newbie
  • Posts: 6
  • Country: us
RPM Signal Conditioner
« on: July 17, 2026, 04:20:12 am »
Working on adding a digital tachometer to my 1985 f-150, 300 Inline 6 engine!  Im using the negative side of the ignition coil, taking it through a "signal cleaner" circuit board, and feeding that into an EPS32 with 3.3 volt Logic. i know very little out electrical things like this, trying to learn

The basic premise of using the negative ignition coil side, everytime a sparkplug fires, the ignition coil sends, i assume, the excess voltage and current out to the ground. By tapping that and making the signal defined and clear we can count spark, and thus rotation.

My system currently does work, but my MAIN issue is that there is voltage "ringing" inside of the cleaner, which is mistriggering the esp32 and giving bad input to the system.

The commercial equivalent is the CoilX:
https://wiki.autosportlabs.com/CoilX
How my circuit is designed:
Input from negative ign coil into-
- 1000v rectifier diode
-Then 1k \$\Omega\$ resistor
-Into a junction, one junction leg is a 470 \$\Omega\$ resistor
-another junction leg is 5.1 zener diode into gnd
-The 470  \$\Omega\$ resistor goes into pin 1 of an optocoupler (PC817)
-The optocoupler output (collector pin, i think its called) goes into a 10k \$\Omega\$ pullup resistor to 3.3 volts
-The optocoupler output ALSO goes into pin 1 of a schmitt trigger, 74HC14. Then i collect the output of the schmitt to go into the esp32 interrupt pin.

Yeah, so the main issue is that my reading is fine most of the time, but i think there are small mistriggers from just ringing around that circuit. The CoilX board uses a 75 volt zener diode to prevent this. How can i modify the circuit to get rid of these unwanted oscillations? It needs to be a clear defined, i think its called a square wave. If you click on that coilx link theres a great picture at the bottom showing this visually. Thanks for reading this, i know its long and probably confusing!
 

Offline Andy Chee

  • Super Contributor
  • ***
  • Posts: 2074
  • Country: au
Re: RPM Signal Conditioner
« Reply #1 on: July 17, 2026, 04:44:58 am »
Here's an alternative circuit in the attached PDF.

Mistriggering could also be caused by bad power getting to your ESP32.  Try a ferrite bead in the ESP32's positive supply, or even an inductor in series.
 

Offline sawie04Topic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: RPM Signal Conditioner
« Reply #2 on: July 17, 2026, 04:48:28 am »
Thanks for the pdf ill continue to look at it! Right now for my bench testing I have the ESP32 connected via usb to a powerbank, I should have mentioned that in my original.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 2267
Re: RPM Signal Conditioner
« Reply #3 on: July 17, 2026, 10:15:13 am »
Working on adding a digital tachometer to my 1985 f-150, 300 Inline 6 engine!  Im using the negative side of the ignition coil, taking it through a "signal cleaner" circuit board, and feeding that into an EPS32 with 3.3 volt Logic. i know very little out electrical things like this, trying to learn

The basic premise of using the negative ignition coil side, everytime a sparkplug fires, the ignition coil sends, i assume, the excess voltage and current out to the ground. By tapping that and making the signal defined and clear we can count spark, and thus rotation.

My system currently does work, but my MAIN issue is that there is voltage "ringing" inside of the cleaner, which is mistriggering the esp32 and giving bad input to the system.

The commercial equivalent is the CoilX:
https://wiki.autosportlabs.com/CoilX
How my circuit is designed:
Input from negative ign coil into-
- 1000v rectifier diode
-Then 1k \$\Omega\$ resistor
-Into a junction, one junction leg is a 470 \$\Omega\$ resistor
-another junction leg is 5.1 zener diode into gnd
-The 470  \$\Omega\$ resistor goes into pin 1 of an optocoupler (PC817)
-The optocoupler output (collector pin, i think its called) goes into a 10k \$\Omega\$ pullup resistor to 3.3 volts
-The optocoupler output ALSO goes into pin 1 of a schmitt trigger, 74HC14. Then i collect the output of the schmitt to go into the esp32 interrupt pin.

Yeah, so the main issue is that my reading is fine most of the time, but i think there are small mistriggers from just ringing around that circuit. The CoilX board uses a 75 volt zener diode to prevent this. How can i modify the circuit to get rid of these unwanted oscillations? It needs to be a clear defined, i think its called a square wave. If you click on that coilx link theres a great picture at the bottom showing this visually. Thanks for reading this, i know its long and probably confusing!

Hi,

You basically use a RC low pass filter combined with a clamp for one extreme and another clamp for the other extreme if needed.  That's the simplistic way.
Depending on your engine, what could happen is you might see an overlap in the filtering time and the next cylinder timing, so for high RPM you could shift to detecting every other cylinder firing.
That's the simpler way.

You can also do this digitally if you are using a microcontroller.  You can detect the main kickback and the trailing tail spikes and use program code to adapt to the particular wave that your engine produces for different RPM.

I don't know what kind of car you are putting this in, but with some modern cars you have to be a little careful what you connect to the coil because it could use the waveshape to detect engine performance and general operation.  I would think a resistor 10k or higher would not affect it, but I don't know how all cars are built.
 

Offline sawie04Topic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: RPM Signal Conditioner
« Reply #4 on: July 17, 2026, 04:38:35 pm »
Thanks for the reply!  I have been trying to filter out the extra rings through software. Right now I use a fixed debounce that equates to 8000 RPM (my engine will never see 8000). Ill look into the RC low pass aswell.

heres a photo of the conditioner circuit aswell
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: ca
Re: RPM Signal Conditioner
« Reply #5 on: July 17, 2026, 05:29:07 pm »
That CoilX circuit does not match your build.
The input side has a diode, 75V zener, resistors then feeding the opto-isolator LED.
It's not a great way to go because the opto LED current loads down the coil and lowers the firing voltage.
 

Offline sawie04Topic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: RPM Signal Conditioner
« Reply #6 on: July 17, 2026, 06:36:25 pm »
Yes, I just wanted to show the coilx as kind of the goal. The picture at the bottom especially.
The software side of things, with the fixed debounce is simply not enough
 

Offline sawie04Topic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: RPM Signal Conditioner
« Reply #7 on: July 18, 2026, 03:42:28 am »
Okay finally worked it out tonight. It was a common ground point issue.
I was grounding the conditioner board to the vehicle chassis, and i think that somehow confused the reference point for everything. I grounded it to the esp32 and it worked amazingly. Thanks for everyone who replied.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 15881
  • Country: ch
Re: RPM Signal Conditioner
« Reply #8 on: July 18, 2026, 11:24:22 am »
Okay finally worked it out tonight. It was a common ground point issue.
I was grounding the conditioner board to the vehicle chassis, and i think that somehow confused the reference point for everything. I grounded it to the esp32 and it worked amazingly. Thanks for everyone who replied.
Well yeah, car electrical systems are noisy as hell, so you definitely need to provide defined, clean grounds for small signals.
 
The following users thanked this post: sawie04

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 2267
Re: RPM Signal Conditioner
« Reply #9 on: July 19, 2026, 06:00:45 pm »
Thanks for the reply!  I have been trying to filter out the extra rings through software. Right now I use a fixed debounce that equates to 8000 RPM (my engine will never see 8000). Ill look into the RC low pass aswell.

heres a photo of the conditioner circuit aswell

That's a very nice picture snapshot.  I can see the 74xx14 chip clearly.

Another idea is to use a one-shot to lock out the rings.  You only detect the first pulse, then it locks out the rest for a preset time period depending on your engine.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3155
  • Country: gb
  • Recovering Electrical Engineer
Re: RPM Signal Conditioner
« Reply #10 on: July 21, 2026, 05:10:24 pm »
The detection is easy, protecting the circuit it is not so obvious though. The opto schemes shown are likely to fail or have a very short life.
The engine bay is a kind of hell for electronic circuits. You don't want to be bringing wires from the points back into the cabin if you can help it.

Don't clean up in code what you can easily clean up in trivial analog signal conditioning.
That's a general rule!

Here is a psu and an active low pass filter and monostable circuit outputting clean tacho pulses. Control the pulse width to suit, easy.
I thought why bother with this opto stuff and took another direction.
I extensively simulated the signal conditioning with a fairly accurate coil circuit.

Run shielded twisted pairs from the coil- and coil ground to the signal conditioner and from the signal conditioner to the tacho.
Ground shields only at the tacho end, do not tie the "tacho ground" to the chassis if you can avoid it. Read digital ground for tacho ground, same thing.
Screen the 12V supply.
Component cost about 10 bucks.

Some 555 fetishists may want to do their thing instead of the CD4093.


« Last Edit: July 28, 2026, 06:15:48 am by Terry Bites »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 2267
Re: RPM Signal Conditioner
« Reply #11 on: July 22, 2026, 09:41:10 am »
The trick is voltage limiting, but doing that also requires current limiting.

For example, if you expect a max of 200v and using a 10k series resistor, the current would be 20ma max for a short period, but repetitive.  If the duty cycle was 100 percent that would mean 4 watts in that 10k resistor, but since it is less than that, if we estimate it to be 0.25 percent then that brings us down to 1 watt which is still enough to burn up a 1/4 watt resistor so you have to choose a larger resistor size.

I would design for a max of 600v peak though, and duty cycle max 30 percent or better.  Since 20ma is probably ok for the current, that gives us a resistor value of 30k.
30k at 20ma and 25 percent duty cycle brings us to 3 watts average power, which is kind of high.  I'd use no less than a 10 watt resistor.
However, if we bring the current down to just 10ma, then we need a 60k resistor, and that brings the power down to 6 watts and at 25 percent duty cycle that's 1.5 watts which is more reasonable.
If we arbitrarily pick 100k, that brings the 25 percent duty cycle power down to less than 1 watt, however the noise pickup will be more severe so we'd have to design the filter capacitor a little better.

This is the simplest method not the best, but it illustrates the balance between the series resistor and the power rating for that resistor which has to be calculated.
Of course you have to test all of this, and luckily it is not too hard if you have access to the vehicle it will be used in.  Remember to test various RPM levels.

 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: RPM Signal Conditioner
« Reply #12 on: July 22, 2026, 09:42:34 am »
That 1k resistor is a pretty significant load for the coil primary during the flyback window, it can reach 200 volts or so.  High and low frequency ringing on the primary is also completely normal:

 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 2267
Re: RPM Signal Conditioner
« Reply #13 on: July 22, 2026, 09:52:39 am »
As I said, it is good to design for 600v peak.

However, I forgot to include the clamping mechanisms.
To clamp the negative input, you can use a diode to ground.
To clamp the positive input, you can use a zener or equivalent.
If the input goes negative, the diode clamps to ground.
If the input goes too positive, the zener clamps to ground.
If instead you need the negative signal not the positive, then just reverse the roles of the diode and zener: the diode clamps positive excursions to ground while the zener clamps negative inputs that are too negative to ground.
Again, watch out for power ratings for all components.

That's still the simple version.
 

Offline sawie04Topic starter

  • Newbie
  • Posts: 6
  • Country: us
Re: RPM Signal Conditioner
« Reply #14 on: July 31, 2026, 11:34:25 pm »
Ahh, its been a while and I haven't tested too much more, waiting on some things. I appreciate the replies aswell. I definitely did not understand everything, but i kind of got the premise. The optocoupler wearing down could be real issue as it switches on and off so much. Someone said something about twisting the signal with the gnd, i understood that, since its just measuring the difference between the two.. something like that haha. Anyways, i figured id try to learn kicad in this process, and i actually designed a pcb which is being ordered soon. I didn't change much since i didnt see these replies yet lol, but once i see how it does I might work on a version 2, i love doing durable work, not just "it works" work. Ill attach a picture of the PCB in 3d viewer. Thank you guys
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 15881
  • Country: ch
Re: RPM Signal Conditioner
« Reply #15 on: September 14, 2026, 05:30:16 pm »
Add mounting holes! :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf