×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Spark plug wire inductive pickup for RPM
4

Spark plug wire inductive pickup for RPM

Spark plug wire inductive pickup for RPM

(OP)
This is kind of a repeat of a very old thread: http://www.eng-tips.com/viewthread.cfm?qid=223731

I'm looking to read RPM on my paramotor (120cc two-stroke engine) with an Arduino.  The part I'm particularly curious about is sensing the spark and conditioning that signal.  As mentioned in the older thread, there are very simple tachs on the market that simply use a wire wrapped about 4 times around the spark-plug wire (with one end completely free).    I've seen a few approaches to conditioning the signal, but it sounds like "itsmoked" had a slick approach that unfortunately didn't appear in the old thread.  Hopefully he can chime in here.

Thanks in advance for any tips.

 
Replies continue below

Recommended for you

RE: Spark plug wire inductive pickup for RPM

Yes, I've added home-made electronic tachos to motorcycles using that method. It's capacitive coupling that provides the signal, not inductive. As the amount of coupling can be a little hit-and-miss, make sure the input to your Arduino is over-voltage protected, e.g. by a fast transient suppressor fitted, to stop the input getting killed by too big a pulse.

RE: Spark plug wire inductive pickup for RPM

(OP)
Thanks BrianG, but I think you're assuming I know more than I do.  Let me tell you what I think you're saying.  I should perhaps use too many rather than too few wraps around the spark plug wire to make sure I get a good signal, but I should also make sure not to kill my AVR input with too much voltage.  I'm guessing the "fast transient suppressor" would be a zener diode?

I think your first comment about the trigger being capacitive rather than inductive might have shed some light on the topic for me.  The wire wrapped around the spark plug wire is effectively just one plate of a capacitor (the spark wire being the other plate), such that I'm capacitively coupling the signal - yes?  This would explain why the end of the wire is free.  That did not make sense to me before.  But I think that would also suggest my Arduino should be grounded to the engine.  Is this correct?

Thanks again for your response.

RE: Spark plug wire inductive pickup for RPM

Ziploc, you are correct in your explanantion of the construction of the capacitor plates being the two wires. You will need to at least ground your tacho input circuit to the engine or frame.
I suggest you perhaps use a separate transistor inverter stage to buffer the input to the Arduino, rather than a direct connection from the pickup wire to one of its inputs, as this will be a bit more robust and will also clean up the signal a bit.

Try using a few turns of wire on the plug lead at first, the input pulse size will be affected by the input capacitance of your tacho circuit as this effectively forms a capacitive voltage divider to ground. A zener may add too much capacitance here as a transient protector, but a pair of fast signal diodes fitted between input and ground, and input and positive supply, will catch excessive spikes.  
       

RE: Spark plug wire inductive pickup for RPM

I probably wouldn't go my previous route now.

Do you have an oscilloscope?

Keith Cress
kcress - http://www.flaminsystems.com

RE: Spark plug wire inductive pickup for RPM

(OP)
If I'm understanding you correctly the diodes are just used to provide their typical 0.7V drop.  This would insure that the input stays 0.7V inside the ground and Vcc rails - right?

Any need for caps or inductors and resistors to debounce the signal?

Sounds like you've done this with some success.  Any chance you could describe the circuit in detail?  I'm really not a EE guy.  I would need component values and pretty explicit instructions of what is connected to what.


Thanks again.
 

RE: Spark plug wire inductive pickup for RPM

(OP)
>> Do you have an oscilloscope?  

I have one at the office - and usually after about 30 minutes of messing with it I can more or less re-familiarize myself with how to use it.  What do you have in mind?

RE: Spark plug wire inductive pickup for RPM

The 0.7 V is the FWD drop in a standard diode. You need a zener diode - like a 3.3 V one. Put a series resistor between pick-up wire and zener. Ten kohms usually works fine.

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Spark plug wire inductive pickup for RPM

Your AVR micros has internal protection diodes that are there to shunt over voltages to the rails.   You can hook 240VAC directly to the processor pins thru a dropping resistor.(of course there is no safety isolation)  If the resistor is a high enough value the diodes do their thing with no issue.

The problem is figuring out what the resistor value needs to be.  For the 240V example you can look at an app note to see what someone figured out to be the correct value.   But in your case using capacitive coupling, who knows..  So I'd look up the pin capacitance of your AVR processor.  I'd confirm it has protection diodes.  And I'd look at the maximum current allowed in and out of the pins.

Build a little duplicate of the AVR's input pin.  Two diodes and a 5V power supply.  Make the actual wraps on your spark plug wire.   Include a resistor between the wrap and the two diodes.  Hook your scope to the center of the two diodes and see what you get.  Fiddle for something that will work.  You'll need a couple of different resistors.  1 Meg to start then work your way down.

The diodes are both pointing at 5V in series.   One is hooked to ground and the other one is connected to 5V.   The node of interest is the point connecting the two diodes together.

Keith Cress
kcress - http://www.flaminsystems.com

RE: Spark plug wire inductive pickup for RPM

(OP)
Here's one of the many answers I've found:
http://images.elektroda.net/38_1244969036.jpg

But they all seem to have the problem that they exist in a thread that says "no don't to it that way" and then ends up winding down with no agreed upon solution.  I would have thought this was a very common thing.

Here's another one (actually both capacitive and inductive options): http://www.sportdevices.com/rpm_readings/index.htm

And: http://www.howtoalmanac.com/kevin/schematics/timinglight.jpg

Unfortunately, I have questions about each, and I'm not even sure which ones make the most (if any) sense.
 

RE: Spark plug wire inductive pickup for RPM

There's a confusion regarding capacitive and inductive pick-up in those links. And all of those circuits are overkill.
Do what Keith says.

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Spark plug wire inductive pickup for RPM

How good are you at programming the UNO.  You will have to use interupt or else it will probably miss it.  Here is a circuit that will work.  Pull up is 2-5K.  I just did a plane animation with the UNO.  I posted it on April 1st.  Modirator just didn't have a sense of humor and pulled it.  Here again for your viewing, 100' wingspan.

RE: Spark plug wire inductive pickup for RPM

(OP)
@OperaHouse - Thanks VERY much for the clear schematic.  You may be the first one to recognize the depth of my limitations.  I'm certain I can work with that.  If nothing else, it's a perfect starting point. I can build it, hook it up to my o-scope, and see how it looks.  

I recently built an ignition system on a board to test existing sensors we buy for a project we did for NASCAR.  I'll use that on the bench.

As far as the 100' wingspan plane - I don't see that.  I only saw the schematic you posted.

...looking back at the schematic, I noticed there is one resistor with no value specified.  It's the one that goes between 5V and the transistor.  Any recommendations?   Also, I notice you specify a standard diode.  I've noticed there seems to be two different schools of thought on whether I need regular or zener diodes.  Is it just a matter of how they're being used?

@Skogsgurra - thanks for the advice.  It was my suspicion for several reasons that most of what I've found was both overkill and ad hoc.

@itsmoked - thanks for the advice.  Unfortunately, I can't find anything in the Atmega 328 spec sheet that describes the capacitance or input protection.  Perhaps I'm looking in the wrong place.


Thanks to everyone for all the tips.  If nothing else - I'm learning something (even if it may not be obvious).





 

RE: Spark plug wire inductive pickup for RPM

(OP)
Great.  Thanks for the resistor value.  What will you do with that plane?

Here's the last crazy contraption I built (if you don't count the powered paraglider that I'm trying to make an instrument panel for now): http://www.youtube.com/watch?v=5CcgmpBGSCI

RE: Spark plug wire inductive pickup for RPM

I still don't understand why you don't just take the signal from the contact breaker...

Benta.

RE: Spark plug wire inductive pickup for RPM

(OP)
I'm pretty sure I don't have a contact breaker.  This is a single cylinder 2-stroke. I think it runs off a magneto.

But I'm also looking to make an open-source design that others can easily use on their paramotors.

RE: Spark plug wire inductive pickup for RPM

Magnetos also have a breaker sometimes known as "the points".

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Spark plug wire inductive pickup for RPM

(OP)
I'm certainly familiar with points on older engines, but I honestly don't think this engine uses a mechanical breaker. I guess I could be wrong about that.  

In any event, I'm still inclined to use a capacitive sensor on the spark lead to make this as simple and universal as possible in case others want to use it.

RE: Spark plug wire inductive pickup for RPM

If I was up in the air, I wouldn't want anything extra attached to the points!  Even lawn mowers today don't have points.  If it doesn't work, come back.  I'll figure out something.  What else does this do besides monitor the tach.  Those LED light srtips can make a nice show.

RE: Spark plug wire inductive pickup for RPM

(OP)
>> If it doesn't work, come back.  I'll figure out something.  

Thanks!  I really appreciate it.  Unfortunately, it might be a few days - or weeks - before I get to that part.  I'm juggling a few projects, and just trying to make sure I have the circuits and software worked out for this part.  I've got the Arduino talking to a 20x4 LCD display, and tonight I plan to hook up the barometer chip to give me absolute altitude, relative altitude, and vertical speed.  

>> What else does this do besides monitor the tach.

The plan is to do altitude, vert. speed, RPM, CHT, EGT, fuel level, and engine hours to start with.  I just like the idea of making a single "dashboard" rather than stringing a bunch of instruments along my throttle cable.

I've also got to make that downwind cart go directly upwind faster than the wind in the coming weeks.

Thanks again.

RE: Spark plug wire inductive pickup for RPM

Learned about modern lawn-mowers today. Maybe I should get one without points.  

Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.

RE: Spark plug wire inductive pickup for RPM

(OP)
>> Learned about modern lawn-mowers today. Maybe I should get one without points.

I wouldn't risk it - not if you're going to be mowing the same old lawn :)

RE: Spark plug wire inductive pickup for RPM

(OP)
I've got the LCD display and barometer hooked up and putting out altitude.  Our NASCAR ignition system is coming back from the field, so the RPM sensor is next.  Thanks again for all the good info.

RE: Spark plug wire inductive pickup for RPM

(OP)
I got a chance to wire up the simple circuit and test it today.  I operated the ignition system at various speeds up to approximately 16,000 RPM.  

The circuit appears to work well, but has significant ringing.  Interestingly, it seems it gets the initial pulse, then a brief quiet period, and then the ringing.  The ringing does appear to have a fixed duration and offset from the initial pulse.  It's not dependent on RPM.

Here are images of the circuit and the scope trace.

http://tinyurl.com/7hnfej7
http://tinyurl.com/855hw7s

I'd rather not solve the ringing problem in software as I expect it will waste a lot of cycles.  I would think I could "debounce" it with a 555.  But I'd love to get some suggestions from the experts.

Thanks again for all the help.

RE: Spark plug wire inductive pickup for RPM

That looks unusual like an old MSD-5 unit.  The gain may be too high so that traailing ringing is still picked up.  What did you use as a bias resistor?  To lower sensitivity try a 100K pot connected to common  with a .1uF cap in series connected to the base.  Adjust it to see if the waveform changes.  That may be enough.  As long as the transistor goes into near ssaturation, a small cap maybe 100pF from collecor to common will stretch out the pulse as well as a 555.  Oh, and don't mention a 555 in my presence ever again.

RE: Spark plug wire inductive pickup for RPM

(OP)
MSD-5 unit?  I had no idea what that even was.  We just built a small simulator consisting of a distributor and coil, powered by a 12V battery and turned by a cordless drill.  The distributor goes to an 8-cylinder engine, but we only use the points in it - not the rotor.  So the coil fires the same spark plug every time the points open.

>> The gain may be too high so that traailing ringing is still picked up.

Could that mean I have too long a sensor wire along the spark plug lead?

>>  What did you use as a bias resistor?

The resistor marked 2-5K on the diagram is a 4.7K.  The one marked 1M or 2M is 1 Meg-ohm.

>>
To lower sensitivity try a 100K pot connected to common  with a .1uF cap in series connected to the base.  Adjust it to see if the waveform changes.  That may be enough.
<<

Thanks.  I'll give that a try.

>>
As long as the transistor goes into near ssaturation, a small cap maybe 100pF from collecor to common will stretch out the pulse as well as a 555.  Oh, and don't mention a 555 in my presence ever again.
<<

Cool.  I'll try that too.  Did a 5XX once touch you in a way that made you uncomfortable?



 

RE: Spark plug wire inductive pickup for RPM

MSD is a company started at least in the early 70's and still exists.  I bought a MSD-5 (current product MSD-6A) for my Mazda rotaty that would eat points by about 4K miles.  It now is running the flat head in my 1955 Correct Craft.  It stands for Multiple Spark Discharge and fires the plug 5 times in a row.  I can run the boat at 300 rpm for hours at festivals without fouling a plug.  

The amount of ringing should be fairly constant.  Reducing the gain should get you to one or two rings and small collector cap would stretch those two pulses together.

RE: Spark plug wire inductive pickup for RPM

(OP)
Very interesting.  I used to have a 1974 Mazda RX4 when I was a wee lad.  It had the 13B engine and a distributor with two sets of points.  Each rotor had two spark plugs that fired one right after the other in rapid succession - but they didn't do multiple sparks for a single "stroke".  Never had any problems with eating points.

>>  Reducing the gain should get you to one or two rings and small collector cap would stretch those two pulses together.

Thanks for the tips.  I'm hoping I can try that today.  Unfortunately I'll be traveling Friday and all next week - so there will be another break in my progress.  Fortunately this is more hobby and learning.  There's no deadline.

Next up on the list is sensing fuel level.  I'm thinking capacitive right now, but I've got a ridiculous number of different ideas including optical (index of refraction) and pressure.



 

RE: Spark plug wire inductive pickup for RPM

Mine was a 74 RX2, books say they never made one that year.  It was tuned to factory specs but either from a change in emissions standards or it was just made wrong.  The rotor was a couple degrees off from the point cam.  Not only did it eat points but plugs,  10K and it needed new ones.  I eventually soldered a short length of wire to the rotor and that solved everything.  Car is long gone but still have the engine 50K.  Yup, they gave me a new one after 5 years.

Does the vertical decent screen say GOODBYE after a certain point?

RE: Spark plug wire inductive pickup for RPM

(OP)
Interesting.  My RX4 specified NGK B7EM plugs.  It worked great with those plugs.  A couple of times I used the Champion equivalents.  Ran fine with them too - but used them up in no time.

>> Does the vertical decent screen say GOODBYE after a certain point?

I'm not sure what you're asking?

 

RE: Spark plug wire inductive pickup for RPM

If it is the LAST screen the pilot will ever see, you ought to do something special.

RE: Spark plug wire inductive pickup for RPM

(OP)
>> If it is the LAST screen the pilot will ever see, you ought to do something special.

Ah yes of course!  It says "shut up and die like a man!"

This comes from a true story incidentally.  We usually communicate by ham radio when hang gliding in the mountains.  A few years back there was a pilot that had got blown back.  He was now low and looked like he was going to be landing in some very unfriendly terrain.  He was on radio constantly narrating his worsening situation.  When he finally took a breath, one of the other pilots got on radio and said "shut up and die like a man!"   It can be a rough crowd sometimes.

RE: Spark plug wire inductive pickup for RPM

Quote (ziploc):

We just built a small simulator consisting of a distributor and coil, powered by a 12V battery and turned by a cordless drill.  The distributor goes to an 8-cylinder engine, but we only use the points in it - not the rotor.  So the coil fires the same spark plug every time the points open.

Maybe this is the cause of the second ringing? Since the high tension circuit is left connected, could there be a second firing when the point re-closes? Seems plausible to me from a circuit analysis point of view but depends on the ignition design.

I suspect the larger ringing is actually the spark you're after and the smaller ringing is the secondary spark. As already discussed, this suggests the circuit is currently too sensitive. Either reduce the sensitivity (lower the input resistive divider ratio or reduce the number of turns on the sense wire) or slow the response (add capacitance).
 

RE: Spark plug wire inductive pickup for RPM

(OP)
>> Maybe this is the cause of the second ringing? Since the high tension circuit is left connected, could there be a second firing when the point re-closes?

I don't see how the points closing could cause a second spark, but I could be wrong. Also, the time between the first and second set of pulses does not change with RPM.

I didn't get a chance to try the suggestions OperaHouse made today, but hopefully tomorrow.  Otherwise it'll have to wait a week.

RE: Spark plug wire inductive pickup for RPM

(OP)
Yo OperaHouse - on the plane back east last night I decided to see if I could understand the circuit you gave me.  I thought it made sense, except the diode was reversed relative to what I would expect.  I would have thought you were using the forward bias voltage to establish a voltage level on the base of the transistor.  Can you walk me through it?

Thanks.

RE: Spark plug wire inductive pickup for RPM

That diode protects against revers voltage. The transistor operates in a starved condition which makes it more sensitive.  That is the reason the collector is normally at 5V. Note the resistor is dotted in as an option, you may want to eliminate it. At the times I write posts things may be glossed over. I just wrote your longer post and it was eliminated when my finger glanced over the pad.

RE: Spark plug wire inductive pickup for RPM

(OP)
Thanks very much for the explanation.  It occurred to me that the diode would protect against reverse voltage, but I'm not familiar with the downside of bringing the base to a negative voltage.  I thought that was no different than bringing it to ground.

I presume there's no downside to bringing the base to to high a positive voltage?

 

RE: Spark plug wire inductive pickup for RPM

(OP)
I think I may have found an answer to my questions by poking around on Google.  It looks like the BE junction will zener at something like -7V, and no need to limit positive voltage as long as collector current is limited.  

This is very interesting stuff, that I've always wanted to learn.  Maybe this is the time :)

 

RE: Spark plug wire inductive pickup for RPM

(OP)
Alrighty - a new (and now obvious) factoid was pointed out to me... No need to limit the positive voltage to the base with a diode - since the B-E junction IS a diode.

 

RE: Spark plug wire inductive pickup for RPM

[quote=ziploc]I don't see how the points closing could cause a second spark, but I could be wrong. Also, the time between the first and second set of pulses does not change with RPM.[/quote]

I find this all quite curious so set about modeling a very simple ignition circuit. See the attachment for circuit and results.
  • The battery is Vbatt and the series resistance limits the current in the coil to 3.5A (slightly lower than typical).
  • The coil is K1. It has a typical 1:100 ratio and fairly typical leakage and primary inductance (maybe a little lower).
  • The points are S2, driven with 50% duty at 260Hz. The condensor is C2 and is roughly typical value.
  • S3 is a hack to allow a small current in the secondary during the "charge" (points closed) phase. Without it I couldn't get the primary current to rise quick enough.
  • S1 is a very hacky model of the spark plug. It shorts to 5 Ohms when the voltage across it rises to 1120V. C1 then keeps it operating for a millisecond or so to simulate the ionisation effect.
The results show expected spark behaviour - at the moment the points open, the coil voltage shoots up to 1120kV at which point the spark plug operates (without the spark plug the secondary voltage reaches about 100kV). Spark plug voltage drops suddenly while it's operating, and the energy in the coil cycles until it dissipates.

When the "ionisation" voltage falls below 880V and the spark "extinguishes", something interesting happens. The small amount of energy left in the coil now appears as a large voltage across the spark plug. It's not enough to "reignite" the spark, but it's still a good 1kV or so. Since there is no conduction, this second spark plug voltage oscillates until the energy is all dissipated. The point in time this happens is entirely dictated by the SPARK threshold voltage.

The circuit model has plenty of flaws, but I think it's plausible that it's demonstrating something realistic.

So I think you're quite correct - my original suggestion that the secondary ringing could be caused by the points reclosing is probably baloney. But perhaps it is the spark extinguishing that gives rise the second ringing? Once the arc is established, I wouldn't actually expect a lot of voltage across the plug. If there's still energy in the coil however, and the distributor has not disconnected the plug, then a significant plug voltage ringing is plausible.
 

RE: Spark plug wire inductive pickup for RPM

(OP)
That's very interesting.  If I'm understanding you correctly, you believe that the first pulse is the actual spark.  Then there's a significant gap, followed by ringing in the ignition circuit - not in the detection circuit.

I have to confess that I don't understand why there would be ringing when the voltage is below that which would cause the spark, but it does make sense in an intuitive way.  I guess the current would flow back and forth trading current for electromagnetic field until it decays through normal resistive losses(?)

DISCLAIMER: whenever you read stuff from me that sounds like I don't know what I'm talking about... it's because I probably don't.

RE: Spark plug wire inductive pickup for RPM

This is Eng-Tips  but maybe we should go back to basics.  I started with a NPN transistor because everyone has one and I don't like tying an input directly to a micro.  There is a chance that you could make it work without the transistor gain.  I believe the first largest pulse is probably negative.   The transistor circuit could be flipped upside down and a PNP used.  Then a negative pulse would cause a positive pulse.  The UNO can use either type of pulse.

The 100K resistor is there because the base should always be tied to the emitter with a linear resistance.  With no bias the collector is  at +5V except when a strong positive pulse is at the base.   Increasing the bias, the 1 or 2M resistor makes it more sensitive.  This could be increased  for more gain till the collector voltage dropped to about 4V.  
The pot and capacitor suggested on the input was to cause AC loading to reduce the gain so only the strongest positive pulses caused the collector to go to near 0V.   Gain reduction could also be accomplished by reducing the 100K resistor to 10K or lower.

This bias could be increased until the transistor is fully conducting with the collector normally at 0V.  Then a large negative signal at the base would cause the collector to go positive.  This may be the best option requiring only a change in software.

The capacitor from the collector to emitter suggestion was to stretch the pulse.   The transistor shorts out the capacitor then the pull up resistor charges the capacitor at a known RC time constant.

There are a dozen ways to do this, I can only guess at an approach.  You have a test setup and a scope.  Looking at the signal on the base should indicate what approach to take. Never assume anything with an emission system. My Ford DIS system fires two plugs at a time.  One plug at each end of the coil.  One gets a positive and the other a negative.  For thaat reasin the correct plugs use platinum at each end of the electrode

 

RE: Spark plug wire inductive pickup for RPM

(OP)
Thanks again.  There's a surprising amount I don't know still.  I'm reading up on this business of biasing and gain setting in the manner you describe.  It seems like it should be obvious to me, but it's taking me some effort.

Should I be asking these basic questions on a different part of the forum?

RE: Spark plug wire inductive pickup for RPM

Quote:

Should I be asking these basic questions on a different part of the forum?

No way man. Some of us are trying to crack the same nut, and hoping you get there first, so that we can follow! Any tool you need to use along the way is best picked up right here.

My own efforts with a 2917 tacho chip have utterly failed twice now. Probably always same problem; the system I'm trying to measure has a lot of "noise" and when the main signal dies off (probably due to my poor circuit design knowledge) the noise takes over, and the tach's output goes bonkers.

Thanks OperaHouse for the circuit diagram - I've got those components in my spare parts bin, too, so I'm going to give it a try. I don't have an o'scope though. My datalogger will show either garbage, or a steady proportional reading. We'll see.

STF

RE: Spark plug wire inductive pickup for RPM

If it works at idle it will work better at higher rpm. Idle/low load is the lowest spark voltage. As compression pressures icrease the spark gap voltage has to inscrase. Ringing should stay at about the same voltage. Adjusting the bias voltage high so the transistor conducts all the time except when it picks up a negative pulse should eliminate a lot of noise.

RE: Spark plug wire inductive pickup for RPM

(OP)
Thanks again for all the great info. This project is on hold for me again as I'm completely focused on the upwind cart thing. This weekend and next we've got the North American Land Sailing Association out to observe our record attempts to go directly upwind faster than the wind. Hopefully we'll put that to bed and I can focus on this again.

RE: Spark plug wire inductive pickup for RPM

If anyone is interested, and if you can (or want) to access the igntion coil, the megasquirt tach circuit Megasquirt works very well. The following are captures with the circuit connected to the coil on my Honda VT500 Ascot motorcycle. The Ascot has  electronic ignition.

Scope In

Scope Out


 

RE: Spark plug wire inductive pickup for RPM

(OP)
Well, I've got the spark sensor working and I think it's reporting RPM correctly. But when I use it on my paramotor the LCD display goes completely bonkers. I imagine the noise of the spark is running through the circuit and doing horrible things. I'd appreciate any thoughts on how to solve this. I'm thinking an opto-isolator, but not sure if that will get rid of the high frequency content that's causing the trouble.

Here's the circuit as it stands now.

RE: Spark plug wire inductive pickup for RPM

(OP)
Looks like that attachment didn't work. Let's try this:

RE: Spark plug wire inductive pickup for RPM

What makes you think it is reporting RPM correctly? What have you measured?

What LCD? How is the LCD connected?

You might be right, but at the moment it could be many other things too. Is the uC getting the signal okay? If so then it could be a grounding issue instead. Best to show the complete circuit, including the LCD.

RE: Spark plug wire inductive pickup for RPM

(OP)
I think it's reporting RPM correctly because I'm recording the time periods between pulses and they're now very well behaved. I've been meaning to put it back on the scope and verify the periods recorded are in agreement with the pulses I see - but it seems unlikely I'll find an error there. I'm also keeping a count of how many time periods fall outside of the expected range (of about 1K to 10K RPM). The count hovers pretty close to zero until I get the ignition simulator spinning faster than 10K. The "ignition simulator" is just a coil and distributor mounted on a board that I spin with a variable speed cordless drill. It's set up to spark on all 8 cylinders so it's very easy to get an equivalent single cylinder 10K RPM with the cordless drill.

This is the LCD display: http://www.hacktronics.com/LCDs/20-x-4-LCD-Black-o... "20 x 4 LCD, 5 volt, based on the popular HD44780"
Here is how the LCD is connected to the Arduino:

Display Arduino
------------- ----------------
1 (VSS) GND Arduino pin
2 (VDD) +5v Arduino pin
3 (contrast) output of pot (Gnd-to-5V)
4 RS Arduino digital pin 12
5 R/W Arduino digital pin 11
6 Enable Arduino digital pin 10
7 No connection
8 No connection
9 No connection
10 No connection
11 LCD Data4 Arduino digital pin 6
12 LCD Data5 Arduino digital pin 5
13 LCD Data6 Arduino digital pin 4
14 LCD Data7 Arduino digital pin 3
15 Backlight No connection
16 Backlight GND No connection

I'm pretty sure display pins 7-10 are optional data inputs. They currently have no connection and are not specified to be in use. Do you suppose I need to tie them high or low?

>> Is the uC getting the signal okay?

Yes. I can also stream the results to the laptop via USB serial comms - and that continues to show good results after the display has gone wacky.

>>it could be a grounding issue instead.

Interesting. Can you tell me more?

>> Best to show the complete circuit, including the LCD.

Do you mean a circuit diagram or a photo? I can try to provide either. The whole thing is haywired on one of those proto-boards with jumper wires - it occurs to me that all those wires could be behaving as antennas for all this high freq noise. Not sure how to handle that on a proto-board.

For now let me describe the basis of how the parts are hooked together...

I'm powering the Arduino from a 9V battery. The Arduino provides a regulated 5V output. I use the Arduino Gnd and 5V regulated output to the Vcc and Gnd rails of the proto-board. This is how I power the 555, transistor, display, etc. Does that make sense?

Thanks very much for any tips. If you think sharing power and Gnd between the transistor, 555, and display (and the shield of the ignition pickup wire) is the problem, could you suggest a cheap isolated supply to power the transistor? I would then keep that as a completely separate circuit that would communicate with the 555 through an opto-isolator.

Disclaimer - I'm a complete hack.

Thanks!






RE: Spark plug wire inductive pickup for RPM

A 9 volt battery may not have enough capacity to power your display and processor and be sagging quite a bit under the load of the backlight. A typical 4x20 LCD draws about 5ma for the display and 60-100ma for the backlight. Another item to look at is the capacity of the regulator on the Arduino.

RE: Spark plug wire inductive pickup for RPM

(OP)
Thanks for the tip. I don't think that's an issue for two reasons. First, it works perfectly until I fire up the ignition system that it's measuring, and secondly because I'm not using the LCD backlight. But I can certainly measure the draw and voltage of the LCD and check the specs on the Arduino.

RE: Spark plug wire inductive pickup for RPM

Pins 7-10 aren't needed in 4-bit mode. Once you tell the LCD you're in 4-bit mode, they're ignored, so it doesn't matter if they're floating.

The noise hypothesis seems unlikely: the signals are all relatively low impedance sources and relatively high impedance sinks, 5 volt, digital and fairly slow. You'd need a fair bit of noise to corrupt that. Additionally, you're conditioning your input signal from the coil so by the time it reaches the uC, it's just normal 5V signal. I think you'd actually have to wrap the lead from your coil around some of the other signal lines to get enough noise to cause a problem.

Grounding could still be a problem, because if your ground reference bounces up enough, the 5V signal will look like a 0V signal. Still, as long as you have a short ground wire between the uC and the LCD, it's unlikely. Have you connected the -ve terminal of the battery to the common of the spark generating circuit?

You could be right - perhaps isolating this and boosting that will help, but without taking some measurements it's hard to know! If you can get a CRO onto those signals to the LCD, things might be a lot clearer.

If you post the complete schematic we might be able to spot any likely areas for immediate investigation.

I've had lots of fun with the HD44780 family - sometimes it seems it's completely dead and then you swap the order of one particular instruction or something and boom, everything works!

RE: Spark plug wire inductive pickup for RPM

Good job.....even if you did use a 555. So why didn't you ground the shield? I think the problem is all those leads acting as an antenna. Sticck your circuit in a plastic bag and then wrap some grounded aluminum foil around it.

Unrelated but a good story. I worked at this place and their ESD testing consisted Of two large contactors wrapped in foam doing a relay race and this vintage cattle prod. I had just finished a pump control using one of Microchips 8 pin micros running the internal clock. I actuall ran pump pressure data serially out a pin that operated the ON LED. I brough from home an old LSI blue pig and fitted it with an opto isolator to that pin. We all liked to destroy stuff so I had that cattle prod arcing to every place on that circuit board. Data just kept clocking out with no sign of a glitch. I was set on zapping it till something happened. Finally it did. I took out the opto isolated LSI pig. The micro kept on working. I have no hard data on it but it just seemed that the micros with internal clocks were a lot more stable than those with crystals.

RE: Spark plug wire inductive pickup for RPM

Opera,

I thought that said "ESD testing consisted of two large contractors wrapped in foam doing a relay race and this vintage cattle prod." I was wondering how often you went through contractors, if you gave them hazard pay for the cattle prod work, etc. Didn't see the reason in them being big, maybe other than they couldn't easily catch you.

Dan - Owner
http://www.Hi-TecDesigns.com

RE: Spark plug wire inductive pickup for RPM

(OP)
Sorry for the delay guys. I'll try to respond to your questions here. I sure appreciate the tips.

>> Grounding could still be a problem, because if your ground reference bounces up enough, the 5V signal will look like a 0V signal.

Hmmm... It's probably a 5" wire between uC and display Gnd. It's a skinny piece of wire that's routed through the rest of the jumble of wires around the Arduino and 555. The transistor and the coax pickup wire are on the other end of the proto-board at least a couple of inches away.

>> Have you connected the -ve terminal of the battery to the common of the spark generating circuit?

I've run it both ways. No noticeable difference.

>> If you can get a CRO onto those signals to the LCD, things might be a lot clearer.

I just tried my digital scope between the Vcc and Gnd pins on the LCD. I couldn't see any significant noise there. What I did find surprising is that it showed only about 3.7V when I was running the circuit from a decidedly tire 9V battery and about 4.75V when I was running the circuit from the USB cable from my laptop. The LCD display is being powered from the Arduino 5V regulated output.

>> If you post the complete schematic we might be able to spot any likely areas for immediate investigation.

I don't actually have a good way to draw a schematic. This is the basic circuit: https://www.dropbox.com/s/ba91zt1tez1uue9/As-built...
I'll have to describe the rest. The Arduino is powered by either a 9V battery or the USB cable. It has a regulated 5V output. I simply use the Arduino Gnd and regulated 5V output to power the display, 555, transistor, etc. Basically those are my power and ground rails throughout.

>> So why didn't you ground the shield?

Good question. I actually got that wrong. The shield has always been grounded to the circuit. The other end of the shield has never been grounded. But I have tried also grounding the circuit to the engine or ignition simulator. That hasn't helped. I have since tried connecting the shield to the circuit ground through a 22 pF cap. I just thought I'd try capacitively coupling it so there is no DC connection at all to the engine. This didn't change anything. The circuit still performs well, and the display still gets wacky.

It turns out that the circuit far more unhappy when hooked up to my actual 2-stroke motor than when it's hooked up to the ignition simulator.

>> I think the problem is all those leads acting as an antenna. Stick your circuit in a plastic bag and then wrap some grounded aluminum foil around it.

Good call. I'll give that a try. What I have found is that the LCD display is fine when I don't have the spark sensing wire attached to the spark plug cable. I can leave everything right where it is, and the LCD has problems when I hook up the sensor wire to the spark plug wire, but no problems when I don't. This leads me to believe the noise is coming in through that wire. Is that a reasonable conclusion?

RE: Spark plug wire inductive pickup for RPM

Couple of ideas that might work. That coax shield acts as an antenna bringing the noise
to your circuit. You may be inducing that noise by where you terminate the shield because
of leasd inductance of your circuit ground. Try attaching the shield at different locations
where the ground copper is larger. Since ignition noise is your signal, the only real purpose
is eliminate possible RF. Try attaching the shield only at the engine. If that does nothing,
modify the pickup end in this way. Cut the pickup center lead to less than a half inch.
Attach a 47K 1/2W resistor to that lead and solder a 4 inch solid wire to the other end of
the resistor so it can be wrapped around the ignition lead. Cover with heat shrink tubing.

RE: Spark plug wire inductive pickup for RPM

Is there an ignition cutoff switch? If so, you may want to grab a signal off that. It's still dirty with lots of ringing but should be cleaner than inductive secondary pickup. The low voltages you're seeing re "What I did find surprising is that it showed only about 3.7V when I was running the circuit from a decidedly tire 9V battery and about 4.75V when I was running the circuit from the USB cable from my laptop." may still need to be addressed. The display processors, in my experience, get unstable with dirty/low power although I do take note of the fact that all is well until the engine is running.

RE: Spark plug wire inductive pickup for RPM

YIKES........Where was that written. Good call on the power. I read a lot of posts at 3AM when I can't find my glasses. My eyes generally glaze over when a post is longer than three sentences. I would avoid powering anything external off the UNO on board regulator. Since this is an aircraft and I presume the design will be shared with others, I would avoid connecting anything "directly" to the engine like to the points.

RE: Spark plug wire inductive pickup for RPM

Just a thought - In the interest of reducing RF, does that engine use a resistor plug? If not, see if they spec a resistor plug and/or plug wire option. Non-resistor plugs and wires emit enormous amounts of RF compared to the resistor versions. Also, relative placement of your device can make a huge difference - like any other EM radiation, RF follows the inverse square law - double the distance means 1/4 the amplitude.

RE: Spark plug wire inductive pickup for RPM

Hi guys ,

This is my first post here so please bare with me a moment. I have read through this whole thread and I have a need to build either a capacitive or inductive rpm counter for a small two stroke engine. I am going to use an Ardunio as the micro controller and am quite happy with that on the code side. I am going to power the Ardunio off a separate 9 volt battery. This is not going in a flying machine and most of the time this unit wont be turned on so a small battery to power the Ardunio is fine.

This two stroke has one of the combined CDI/Magneto units. This is housed in a magneto cover on the side of the motor. It has the usual grounded kill switch configuration. One wire comes out of cdi/magneto unit and goes to kill switch. Other wire from kill switch comes back and is grounded to motor.

I don't want to build a tach in this instance but just a simple rev/cut that kills the motor above a certain rpm. So I will be counting pulses and at a certain number of pulses killing the motor via the cut off switch circuit.

What am I interested in is the last post about being able to read the spark plug pulses off the kill switch wires?

Is the pulse in the kill switch wires due to the design of these ignition units or is it just inducted noise?

If I hooked up for example a speaker across the kill switch wires would I hear an audible click from the plug?

Just trying to get my brain around how to use that signal :)

RE: Spark plug wire inductive pickup for RPM

Were it I, I'd characterize what exactly is on the kill wire. It could be anything from logic level easy to manage signal all the way to 300-400v from the CDI coil primary - and that's from a largish capacitor, not merely coil flyback. The mid 80's Yamaha dirt bikes used the last scheme - you gained much respect for that kill wire when working on those machines. Needless to say, if it is the coil primary you're going to have a tough time taming that to logic level. Not impossible though.

RE: Spark plug wire inductive pickup for RPM

I had a look today with a MM and I see that the kill switch circuit hovers around 8V at about 60Ma on full revs so I have decided not to take a signal off that after all.

Instead I set up an Ardunio with one of the freetonics hall effect sensor modules.

http://www.mixotricha.com/2013/02/11/simple-hall-e...

Wrote a simple bit of code that counts pulses driven by interrupt outputs to serial monitor.

Much to my surprise the hall effect seemed to pick up the pulse in the ignition lead just fine. I was planning to put the hall effect somewhere close to the stator but I think somewhere on the ignition lead might just do it for my purposes.

This is what I have so far. Super simple.

http://www.mixotricha.com/2013/02/11/where-to-put-...

The only thing I have not done yet is to ground the Ardunio to the frame. Sometimes the Ardunio just locks up and I need to unplug it and plug it back in again. I presume this is because I have not grounded it to the bike frame anywhere.

Before I do I just wanted to see if people thought my approach was a reasonable one? It seems almost to easy!

RE: Spark plug wire inductive pickup for RPM

I had another brain wave. Would it be possible for me to just put a resistor in parallel across the kill switch circuit to achieve what I want to do?

I just want the motor to cut out when it gets above a certain RPM. I was thinking maybe just an adjustable pot?

RE: Spark plug wire inductive pickup for RPM

A multimeter is not going to help characterize what's on that kill wire. You need to scope it. More often than not there are short duration high voltage spikes on any conductor close to or connected to an ignition system - especially CDI. You write "It almost seems too easy!". Historically and anecdotally it's not easy to get a stable, accurate microprocessor-safe signal from an existing system. The processor inputs are very easy to fry, don't be surprised if you end up with inputs that don't work any more if you connect directly to any ign system wiring or even try to do an inductive coupling scheme.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close