collapsing magnetic field causing V spike issues?

Thread Starter

thunderhead289

Joined Nov 28, 2021
13
this has really given me a good what for.
I seem to have some sort of a voltage transient or spike causing some weird behavior on this circuit.
I have an ignition signal and a tach signal (hooked to the positive and negative of an automotive ignition coil).

with the coil firing, the outputs on the left of the microcontroller can seem to flutter regardless of being called high or low.
what is really strange is that the controller doesnt seem to get slapped bad enough to cause it to act strange with its process (it still reads rpm clean, ignition input acts as expected, and analog inputs continue to read undistorted - just my stepper drive outputs seem to flutter on their own every once in awhile (even when in the code they are not being commanded to).
with the coil off, the stepper acts normal - and oddly enough both ignition and tach lead have to be removed from a running coil for the issue to not be present (id expect it on the tach side potentially, but the ignition lead surprised me).

things I have tried:
de-soldered the 470ohm resistor from that common ground lead, soldered on a wire to the end of it and put it right to the incoming NEG screw terminal on the board. issue was still present. (with ignition lead removed)
ignition lead does not cause an issue if not hooked to the coil NEG like if i wire it to the board voltage. same voltage source supplying the coil).

so im stumped - something is happening with the magnetic field collapsing in the coil to cause the issues with the current circuit, even though the circuits read and function clean, the stepper drive has weird ghost pulse behavior.

anyway, does anything jump out to anyone as being super obvious?
 

Attachments

An ignition coil primary has around a 400V spike when the igniter switches off, along with a burst of high frequency RF noise during the burn portion. It's a very difficult waveform to deal with.
Your PC board is doomed, that trace does a long run for a mile underneath the MCU before going to the zener/transistor etc.
I use a two transistor one-shot same as analog tachometers, to clean up the ignition pulses, before going into an MCU.
 

Thread Starter

thunderhead289

Joined Nov 28, 2021
13
An ignition coil primary has around a 400V spike when the igniter switches off, along with a burst of high frequency RF noise during the burn portion. It's a very difficult waveform to deal with.
Your PC board is doomed, that trace does a long run for a mile underneath the MCU before going to the zener/transistor etc.
I use a two transistor one-shot same as analog tachometers, to clean up the ignition pulses, before going into an MCU.
help me understand here what exactly the issue is so I can be better about it, im not an electrical engineer - more capable on the programming side, just know enough to be dangerous with the circuitry side of things - although this coil thing has been my limit.

is it because im going under the board itself - like im putting off something to the board due to the proximity?
side note - it does read clean to 5500 rpm (havent tested higher) and compared against a store bought tach at the same time, they both read the same through the RPM range.

also, why am i seeing a similar issue on my ignition input (tagging to positive of coil for convenience) where then the micro just latches itself on. although i dont see my input signal toggle, the circuit alone will cause the issue.
 
The ignition coil (-) has a very fast spike, high voltage along with high frequency noise on it. That wire is basically poison if near anything. Because it comes in at the terminal block and the trace runs quite a ways under things, it's acting like an antenna and dumping noise into the MCU and surrounding circuitry and will cause all kinds of problems. It's just proximity of that trace to other ones, too close and capacitive coupling causes nearby traces to pick up the noise.
One fix would be to move the 100k resistor off the PC board and have it first on the coil (-) wire as it comes in, far away from your board. The 100k drops the voltage down enough so everything after it downstream is much quieter. I'm saying have the 100k resistor off board and even leading into the terminal block. Instead of jumpering the old 100k on board, just put in a low value part like 1-10k to prevent damage if that terminal ever gets power by accident.

For the other problem, I'm not sure without a schematic. What are you doing with all the power mosfets?
The 'micro latching itself on' is that mean it's powering up and stuck or what?
 

Thread Starter

thunderhead289

Joined Nov 28, 2021
13
The ignition coil (-) has a very fast spike, high voltage along with high frequency noise on it. That wire is basically poison if near anything. Because it comes in at the terminal block and the trace runs quite a ways under things, it's acting like an antenna and dumping noise into the MCU and surrounding circuitry and will cause all kinds of problems. It's just proximity of that trace to other ones, too close and capacitive coupling causes nearby traces to pick up the noise.
One fix would be to move the 100k resistor off the PC board and have it first on the coil (-) wire as it comes in, far away from your board. The 100k drops the voltage down enough so everything after it downstream is much quieter. I'm saying have the 100k resistor off board and even leading into the terminal block. Instead of jumpering the old 100k on board, just put in a low value part like 1-10k to prevent damage if that terminal ever gets power by accident.

For the other problem, I'm not sure without a schematic. What are you doing with all the power mosfets?
The 'micro latching itself on' is that mean it's powering up and stuck or what?
thank you for your response and making it easy to understand for me - that is much appreciated.

regarding the power mosfets, I designed that side of the circuit when my knowledge was a bit less, so probably only need one mosfet and the rest could have been transistors.

the way it works is that when the ignition signal comes on, it both switches on the main power mosfet (connecting the ground on the board - it always has battery power and ground), and switches another mosfet that sends an input signal to the micro telling the micro that "hey, im ON". the micro then latches its own circuit via mosfet to the power mosfet also as an addition means of maintaining power.
when ignition drops out, the micro then knows - it then runs a shutdown procedure before then pulling its own mosfet - which then finally shuts down the main power mosfet.

excessive mosfets probably arent necesary, but the circuit works well regardless of if its tagged to the coil or not. but when it is tagged to the coil with the engine running, although it works entirely correctly, again - ghost pulses to the stepper driver that i didnt command.
 

LowQCab

Joined Nov 6, 2012
4,023
Don't ever connect anything to to any part of an Engine's Ignition-Coil.
You should have a ~5-Volt Square-Wave driving the Ignition-Module,
if You feel that You need to actually monitor Engine RPM, You should use this Low-Voltage-Signal.

However, if You just want a signal that indicates that the Engine is running,
there's a far more reliable way to achieve that.
Just monitor the Battery-Voltage.
.
.
.
Engine Run Detector 1 FLAT .png
Engine Run Detector 2 .PNG
 

Thread Starter

thunderhead289

Joined Nov 28, 2021
13
Don't ever connect anything to to any part of an Engine's Ignition-Coil.
You should have a ~5-Volt Square-Wave driving the Ignition-Module,
if You feel that You need to actually monitor Engine RPM, You should use this Low-Voltage-Signal.

However, if You just want a signal that indicates that the Engine is running,
there's a far more reliable way to achieve that.
Just monitor the Battery-Voltage.
.
.
.
View attachment 268415
View attachment 268416
this is oldschool stuff, carbed era. i have shutdown parameters which is why im tagged to the positive of the coil - once it sees that drop, it runs a shutdown procedure than unlatches its own power.
regarding the rpm, i do indeed need that - the negative of the coil is where a typical tachometer lead would go. of coure the distributor lead is also still in place on the coil.
 

LowQCab

Joined Nov 6, 2012
4,023
You are controlling a Microprocessor in your Car,
but You still have a Points-and-Condenser Ignition-System ????
Points-Fired-Ignition-Systems went away ~45-years ago.

The Circuit I provided is still a superior way of determining whether or not the Engine is running.

The Coil connection can be made to work with enough Filtering,
but it makes things much more complex than they need to be.

Here's a Forum Thread showing how to upgrade your Ignition and still keep the Points .........
It's a really easy project ........
https://www.speed-talk.com/forum/viewtopic.php?t=46827&start=30
.
.
.
 

Thread Starter

thunderhead289

Joined Nov 28, 2021
13
You are controlling a Microprocessor in your Car,
but You still have a Points-and-Condenser Ignition-System ????
Points-Fired-Ignition-Systems went away ~45-years ago.

The Circuit I provided is still a superior way of determining whether or not the Engine is running.

The Coil connection can be made to work with enough Filtering,
but it makes things much more complex than they need to be.

Here's a Forum Thread showing how to upgrade your Ignition and still keep the Points .........
It's a really easy project ........
https://www.speed-talk.com/forum/viewtopic.php?t=46827&start=30
.
.
.
suffice it to say i made a way for an otherwise static metering device - IE a carb to have dynamic adjustment capability by using nothing more than a chevy idle air control valve. it adjusts based on current air fuel ratio towards a target air fuel ratio.

rpm gives me the ability to not have to use a prox sensor on the throttle to verify idle. and i do need a discrete input when the key is on since its initially what turns the controller on. i could use a relay, but thats more things to deal with that are unnecessary honestly. trying to keep it universal as possible - presently it can be installed in an hour and trims air fuel ratio in real time beautifully.

im actually this guy btw - probably the most capable carb & ignition tuner on youtube, and thats no joke.
the original version of this project - pre RPM tracking is installed and reading back to the app i made in this video.
 
Top