Genset engine RPM counter

Hi all,
I tried (and failed) to make gensed RPM couter.
Basically I was inspired by this video:

But I decided to simplify my circuit as shown in attachment.

1)First problem was-I supposed I will be able to measure AC voltage between both ends of the “coil”.HOvewer,in fact this voltage was 0,but I was able to measure voltage between each end of the “coil” and generator ground.This was about 4-6V AC.This is a mystery:Improvised coil is created from insulated wire end each coil end was properly kept out of touch with any part of genset,but I got this voltage there

2)OK,I used this voltage to get an input for optocoupler and I was able to measure RPM correctly 3000RPM -but only for short period of time.After couple of seconds,arduino always restarts and begins void.setup()

I tried several configurations on opto coupler input (and 3 different optocouplers),voltage dividier to reduce input voltage( but optocoupler manufacturer says it isolate up to 5000V? which is a voltage obviously cant be reached by that improvised “coil”.

Why Arduino fails after few second of proper reporting of RPM?

You say that you tried several things to reduced the input voltage. Did you try reduce the number of wraps on the plug wire?

Can you provide a data sheet on the optocoupler?

Generators produce a lot of electrical noise. You need a lot of decoupling capacitors and power supply filtering to remove spurious spikes.

Weedpharma

cattledog:
You say that you tried several things to reduced the input voltage. Did you try reduce the number of wraps on the plug wire?

Can you provide a data sheet on the optocoupler?

1)Yes, i tried reduce number of wraps repetedly,no sucess.
2)

https://www.fairchildsemi.com/datasheets/QR/QRD1114.pdf
I also tried 3rd,which I am not able to find now.

2)OK,I used this voltage to get an input for optocoupler and I was able to measure RPM correctly 3000RPM -but only for short period of time.After couple of seconds,arduino always restarts and begins void.setup()

The opto is not going to cause a reset as you describe. Noise or bad power supply can.

Weedpharma

weedpharma:
The opto is not going to cause a reset as you describe. Noise or bad power supply can.

Power supply- I use pc usb.
To noise - could metal box help?

Search for "Decoupling".

Weedpharma

Just an observation - the coil is not grounded at one end, so I think is not working as inductive pickup. I suspect the coil is picking up the HT voltage spike via capacitive coupling to the coil. Is the end supposed to be ground or not?

yendis:
Just an observation - the coil is not grounded at one end, so I think is not working as inductive pickup. I suspect the coil is picking up the HT voltage spike via capacitive coupling to the coil. Is the end supposed to be ground or not?

This-as I noted in my initial post,is a source of confusion to me:Initially I supposed,based on my secondary shool education, I will be able to measure tiny AC voltage between both ends of imrovised coil,but this was 0V.
I accidentaly measured 4-6Volts between each end of coil and genset ground,which was a surprise to me-first of all due to voltage exitence at all and secondarily due to its size as well.

The voltage you read is due to capacitive coupling to the HT. The voltage peak on the HT lead is probably 10 to 15 kV, so that is why the voltage reading is so high. If you ground the other end of the coil, the voltage will virtually disappear. You will then be left with a small inductive voltage related to the coil current rather than the HT voltage. Whether that is enough to trigger your circuit remains to be seen.

yendis:
The voltage you read is due to capacitive coupling to the HT. The voltage peak on the HT lead is probably 10 to 15 kV, so that is why the voltage reading is so high. If you ground the other end of the coil, the voltage will virtually disappear. You will then be left with a small inductive voltage related to the coil current rather than the HT voltage. Whether that is enough to trigger your circuit remains to be seen.

Hi Chris,
thanks for explanation-I think now this starts to make sense and my trust in secondary shool education is recovered.:slight_smile:

re your "first problem" :
The real problem here is that various people (this site and others) are calling the wire coiled around the sparkplug lead "inductive coupling". It is not inductive, it is capacitive coupling. Just imagine that you have a few nanofarad high voltage capacitor connected from the spark plug terminal to one of the TB inputs. Then when the high voltage pulse is applied to the sparkplug a bit of this rapidly changing voltage goes to your circuit and this is what you are counting. Actually your coiled wire would work just as well with only one end connected.

Phoxx

phoxx:
re your "first problem" :
The real problem here is that various people (this site and others) are calling the wire coiled around the sparkplug lead "inductive coupling". It is not inductive, it is capacitive coupling. Just imagine that you have a few nanofarad high voltage capacitor connected from the spark plug terminal to one of the TB inputs. Then when the high voltage pulse is applied to the sparkplug a bit of this rapidly changing voltage goes to your circuit and this is what you are counting. Actually your coiled wire would work just as well with only one end connected.

Phoxx

It can be either. If you short one end of the coil, you effectively short the coupling capacitor so it can only work in an inductive mode where current flows in the coil. If you leave it open, then obviously no current can flow on the coil, and capacitive coupling can and will occur.

I have a strobe gun that clamps over the HT lead. This has a ferrite circuit that closes over the lead, and an inductive pickup coil. So it works in inductive mode. I am only guessing that the subject here is the same.

Your current probe with a ferrite core is a current transformer and sure enough it uses inductive coupling. If you were to take it apart you would find a coil wrapped around the ferrite, ie the wire goes through the window, around the donut and back through the window for many turns. This way the magnetic field generated in the ferrite toroid by the current being measured cuts across the wires of the winding and so can induce a voltage in them.
In the case of a few turns around the spark plug lead the magnetic field produced by the current in the lead does not cut across the wires so cannot induce a voltage in them.
Perhaps the confusion is because the standard IEEE symbol for a current transformer looks a bit like turns around the wire but keep in mind this is just a symbol, more like the ikon on your computer screen and does not purport to show any detail at all.

Phoxx

The spark plug wire is the worst place to get the signal from.
If it is an older engine, there are points.
If it is a newer one, often the kill wire has
a pulsing signal matching the spark rate.
It is difficult to get a good signal from a capacitive coupling
( it is not really a coil unless both ends are connected ).
If the ignition wire is old, you may get more spark than you'd
like.
You can either make a good ground connection to the motor
frame or significantly protect the signal with dividers and shunt diodes.
You'd then significantly amplify it back up to logic levels for the uP.
That is if you expect to use the sparkplug signal.
Dwight

phoxx:
In the case of a few turns around the spark plug lead the magnetic field produced by the current in the lead does not cut across the wires so cannot induce a voltage in them.

Phoxx

The current in the HT lead, as you say, does indeed produce a magnetic field. But its a curious thought that the magnetic field does not cut the wires coiled around it - how can it not?

There is no difference in principle between the one that has a ferrite core and the one without. The HT lead is still only one turn. The only difference is that the ferrite core will increase the field strength, and together with the many more coil turns on the seconday winding, will give a much larger output that the crude one with an air gap and just a few turns.

Transformers are current devices.
If the other end is not connected, no current flow.
As shown it is a capacitive pickup not a coil.
Even so, if you connected the other end, it is
only topologically a one turn transformer, no
matter how many times the wire is wrapped.
It is like a wire running parallel to the other wire.
The magnetic field is not oriented for more.
Dwight

Agree, you must connect the end so current can flow, but is it not a 1:1 transformer, it is clearly 1:n in the same way as the ferrite transformer is 1:n with n being much larger.

But I suspect this example worked only as a capacitive coupling because so few turns will not produce enough voltage if coupled inductively.

“It is like a wire running parallel to the other wire.”. That is a 1:1 transformer, and has mutual inductance ie coupling between them. Often found occurring unintentionally when stray wires couple noise into signal lines.

I don't any information about the "OPTO COUPLER". (no part number, no pin numbers)

Opto couplers have 6 pins, NOT 4.

Are you SURE that chip is wired correctly ? Why are there no pin labels on the transistor side ?

Why is the resistor on the emitter side and not between the collector and the 3.3V ?

Why are you reading the emitter instead of the collector ?

yendis:
Agree, you must connect the end so current can flow, but is it not a 1:1 transformer, it is clearly 1:n in the same way as the ferrite transformer is 1:n with n being much larger.

But I suspect this example worked only as a capacitive coupling because so few turns will not produce enough voltage if coupled inductively.

“It is like a wire running parallel to the other wire.”. That is a 1:1 transformer, and has mutual inductance ie coupling between them. Often found occurring unintentionally when stray wires couple noise into signal lines.

You are not thinking about the direction of the field lines that cut the secondary
wires and how many lines cut the secondary. You are only thinking about the fact
that the wire looks like a coil. By winding it around the wire, you spread the lines
by the same amount as the turns increase it. The same number of field lines
cut across the wire. It stays as a 1:1.
Notice that on a transformer, the turns are perpendicular to the field lines.
This is not the case of the wrapped wire. The field makes only one pass through
the wire, not multiple passes ( no free lunch ).
It is important to think problems through. It makes no difference how the wire
looks, it only cuts through the field once!
Dwight