Interfacing a high speed, high voltage automotive signal with a low-voltage micro controller

This is a bit of a multi-faceted question with a decent amount of context added, so bear with me here lol

I am attempting to intercept an ignition signal coming off my PCM in my truck so I can change the frequency and send it back out to a tachometer, allowing me to use different tachometers or different engines with the same tachometer. For context, the 4 cylinder version of my truck rarely comes with an OEM tach and the ones that do run about 2-3x the cost as the V6 models and are substantially more difficult to come across. All models of my truck have the same wiring harnesses for the instrument cluster and the tachs operate in the same exact way, running off high voltage pulses (300v) coming from the primary ignition coil located within the igniter module, so the different clusters are a direct drop-in. However since the V6 has 50% more cylinders, the RPM shown on a V6 tachometer is reduced by the same amount, so 3,000RPM becomes 2,000RPM and so on.

The primary coil waveform is (relatively speaking) easy to replicate with hardware and control using the PWM output of my board, but getting the signal into the MCU is a bit problematic for my smooth, inexperienced brain.

The waveform of the signal itself is consistent between different RPM values, the difference being the "off" time in between waveforms. The waveform itself seems to be about 4ms long and the period between the start of one waveform and the start of the next varies between about 37.5ms at idle, to 5.45ms at my engine's redline. The signal seems to spike as high as 20v peak to peak which is substantially better than the tach signal I was initially trying to intercept, but still far too high for my 3.3v MCU to do anything with other than instantly fry.

So with all that being said, here are my questions:

  1. Would a high speed optocoupler be quick and accurate enough to produce a usable signal? I think this would be the best case scenario as I wouldn't disturb the original signal in any discernible way and it would keep my MCU completely isolated from the noise produced by the ignition circuit, however I don't quite know if an optocoupler is sufficient due to the way they fundamentally work.

  2. If not, how would I go about dealing with that downwards spike seen in the scope image? There's a good amount of resources for reducing the voltage of signals but I'm not sure what to type into Google to help me understand how to "normalize" it, for lack of a better word.

Some considerations I've made: I'm using a Trinket M0 as I'm aware an 8-bit Arduino or equivalent would have no chance in keeping up with this signal, no matter how streamlined my code is. I'm also aware of the noise present in automotive environments and have a 5v power circuit with the necessary protection to keep it from frying the board or introducing said noise into the readings. I don't have the output side of the project completely figured out yet but I'm saving that hurdle for when I can derive an accurate RPM reading based on the signal in question. I believe the input will be the most difficult part of the project but I may be wrong lol

If you made it this far you have my thanks, I'm still a newbie when it comes to EE projects and I'm trying to (or force myself to) wrap my head around it by trying to build things that are applicable to and solve problems in my daily life. Any response is appreciated!

Posted Jan 16, 2023, 12:12 PM UTC

18
zifzifMixed signal circuit design•

A modern optocoupler with a specified data rate should have no problem with this. You're looking at equivalent rates in the kbps, and plenty of Mbps-capable options are available.

I'm partial to Toshiba's push-pull, logic level output models for general use, e.g. TLP2366.

Edit: updated results to filter for 3.3V supply voltage

3
KoitousOP•

Awesome, I'll definitely look into this. This was my initial thought but I was told by a fellow auto enthusiast that it might not give me an accurate result. Isn't much money to try though, much appreciated

1
These_Ad7290•

Your scope appears to be in AC mode. I suspect if put in DC mode, you might see cleaner (and longer) pulses that more accurately resemble the actual data on the lines.

2
KoitousOP•

Currently facepalming. This is the first time I've used my scope lmao I'll definitely try that

1
These_Ad7290•

At some point you recognise the sharp ups and downs as "I miiiight be in the wrong mode" :)

3
AutoModeratorMOD•

Do you have a question involving batteries or cells?

If it's about designing, repairing or modifying an electronic circuit to which batteries are connected, you're in the right place. Everything else should go in r/batteries:

r/batteries is for questions about: batteries, cells, UPSs, chargers and management systems; use, type, buying, capacity, setup, parallel/serial configurations etc.

Questions about connecting pre-built modules and batteries to solar panels goes in r/batteries or r/solar. Please also check our wiki page on cells and batteries: https://www.reddit.com/r/AskElectronics/wiki/batteries

If you decide to move your post elsewhere, or the wiki answers your question, please delete the one here. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1
1-1-1970•

What is the year/make/model of the vehicle? It may be easier to get an RPM signal from the crank or cam sensor, the PIP signal to the ignition control module, or polling the PCM through the data link connector

1
KoitousOP•

Vehicle is a first generation Tacoma and the signal shown is the Toyota equivalent of a PIP signal. The wire I'm scoping is what's feeding my ignition module timing info straight off my PCM. The crank sensor would definitely give me a nicer waveform but if it's possible to use the pictured signal that'd make installation a lot more clean and straightforward as the IGT (ignition timing) signal and tach signal both come off the ignition module. No wire overlays, just tapping into the IGT wire and cutting the tach wire to feed in my own signal.

If I can't end up getting the IGT signal to work though I'll definitely be tapping into the CKP. As for OBD2 I'm afraid the refresh rate won't be sufficient enough as the data rates are pretty low for this era of OBD. Certainly possible with some software smoothing but I'm gonna exhaust my hardware options first

1