Shop OBEX P1 Docs P2 Docs Learn Events
Inductive Spark Plug Wire Tachometer - Signal Transformation Help — Parallax Forums

Inductive Spark Plug Wire Tachometer - Signal Transformation Help

sirhannicksirhannick Posts: 4
edited 2013-05-13 07:01 in BASIC Stamp
I am working on a new project that is going to be a universal tachometer for small engines. It will use a wire wrapped several time around the spark plug wire. The signal needs to be converted to a cleaner digital signal that I can use to be picked up by the Basic Stamp. I'm not having issues with the coding, but rather the circuitry necessary to clean up the signal I'm getting from the spark plug wire.

I have a digital scope so I have no problem trying out different designs and then posting the results they provide. I have attached two images of what the signal is that I'm getting right now.
NewFile0.jpg


NewFile1.jpg

I've tried various combinations of diodes, capacitors, & resistors, but none has given me a signal I can really work with. Does anyone have experience with this? Any ideas?

There was a lot of discussion here:
http://www.eng-tips.com/viewthread.cfm?qid=320604
However, I don't think they ever 100% figure it out. I'm not sure if isolated power or an opto-isolator are necessary as discussed in that thread.

If I get this part figured out I have plans to turn this into an hour meter with LCD screen, maintenance monitor, and option to add more sensors.
320 x 234 - 35K
320 x 234 - 37K

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-04-27 15:28
    Have you tried a simple One-Shot (monostable multivibrator) with a 555 ?
  • davejamesdavejames Posts: 4,047
    edited 2013-04-27 16:34
    Welcome to the Forum!

    I'm gonna guess you'll only need the positive "spike" as shown in the attached pictures, correct?

    To do that, a series diode such as 1N4001 (around 50 PIV) should do the trick.

    Then, the remaining "spike" will need to be attenuated as some appear to go as high as 20V? Yes? Inputting that level of signal into a Basic Stamp will destroy it. A simple voltage divider should help there. You could use a Schmitt trigger device in between the divider and Stamp to help clean up the signal.

    Did that make any sense?
  • sirhannicksirhannick Posts: 4
    edited 2013-04-27 18:01
    Have you tried a simple One-Shot (monostable multivibrator) with a 555 ?
    Thank you for the response Beau. I have not tried that approach yet, but I have been trying & looking at circuits that use the 555 timer. I just tried a Schmitt Trigger and attached a screenshot below.
    davejames wrote: »
    I'm gonna guess you'll only need the positive "spike" as shown in the attached pictures, correct?

    To do that, a series diode such as 1N4001 (around 50 PIV) should do the trick.

    Then, the remaining "spike" will need to be attenuated as some appear to go as high as 20V? Yes? Inputting that level of signal into a Basic Stamp will destroy it. A simple voltage divider should help there. You could use a Schmitt trigger device in between the divider and Stamp to help clean up the signal.

    Did that make any sense?
    Correct. It actually seems that the spark is positive & negative, so I agree that I will need a diode somewhere in the circuit. I did not do that on the circuit I just tried, however I did try a Schmitt as you suggested. I wonder if I have to worry about the 20+ volts damaging the 555 timer? Is there a way to just "shave" off the top without reducing the amplitude of the rest of the signal?

    Circuit Used:
    555-SchmittTrigger.gif

    Here is a screenshot of the simple Schmitt I just tried:
    NewFile2.jpg

    The Schmitt is having a hard time picking what to trigger off of. If I zoom in on one of the digital "on" peaks, it's not solid, it turns on and off many times during it. I forgot to take a pic of that so it's hard to explain.

    Another issue is the signal we're dealing with is VERY low current, so anything I do to it could change the signal.

    Tomorrow I will try adding a diode to the circuit. Is there also somewhere I could add a capacitor to help the 555 stay on during it's on periods? The approximate frequency that should be the end result is 50 hertz (3000 RPM). There is approximately 20ms between sparks. I hope this information helps.

    Thank you everyone for your help so far.
    320 x 234 - 46K
    195 x 220 - 3K
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-04-27 18:51
    "...The Schmitt is having a hard time picking what to trigger off of. If I zoom in on one of the digital "on" peaks, it's not solid, it turns on and off many times ..." - That's why I suggested a one-shot. As far as input voltage, The 555 has an operating voltage of at least 15V so I would expect the inputs to handle at least that, but to be safe, a simple voltage divider will work just fine.
  • davejamesdavejames Posts: 4,047
    edited 2013-04-27 22:28
    sirhannick wrote: »
    The Schmitt is having a hard time picking what to trigger off of.

    OK - you'll have to decide what part of the whole signal is the most important. I'm guessing you're most interested in the large positive peaks.

    But what is to be done with all the "noise", right?

    You could use a comparator with one input receiving the sensed signal, and the other input would receive a manually set DC voltage. This "set voltage" would become a threshold level; with the input signal less than the threshold level, the comparator output remains in-state. When the input signal rises above the threshold, the comparator output will change its state.

    Works like a charm - use this type of circuit all the time in the equipment I support.

    There's some nifty info about comparators here:

    http://www.linuxfromscratch.dk/?page=comparator
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-04-27 23:56
    What you describe (i.e. a wire wrapped around a sparkplug wire) is a capacitive pickup, not an inductive one. An inductive pickup would entail a loop running parallel to the sparkplug wire, with one end grounded. That said, however, the following circuit might provide the filtering you're after:

    attachment.php?attachmentid=101300&d=1367132305

    The zener clamps the incoming signal between -0.6V and +5.6V. The diode charges the cap to 5.0V, which gets discharged more slowly through the parallel resistor. Combined with the Schmitt trigger, you get a one-shot of sorts.

    If the hysteresis band of the Schmitt trigger is too narrow, you can make your own, with a wider band, from a comparator and some resistors.

    -Phil
    386 x 260 - 2K
  • sirhannicksirhannick Posts: 4
    edited 2013-04-29 17:49
    Tonight I tried the recommendation of Beau and it seems to work perfectly. I followed this website:
    http://home.cogeco.ca/~rpaisley4/LM555.html#2
    There's a great chart as well as calculator that page that helps you select the correct RC values. I chose a 470K ohm resistor and a 3300pF capacitor. According to the calculator that will give me a 17ms pulse. Here's the result of the circuit:
    NewFile3.jpg
    So it seems that this approach will work. I will now move on to doing some code with the stamp to attempt to read the RPMs.

    Phil-
    Thank you for your recommendation. That is the other type of approach I've seen on various sites. Some also throw in a transistor. I may try it out if the 555 timer approach falls through.

    I will post my progress on this thread to attempt to document this all.
    320 x 234 - 37K
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2013-04-29 19:33
    That's great!, I'm glad that looks like it will work out for you. Keep us posted
  • picfanpicfan Posts: 1
    edited 2013-05-06 09:27
    sirhannick

    Something you must keep in mind is that the pulse width from the 555 is fixed regardless of trigger frequency. A small 4 cycle engine has a typical top governed speed of 3600 rpm. That's 60hz which has a 16.67ms period, which is awfully close to your calculated pulse width from the 555. 2 cycle speeds are even higher which won't allow you to use this method. When your trigger period is above your pulse width of the 555, you are just going to keep retriggering and the output won't change state.

    Have you considered doing your signal conditioning in software? Use could use a 5.1v zener in parallel with the input to quench the spikes. Use a debounce routine to read the input and delay long enough to trigger on the next pulse as opposed to part of a single pulse. You'd have to modify the pulse width of the debounce based on rpm to get around the problem you have with doing it in hardware with the 555.

    I guess it all depends on what you want your design to be able to work with, engine wise, since that dictates the input parameters you must meet. Good luck!
  • sirhannicksirhannick Posts: 4
    edited 2013-05-08 10:36
    picfan-
    What you are saying is completely true. However, for my specific application that pulse width works fine. I was able to get my stamp to give me a valid RPM output to my computer for a quick test this past weekend. My lawn mower was running around 3000rpm.

    Now I am going to work on making a small enclosure with 8x2 character display & 4-6 buttons. As I make progress I will try to compile a parts list and share my schematics, code, & so forth. My goal is to make this into a unit no larger than 3x2x1 although smaller would be nice. This would just be for my first completed unit. Eventually I would move to a PIC or maybe a SMT OEM BS2px. It all comes down to cost.

    I would be very interested to disassemble a retail tachometer/hourmeter unit I purchased on Amazon that claims to be capable of 0-99,999 RPM:
    http://www.amazon.com/Tachometer-Kawasaki-Motorcycle-Generator-Snowmobile/
    I have it installed on my father-in-law's snow blower and it seems to function decently. The RPM values are not exactly stable, but it works well as an hour meter. For the price it's great.
  • OrbilusOrbilus Posts: 10
    edited 2013-05-13 07:01
    I completely agree with Phil...Something else to think about too.
    The type of pick-up wire you use to wrap arround the plug wire matters quite a bit. Wrapping your pick-up wire more than once provides more than one pick-up signal semi-simultaneously, additionally if you are using stranded wire for pick-up you only amplify the problem. You should be able to clean up your source signal by using a single wrap with a 6 to 8 gauge solid wire or magnetic block similar to what you would find in a commercially available timing light.
Sign In or Register to comment.