Making signal from petrol generator charge coil.

Thread Starter

dandy1

Joined Sep 30, 2017
178
Hi guys thanks for taking a look.
I bought a cheap Chinese petrol electric start generator - mass produced - as cheap and nasty as possible.
I want to produce a signal from a battery charging coil on a generator to verify the engine is running. Output is 24-28v AC



I was looking at this circuit (2nd circuit):


I replaced R1 with 20K and R2 with a 5K pot (to tune it to appropriate voltage) and it appears to work. However when i switch the MM over to AC it appears to read voltage in AC as well.
(TACH-IN to coil output, GND to genny chassis)

Is this safe to use as a signal for a micro-controller (Arduino)?

I have looked at getting a signal from the Ignition coil primary as this will give me a pulse for rpm although this is a more appropriate method it is a fair bit more involved, especially when i only need to know if the engine is running. I have also looked at proximity sensors and hall effect switches, the drawbacks being they're intrusive, seem to pick up noise readily and may require voltage levelling.

Another question is the on-board charge circuit consists of just a large diode and a 5 amp fuse feeding directly into the battery, i have read that this is a common design on these generators and the battery acts as the regulator. i am a bit suspicious of this as terminal voltage is about 20-22v, so was considering a better design using a 3 amp rectifier, capacitor and a home made transformer:
upload_2018-8-18_13-19-57.jpeg

is this worth implementing? I mean to say would a better design prolong the starter battery life?
 

MrChips

Joined Oct 2, 2009
30,821
1) A multi-meter set to measure AC could still show a reading even if the signal is pure DC. A simple meter might use as simple rectifier to convert AC to DC. It depends on the design of the meter circuitry.

2) MCU input pins have input protection diodes. You can add external protection as in this diagram:


R2 is not needed.
If the Arduino MCU is powered from +5V suppy, then the upper diode D1 should be connected to +5V instead of +3.3V. A typical Schottky diode is 1N5817.

3) The generator is charging the battery in current mode. The single rectifier feeding the battery should be fine.
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
1) A multi-meter set to measure AC could still show a reading even if the signal is pure DC. A simple meter might use as simple rectifier to convert AC to DC. It depends on the design of the meter circuitry.

2) MCU input pins have input protection diodes. You can add external protection as in this diagram:


R2 is not needed.
If the Arduino MCU is powered from +5V suppy, then the upper diode D1 should be connected to +5V instead of +3.3V. A typical Schottky diode is 1N5817.

3) The generator is charging the battery in current mode. The single rectifier feeding the battery should be fine.
so this would be a clamping circuit? could the same be achieved using zeners(dont have shottky)
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
Can't you hear it?
How about do away with the MCU and just use a LED as the indicator?
View attachment 158299

The circuit gives a fairly constant LED current over a wide range of generator voltage.

As it happens this will fit another application i am looking into - the application of the arudino rather implies further processing of the signal - although i did not mention it.
forgive my stupidity but does R1 limit the current the LED at the same time as Q1
 

MrChips

Joined Oct 2, 2009
30,821
In the protection circuit you have shown in post #1, diode D1 and resistor R2 are not necessary. Resistor R1 gives the main protection because the ATmega328 MCU already has input protection diodes.

Zeners are not ideal devices. They do not have sharp turn-on characteristics especially at low zener voltages. Even a common 1N4001, 1N914, or 1N4148 diode would be better than zener protection.

You may want to read this:

https://www.digikey.com/en/articles/techzone/2012/apr/protecting-inputs-in-digital-electronics

and this:

http://www.thebox.myzen.co.uk/Tutorial/Protection.html
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
In the protection circuit you have shown in post #1, diode D1 and resistor R2 are not necessary. Resistor R1 gives the main protection because the ATmega328 MCU already has input protection diodes.

Zeners are not ideal devices. They do not have sharp turn-on characteristics especially at low zener voltages. Even a common 1N4001, 1N914, or 1N4148 diode would be better than zener protection.

You may want to read this:

https://www.digikey.com/en/articles/techzone/2012/apr/protecting-inputs-in-digital-electronics

and this:

http://www.thebox.myzen.co.uk/Tutorial/Protection.html
Very inmformative - thank you mrchips
 

MrChips

Joined Oct 2, 2009
30,821
Splendid.
So if got this right just a 10k series resistor then a 1N5819 to ground? or is the second diode to 5v required?
Both diodes are required.
The diode connected to ground prevents the input from going below -0.3V.
The diode connected to Vcc prevents the input from going above Vcc + 0.3V.
 

Alec_t

Joined Sep 17, 2013
14,327
does R1 limit the current the LED at the same time as Q1
Sort of. If too high a value it will severely limit Q1 base current and hence Q1 collector current. The real limit-setting resistor is R3. When the voltage dropped across that is sufficient to turn on Q2, Q2 robs Q1 of base current.
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
Sort of. If too high a value it will severely limit Q1 base current and hence Q1 collector current. The real limit-setting resistor is R3. When the voltage dropped across that is sufficient to turn on Q2, Q2 robs Q1 of base current.
Alec_t thanks for the info. i had a go at this circuit on the ignition coil primary and with hindsight of a probably much higher voltage through the circuit it worked - for a while - but ignoring the higher voltages something give up quite quickly - or maybe it was an incorrect resistor choice.

Anyway, what my idea with your circuit is to switch (via MCU) the ignition to ground thereby killing the engine. (LED for auxiliary purposes) can a simple transistor be used (driven by MCU) to ground the AC source whilst offering protection to the I/O pin. Now i have been reading that triac's are the way to do this but before venturing into how to implement that (or rather ordering parts) can this be done as described.
thanks
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
Both diodes are required.
]]The diode connected to ground prevents the input from going below -0.3V.
The diode connected to Vcc prevents the input from going above Vcc + 0.3V.
I was wondering if your ears are on fire!

made your circuit and the wise old monkey on the left told me do not to hook up to the arduino before testing. so begrudging the twenty seconds it took to connect a separate supply and the DMM, i was getting what appeared to be a five-six(ish) volt reading on the (very old) DMM. I'm thinking six volt on the arduino input is no good - the evil little monkey on the right was telling me its fine - the meter is donkey years old and no meter is going to keep up with what im trying to read right?

so I bit the bullet, connected to the arduino and guess what -

it worked - well sort of.
for the most part i was getting either a HIGH (digitalRead) - 1023, or a LOW - 0 and observing random readings above 700 or 3.5v. all the connections are good.
So im thinking that the LOWS (or lower readings) are due to the negative half of the cycle, noise or timing maybe on the DigitalRead? Or even does the chassis ground connect to Arduino ground? - but does this leave a path for the unregulated coil voltage to the arduino?
..are your ears on fire?
I had been playing with a circuit from Alec_t with mixed results so was wasn't expecting anything different-until the engine stopped dead as if it were switched off. I could not figure out for the life of me what had caused the engine to die and checked everything - the kill switch, the choke, was there a stray wire grounding somewhere? i even took the plug out to check for spark!
Now i was becoming more and more convinced that somehow your circuit was the culprit. a few expletives later i went in search for a wiring diagram for the charging circuit knowing in advance that i already know everything about the single wire charging circuit! there must be a plausible answer here!
so left it alone until this morning and first thing i check is the petrol tank - EMPTY!
we
 
Top