Badcaps.net Forum
Go Back   Badcaps Forums > Troubleshooting Hardware & Devices and Electronics Theory > General Electronics Technical Discussion
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
Thread Tools Display Modes
Old 10-04-2019, 03:35 PM   #1
KvnTM
Badcaps Veteran
 
Join Date: May 2018
City & State: Arnstein, Bayern (Bavaria)
My Country: Germany
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 252
Default Back EMF / Transient Suppression

Hey Guys!

I'm currently designing a control module for a car engine which sits in a boat. Please don't ask why

I need to tap off the pulses on primary (12v) side of the ignition coil. The ignition on that engine is not controlled by any sort of ECU. It is just a mechanical switched transformer with a distributor. Mid 80s tech.
One side of the primary coil goes to +12V and the other side gets switched to GND by a switch on the crankshaft.
Now to the problem: These coils can output massive voltage spikes while disconnecting which would kill any microcontroller input. Resistive dividers are not an option and won't be reliable.

Both the engine and this circuit will share the same GND! Which is important to know while looking at the schematic. VCC = +5v. VIN = +12-14v.

I came up with the following circuit:


The spark gap is just for the case of a massive (a few kV) spikes. Insulation breakdown or whatever...
D12 is a big diode to keep positive spikes away.
R7 limit the current to the Optocoupler (Value most likely incorrect I designed the coupler led to run off 12v before).
R29 10k Pullup to VIN
D5 Zener to clamp the pullup voltage from VIN to somewhere around 12v. Don't remember the actual value of the zener.
D13 Reverse current protection for the coupler led.
C14 & C15 Just for filtering.
To the right of the coupler is just a AND gate to get a valid logic signal which goes into the micro.

Theory:
X1-1 Is connected to the switched side of the ignition coil.
X1-2 Chassis GND.

X1-1 Will stay at VIN through the coil until the switch closes to GND and thus pulling the signal down.

Optocoupler LED will light up and enable the output transistor pulling the 2nd input of the AND gate to VCC.

Output of AND Gate will go high to VCC.

Ignition coil switches off and X1-1 will turn high again thus turning off the Optocoupler and the output of the AND Gate will turn low.


The circuit is just my theory and it would be much appreciated if someone could take a look at it before I produce the board. It is for personal use and not commercial.

Thanks!
KvnTM is offline   Reply With Quote
Old 10-04-2019, 05:20 PM   #2
stj
Great Sage 齊天大聖
 
stj's Avatar
 
Join Date: Dec 2009
City & State: Europe
My Country: some shithole run by Israeli agents
I'm a: Professional Tech
Posts: 21,466
Default Re: Back EMF / Transient Suppression

so you want a tacho output from a traditional points fired ignition system?
stj is offline   Reply With Quote
Old 10-04-2019, 05:56 PM   #3
redwire
Badcaps Veteran
 
Join Date: Dec 2010
City & State: Alberta
My Country: Canada
Posts: 1,482
Default Re: Back EMF / Transient Suppression

Have you tried the circuit?
It is very difficult to get a clean pulse from an ignition coil primary.
The problem is (after the spark extinguishes) ringing causes your circuit to retrigger.

The opto does not isolate anything if both sides are referenced to 5V and gnd.
Engine ground is not the same as your circuit ground, there is a huge difference.
If D12 shorts the engine will not run. D13 does nothing because D5 provides coverage.
Attached Images
File Type: jpg pri-voltage.jpg (52.4 KB, 10 views)
redwire is offline   Reply With Quote
Old 10-04-2019, 07:57 PM   #4
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 4,357
Default Re: Back EMF / Transient Suppression

Fortunately you probably can filter the extra pulses in software
Ideally just like a multimeter you want to sample lightly...

Last edited by eccerr0r; 10-04-2019 at 07:59 PM..
eccerr0r is online now   Reply With Quote
Old 10-04-2019, 08:52 PM   #5
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,565
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by redwire View Post
The problem is (after the spark extinguishes) ringing causes your circuit to retrigger.
An RC filter can suppress signal components above the highest RPM expected (even at many thousands of RPM, you're talking about a fundamental that is in the LOW audio frequency range).

If the "module" being designed can see this input, directly, it can also implement a crude digital filter -- with near infinite rolloff: when you see the leading edge of the points closure, start a timer and ignore the input for some minimum amount of time (based on max RPM expected). A one-shot in hardware or software meets this criteria.

Quote:
The opto does not isolate anything if both sides are referenced to 5V and gnd.
If the "input" (points) goes below ground (which it will when they open), the AND gate will not see that negative excursion.

Quote:
Engine ground is not the same as your circuit ground, there is a huge difference.
Nor is Vcc likely to be a nice clean, reliable supply (consider how load dump might affect the design of that regulator as well as line rejection)

Quote:
If D12 shorts the engine will not run.
Why? Are you claiming there is a low (enough) impedance path to GND that presents in that case?

The OP should explore prior art:

http://www.555-timer-circuits.com/car-tachometer.html

http://groups.ist.utl.pt/lee/SUBA/Su...s/555-tach.gif

[My Signetics Timer databook is packed away else I'd consult it directly. 555's are great for this sort of application -- even if only to examine the field interfaces]
Curious.George is offline   Reply With Quote
Old 10-04-2019, 09:26 PM   #6
redwire
Badcaps Veteran
 
Join Date: Dec 2010
City & State: Alberta
My Country: Canada
Posts: 1,482
Default Re: Back EMF / Transient Suppression

That 555 timer prior art is crap- a 1k resistor and a 400V spike loads down the ignition coil. You don't want to weaken the firing voltage. There are many poor circuits out there.

D12 is a highly stressed part that can disable the vehicle if it fails - not a good design for a single point of failure. If D12 shorts, the coil primary sees 20nF load plus 390R to a zener, enough to kill any spark. It's not 12V 4-6A you are taking signal from, the high voltage firing line must be considered.

Car tachometer circuits start with a voltage divider (min. 20k-47k ea. two 1/4W good for 500V total), and then pick off either the +ve HV spike or look for a few volts above ground when the points/transistor/IGBT are on, during the dwell period.
Next is an RC filter for EMI and then a hardware one-shot for a few msec to mask the coil ringing. Doing it in firmware is difficult because 200kHz ringing coming into a DI will flood any interrupt routines

If OP's circuit is in the dashboard yet grounded to the engine block, there will be big problems due to EMI and -ve spikes during cranking, having two grounds. Noob mistake is to do that and then wonder why the pc board ground trace melted. I've seen it happen many times.

I would use a single transistor and some clever firmware, or two transistors to include the one-shot, or a 555 timer with larger resistors.
redwire is offline   Reply With Quote
Old 10-04-2019, 11:53 PM   #7
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,565
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by redwire View Post
That 555 timer prior art is crap...
Note that I said: "The OP should explore prior art", not me! I merely grabbed two examples from an image search of the web to show the OP that such things are easy to encounter. It's up to the OP to evaluate the quality of whatever he finds in that research.

Quote:
D12 is a highly stressed part that can disable the vehicle if it fails - not a good design for a single point of failure. If D12 shorts, the coil primary sees 20nF load plus 390R to a zener, enough to kill any spark.
There's already a cap across the points (aka "condenser") -- something around 200nF. So, you're adding 20 nF in parallel with that "condenser" (Wanna bet the condenser has AT LEAST +-10% or WORSE tolerances? Esp over temperature??!)

The rest of the network (behind the shorted diode) eventually terminates to battery (no path to ground unless the spark gap shorts permanently)

That leaves the 390 ohm resistor feeding a nominal 12V zener (I've not checked the P/N but rely on the OP's "Zener to clamp the pullup voltage from VIN to somewhere around 12v" -- VIN being Battery). So, you've got the hot side of the primary at Battery and the switched side at battery behind 390 + 10K ohms. (The zener will open when the other diode shorts as it will likely NOT be sized to expect a large Izm).

It's also likely that other components will open: the 390 will see a very high peak power in addition to a large potential across it as the coil fires; the caps will see high peak voltages, etc.

So, while the failure cascades (undesirable), a back-of-the-napkin analysis suggests the circuit removes itself from the vehicle as it self-destructs.

...

Quote:
Next is an RC filter for EMI and then a hardware one-shot for a few msec to mask the coil ringing. Doing it in firmware is difficult because 200kHz ringing coming into a DI will flood any interrupt routines
That's a naive (software) implementation. You *never* tie a signal to an interrupt pin unless you can EFFECTIVELY control the rate at which it can signal interrupts. In this case, IF you tied the input to an interrupt pin (not necessary as the dwell time is long enough for you to SAMPLE the signal without wasting an IRQ), the interrupt, once signalled, would automatically disable itself, in hardware (this is normal behavior in the designs of most CPUs). The ISR would take note of the event and then schedule a task to reenable the interrupt a few milliseconds later (assume 300-400Hz firing rate) after the ringing is expected to have subsided.

As such, you wouldn't care if it was 2 MEGAhertz on the IRQ pin (though you would have to ensure the minimum setup time for the IRQ to be recognized by the CPU's hardware -- which may be related to CPU clock frequency if synchronizers are employed without glitch-catcher frontends)

[In the case of a sampled system, you would simply ignore the results of your periodic samples for the duration of that timeout -- or, not even schedule the sampling algorithm once it has captured an event!]
Curious.George is offline   Reply With Quote
Old 10-05-2019, 01:23 AM   #8
redwire
Badcaps Veteran
 
Join Date: Dec 2010
City & State: Alberta
My Country: Canada
Posts: 1,482
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by KvnTM View Post
... Resistive dividers are not an option and won't be reliable.
This is a myth, if you use the proper resistors they are the best thing to connect to the ignition coil. More reliable than a HV diode getting hard pulsed on a very fast rise-time.
Design something good for at least 500V spikes. Peak resistor power needs to be at most 10X the resistor's steady state rating. So two 1/4W or 1/2W resistors in series, totalling 100k sees 2.5W pk for a few usec.
Car tachometer circuits, Chevrolet, Ford, VDO, Smiths are proven to work and do this. Running the divider into a transistor. It's less current than an opto's LED.

Something else to consider is the DC noise margin - running the opto LED from 5V means anything less than about 2.5V (at the coil input X1-1) will start to turn on the LED. The input will not go to 0V due to the voltage drops in the points, and wiring between the engine block (points ground) and wherever the monitoring circuit is located (i.e. dashboard).
For better noise margin, run the opto LED off +12V and design for around say 6V or less to turn on the opto. Adding a capacitor after and using CD4093 Schmidt trigger can give you the one-shot timer to filter out ringing.

I'm not a fan of using an opto and like a simple one or two transistor circuit, or IC which I have used before.
redwire is offline   Reply With Quote
Old 10-05-2019, 03:43 AM   #9
stj
Great Sage 齊天大聖
 
stj's Avatar
 
Join Date: Dec 2009
City & State: Europe
My Country: some shithole run by Israeli agents
I'm a: Professional Tech
Posts: 21,466
Default Re: Back EMF / Transient Suppression

why not take the signal from the points and then isolate the coil from the points with a diode?

infact you could use the points to drive a darlington transistor to reduce contact-wear and boost the spark.
i have a circuit for that.

Last edited by stj; 10-05-2019 at 03:44 AM..
stj is offline   Reply With Quote
Old 10-05-2019, 06:58 AM   #10
KvnTM
Badcaps Veteran
 
Join Date: May 2018
City & State: Arnstein, Bayern (Bavaria)
My Country: Germany
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 252
Default Re: Back EMF / Transient Suppression

Wow I haven't expected so much feedback. A huge thanks to all of you! In another well known forum they expected me to pay the forum members for advice which is just stupid. Well back to the topic...

Before I answer to every single response: Wouldn't it be much much simpler to just add a shunt on the "switch" side and measure the current pulse?
Like so: +--COIL--SWITCH--SHUNT--GND

I would get a relatively clean pulse without ringing or any backfire from the coil. With this way I'd have to bother with a much lower voltage potential. A 100W 0.1Ohm resistor or something like that would do. I don't really know how much current the coil draws so I guess it would be a little trial and error with the resistance. Also I don't know how short the pulse would be with high rpms.

First let me explain what the device is going to do. It will regulate the engines idle speed when it is cold. It needs a higher rpm to run stable at low temperatures. You can't just increase the idle speed on the engine itself since the boat would be too fast on idle.

The device will sit somewhere on the engine block and there is no dashboard like in a car. It is mostly analog. GND of the circuit will be shared with battery/engine/ignition GND so it should be somewhat stable and won't go negative. But I see the problem if a diode fails short. The whole circuit would burn itself away..

I guess I will go with current measuring. Seems more reasonable and easier to me. I came up with the following schematic:


I designed it to have a maximum of 500mV on the opamp input. Clipping wouldn't be an issue though. Gain of the opamp is set to 10 which would output 5v into the and gate. The signal would be much cleaner but that's just my assumption.
Is 1k too low as feedback? I could change it to 10k and 1k respective.

And I guess the 10nF on the coil won't hurt.

Last edited by KvnTM; 10-05-2019 at 07:03 AM..
KvnTM is offline   Reply With Quote
Old 10-05-2019, 08:23 AM   #11
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 4,357
Default Re: Back EMF / Transient Suppression

Likewise the LM358 has its limits in accepting inputs, it's about the same as the trigger input of the 555s. Both are much more forgiving than CMOS...
eccerr0r is online now   Reply With Quote
Old 10-05-2019, 09:31 AM   #12
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,565
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by KvnTM View Post
First let me explain what the device is going to do. It will regulate the engines idle speed when it is cold. It needs a higher rpm to run stable at low temperatures. You can't just increase the idle speed on the engine itself since the boat would be too fast on idle.
How will you know when the engine should be idling? Will you monitor the throttle position, as well?

And, presumably, the idle needs to be boosted when the ENGINE is cold (not when the air temperature is cold). So, how will you make that decision?

Finally, how will you know how much to goose the idle for a given temperature?

[Note that older automobiles used a bimetallic strip/coil to do this mechanically]

With a software solution, you could create an adaptive algorithm that "watches" the firing and tweeks the engine speed (throttle) upward until some stability criterion is satisfied -- knowing never to let the engine idle too fast, regardless of how poorly it may be running (cuz an engine will eventually run poorly regardless of how the control are tweeked as it "goes out of tune")
Curious.George is offline   Reply With Quote
Old 10-05-2019, 10:55 AM   #13
petehall347
Badcaps Veteran
 
Join Date: Jan 2015
City & State: worcester
My Country: United Kingdom
I'm a: Knowledge Seeker
Posts: 1,881
Default Re: Back EMF / Transient Suppression

there is generally a cam on the carb so when the choke is pulled on it increases the revs to a set level . cant see why it should need electronics to achieve same thing
petehall347 is offline   Reply With Quote
Old 10-05-2019, 11:34 AM   #14
KvnTM
Badcaps Veteran
 
Join Date: May 2018
City & State: Arnstein, Bayern (Bavaria)
My Country: Germany
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 252
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by Curious.George View Post
How will you know when the engine should be idling? Will you monitor the throttle position, as well?

And, presumably, the idle needs to be boosted when the ENGINE is cold (not when the air temperature is cold). So, how will you make that decision?

Finally, how will you know how much to goose the idle for a given temperature?

[Note that older automobiles used a bimetallic strip/coil to do this mechanically]

With a software solution, you could create an adaptive algorithm that "watches" the firing and tweeks the engine speed (throttle) upward until some stability criterion is satisfied -- knowing never to let the engine idle too fast, regardless of how poorly it may be running (cuz an engine will eventually run poorly regardless of how the control are tweeked as it "goes out of tune")
The engine is water-cooled with a heat exchanger. No air/radiator cooling like in a car. I will monitor the coolant temperature.

You don't have a throttle pedal like in a car. There is just a lever for reverse neutral and drive. Pretty easy stuff.

The engine runs absolutely fine when raising the rpm a little while idling and cold. This is a well known issue of this engine and there is no other way around it. Changing anything would make it run worse when hot.
Raising the idle rpm is also not an option. Idle speed is important on boats since you have no clutch or other mechanical separation between gearbox and engine.

I appreciate your thoughts but please don't think about the engine/mechanics.

Im pretty sure my current monitoring approach is much better rather than tapping off on the coil directly.

EDIT: I just noticed that I need a differential amp. This circuit as is would blow up in a second.. I'll continue tomorrow.. I can't think about it anymore

Last edited by KvnTM; 10-05-2019 at 11:49 AM..
KvnTM is offline   Reply With Quote
Old 10-05-2019, 11:35 AM   #15
KvnTM
Badcaps Veteran
 
Join Date: May 2018
City & State: Arnstein, Bayern (Bavaria)
My Country: Germany
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 252
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by petehall347 View Post
there is generally a cam on the carb so when the choke is pulled on it increases the revs to a set level . cant see why it should need electronics to achieve same thing
Theres the catch. No accessible choke
KvnTM is offline   Reply With Quote
Old 10-05-2019, 11:38 AM   #16
KvnTM
Badcaps Veteran
 
Join Date: May 2018
City & State: Arnstein, Bayern (Bavaria)
My Country: Germany
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 252
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by eccerr0r View Post
Likewise the LM358 has its limits in accepting inputs, it's about the same as the trigger input of the 555s. Both are much more forgiving than CMOS...
I guess it should be able to work with inputs of a few hundred mV.
KvnTM is offline   Reply With Quote
Old 10-05-2019, 01:25 PM   #17
stj
Great Sage 齊天大聖
 
stj's Avatar
 
Join Date: Dec 2009
City & State: Europe
My Country: some shithole run by Israeli agents
I'm a: Professional Tech
Posts: 21,466
Default Re: Back EMF / Transient Suppression

if you search for schematics for a car electronic tacho, you will see good examples of how to cleanup the signal.
stj is offline   Reply With Quote
Old 10-05-2019, 02:03 PM   #18
redwire
Badcaps Veteran
 
Join Date: Dec 2010
City & State: Alberta
My Country: Canada
Posts: 1,482
Default Re: Back EMF / Transient Suppression

There should already be a ballast resistor ~3 ohms in series with the coil, but on the 12V side. The purpose is to limit coil current at slow engine speeds because points give too much dwell. A PNP transistor there would work, but remember points do have contact bounce so even the coil current waveform will have some noise on it.

Either way, you have to debounce the signal, it is not a nice square wave. This means a one-shot done in hardware or in a MCU's firmware.

Fast idle on carburetors was either a solenoid to push up the throttle stop, or some cars did it as an extra air solenoid. When the choke is on, adding some (intake manifold) air also bumps up idle speed but not as much. You could find a similar carb on an 1980's car at the wrecking yard and see if the solenoid could be made to work.

Here is a circuit I've used to pick off the coil waveform, or go to a 555 etc.
The old LM2917 IC as a freq to V converter is popular for rev limiters and tachs.

For conversion from points to electronic ignition, a car ignition IGBT works very well, better than a BJT.
Fairchild EcoSPARK 2 300mJ, 400V, N-Channel Ignition IGBT FGB3040 series.
Attached Images
File Type: png tach_pickoff001.PNG (46.1 KB, 7 views)
redwire is offline   Reply With Quote
Old 10-05-2019, 02:57 PM   #19
petehall347
Badcaps Veteran
 
Join Date: Jan 2015
City & State: worcester
My Country: United Kingdom
I'm a: Knowledge Seeker
Posts: 1,881
Default Re: Back EMF / Transient Suppression

you can monitor rpm off the alternator if it has one .
petehall347 is offline   Reply With Quote
Old 10-05-2019, 03:34 PM   #20
KvnTM
Badcaps Veteran
 
Join Date: May 2018
City & State: Arnstein, Bayern (Bavaria)
My Country: Germany
Line Voltage: 230VAC 50Hz
I'm a: Hobbyist Tech
Posts: 252
Default Re: Back EMF / Transient Suppression

Quote:
Originally Posted by redwire View Post
There should already be a ballast resistor ~3 ohms in series with the coil, but on the 12V side. The purpose is to limit coil current at slow engine speeds because points give too much dwell. A PNP transistor there would work, but remember points do have contact bounce so even the coil current waveform will have some noise on it.

Either way, you have to debounce the signal, it is not a nice square wave. This means a one-shot done in hardware or in a MCU's firmware.

Fast idle on carburetors was either a solenoid to push up the throttle stop, or some cars did it as an extra air solenoid. When the choke is on, adding some (intake manifold) air also bumps up idle speed but not as much. You could find a similar carb on an 1980's car at the wrecking yard and see if the solenoid could be made to work.

Here is a circuit I've used to pick off the coil waveform, or go to a 555 etc.
The old LM2917 IC as a freq to V converter is popular for rev limiters and tachs.

For conversion from points to electronic ignition, a car ignition IGBT works very well, better than a BJT.
Fairchild EcoSPARK 2 300mJ, 400V, N-Channel Ignition IGBT FGB3040 series.
Thanks for the circuit suggestion. I guess I will build a few prototypes on a breadboard and try it out. The microcontroller will do a one-shot in software. I have much experience with digital stuff and built many boards but this pure analog stuff gets over my head... Well I never had a need for it until now.
KvnTM is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Badcaps.net Technical Forums 2003 - 2019
Powered by vBulletin ®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
All times are GMT -6. The time now is 10:39 PM.
Did you find this forum helpful?