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:
-
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.
-
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
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
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