Briggs Speed Sensor

Discussion in 'General Electronics Chat' started by pntrbl, May 13, 2008.

  1. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    1st I need to say thanx to all of you who pointed me along the correct path to building a 339 based starter circuit for a Briggs motor. At whatever tenths of battery discharge I set, the 339 kicks, fwd biases a transistor, click goes the relay, and that little motor whirs right up! Very cool.

    But now I gotta figure out a way to shut it off .... :D

    There's a big ol' magnet on the flywheel for the ignition that should trigger a hall effect. Mouser has a OHS3177U that seems appropriate, but again, I don't really have a clue .....

    And then I'll need some way to count or otherwise quantify the resulting pulse train. Possibly a clock of some kind to compare to? Any output over the zener will shut the 339 down.

    But as you can see, I'm fumbling in the dark here!

    So if anyone can give me some pointers towards the light I'll hit the ground running. Thanx in advance.

    SP
     
  2. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    The hall effect I just mentioned is a bi-polar and now I see an AH180 that's omni-polar. I don't know north from south on the flywheel magnet so maybe an omni would be better?

    SP
     
  3. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    A simple coil next to the flywheel will generate a signal, if the flywheel has a magnet in it. Just build an analog frequency circuit, if it goes faster than the motor it's running. At least I think that's what your asking...
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, rather than simply shutting the motor off after a period of time or count of engine revolutions - don't you really want to turn it off when the battery is charged up? ;)

    You might do that by monitoring the charging current. When the charging current falls below a certain point, you'll know the battery is charged enough.

    If there is a load on the battery while it's being charged, you'll need to take that into account.

    You can measure current by reading the voltage as the current passes through a resistor.
    I = E/R
    E = IR
    Although wires are generally thought of as conductors, they also have a slight resistance.

    What is the rating of your generator?
     
  5. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    Thanx for the replies gents. As usual I'm not being clear enough. What I need to do is shut the starter motor off once the cylinder fires. After we have combustion I'll want to send the appropriate current into a chopped up auto alternator to start charging. As a matter of fact I was thinking to use the same speed sensing circuit to shut the starter off and then energize the alternator.

    Eventually I'll have to shut the whole thing down by monitoring the charging current but I'm just a one step at a time kinda guy.:)

    Thanx again.

    SP
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, well here's an idea for you. A magneto pickup coil, one end grounded, the other end feeds a diode that charges up a capacitor. A bleeder resistor keeps leaking the charge off.

    When the magneto pulses are coming by more rapidly (like if the engine is running at idle vs top speed) the resulting charge on C1 will be higher. The faster the engine runs, the higher the charge.

    For the pickup coil, you might just use a discarded "E"-frame transformer. Grind the opening of the E-frame to match the flywheel magneto radius as close as you can. Magnetos are most effective when they have a very small clearance between the pickup coil and the rotating magnet - but you need to allow clearance for thermal expansion.

    What the heck, you might even think about stealing a little bit of current from the existing magneto, or perhaps seeing if you can wind on a few turns of wire somewhere. You really don't need much current - all you're trying to do is get some kind of relative motor speed indication.
     
    Last edited: May 13, 2008
  7. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    What he said only with fewer details. :p
     
  8. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    Wow. That's about as simple as it gets! The K.I.S.S. principle writ large ...

    The stock magneto might be all I need. There's a wire from the Xfmer that kills the motor when it gets grounded. Ergo, it must have some voltage. Just a small maybe 20 ga wire so it must be a tap on the primary.

    I'll be looking into this ....

    Thanx again.

    SP
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hmm. That's going to take a bit of thinking. Obviously can't just connect the kill wire to the diode and a cap, because it'll steal the spark until the cap charges up, which means the engine won't start in the meantime!

    It'll need a current limiting resistor, perhaps in the vicinity of 5k-50k, between the kill switch line and the diode so that the ignition will still function. You really don't need much current; I just threw that last schematic together quickly as an example. None of the values are set in concrete.

    What I DON'T know offhand is how much voltage might be on that magneto kill switch line when the engine is running. I can only guess that it's somewhere between 5v and 25v.

    So, you can find out for us :)

    I whipped up a little simulation on a modified version of the schematic I'd thrown together last night; see the attached. L1 is a representation of only the primary side of the magneto coil; points and condenser aren't shown. There's a signal generator simulation rigged up that's generating 12v 75uS pulses every 4mS; basically, only the positive side of what I'm guessing might be a reasonable picture of the magneto output when the engine is running at 500 RPM.

    Your Mission, Mr. Phelps, should you decide to accept, is to connect a 10k resistor, a diode, and a capacitor as depicted in the 1st schematic (MagnetoPickup2.png), and take a voltage reading across C1 with the engine running. :D

    I already said that I don't know offhand how much voltage might be generated by the magneto. Let's make a safely HIGH guess of 100V.

    A 1N4148 has a PIV of 75, so that won't work. Use a 1N4004 thru 1N4007 instead. Radio Shack has an assortment of 25 of these rectifiers for a couple bucks. A number of them will be 1N4001's which are only 50PIV - they'll work fine for other projects, but not this one at the moment.

    Then comes the capacitor. All we're trying to do is to get the peak voltage reading at the moment, so the capacitor doesn't need to be very large; it's the voltage rating of the cap we're concerned with. If you have some assorted ceramic disc capacitors, one of the larger caps should work just fine.

    Before you connect the circuit, start the motor to make sure it runs. Then turn it off, connect the circuit and try re-starting it right away. If it won't start, the 10k resistor is too small. Try a 47k resistor. On the other hand, if the engine starts but you see a really low voltage across C1, try a smaller resistor.

    Watch the voltage across C1 come up as the engine starts and idles. Running the engine faster will make it charge faster - but if the cap is really small, it'll be charged really quickly anyway. Since there is no discharge path (except for your meter) the voltage won't go back down.

    Advanced Experimentation:
    Now if you want to try getting a reading that roughly corresponds to engine speed (that's the whole point, right?) then try turning off the engine, and connect a resistor that's roughly 20 to 50 times as large as R1 across C1, resulting in MagnetoPickup3.png. Since my R1 is 10k, I used a 330k resistor for R2, or 33x the value of R1.

    Then start the engine back up. You should see a low voltage across C1 when the engine is at idle, and a higher voltage when the engine is running at top speed as in MagnetoPickup4.png With my wild guesses as to what a magneto might put out, I got around 4v at idle and around 7.7v at top speed - but that's using a 0.1uF cap. If your cap is really small, you'll have a series of spikes instead. A value somewhere between 0.1uF and 0.47uF would probably work pretty well with these resistors. You wouldn't want C1 to be much larger than that, or you would get a very slow response - it would take a long time to charge or discharge C1.

    This (in conjunction with comparators) will give your system feedback to tell it when the engine starts (time to turn off the starter) and when it has attained top speed (time to turn on the alternator).

    So try those experiments, and let us know how it's going.

    For those of you who might be trying to simulate along ... there is a resistor that's not shown in the simulation. I arbitrarily assigned L1 a resistance of 10 Ohms; otherwise PSPICE complains that the matrix is singular. Leaving the resistor in the simulation would be confusing, so it's been edited out.
     
    Last edited: May 13, 2008
  10. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    Thanx again Sarge. All I can say is "mission accepted!"

    I didn't see your post until late last night due to an excessively long day in the salt mines, but I did spend a lot of time on the freeways of LA thinking about how elegantly simple a solution that circuit is. Along the way it also occurred to me that we might be hurting the spark in some way .... but maybe not.

    No points or condenser BTW, and here's a pic of the device in question. Flywheel with the magnet exposed to the right and my 339 breadboard centered just because I'm so proud of it!:D

    [​IMG]

    As that magnet on the flywheel swings by we'll get a pulse in both directions. The diode will let the positive one go by into the proposed speed sensor circuit, but the negative pulse will see a brick wall. It should still excite the secondary and I'm sure the motor won't care if the spark travels from gnd to the electrode instead of vice versa. Could be a slight retardation of the timing event but these small motors aren't exactly precision pieces. I'll bet it'll still run just fine.

    Or it might not run at all! LOL!

    Experiments are in order.

    As always, Thanx again.

    SP
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, you really want the spark to be as hot as it can be!

    My last post was really quite long. :rolleyes:

    Basically - add a current limiting resistor between the kill switch output and the diode, somewhere between 10 and 50k, to preserve the spark intensity.

    The "bleeder" resistor after the cap will need to be around 30 to 50 times the resistance of the current limiting resistor.
     
  12. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    That last post was fine Wook. I studied it! LOL! And I'm still studying it ....

    I got some preliminary results too. Putting a 1N4007 on the kill wire and then to gnd doesn't seem to bother the motor a bit. No change in exhaust pitch or rpm. Idles. Revs. I landed the diode just right once and saw a spark. Couldn't do it again but I saw it once so it's passing something .....

    Just to make sure I diode tested the 1N4007 after the motor test to make sure the mag didn't fry it open along the way. It's fine. Just for giggles I put a 1N4001 on and it didn't hurt that either. I wish I could measure the actual output but apparently it's less than 50v because the 4001 survived.

    So I'm not thinking we'll be needing a current limit. The silly thing must be running off the other side of the magnet when I diode one side to gnd. But ya know, I been wrong before. :D Will an RC circuit past the diode cause any issues? I don't think so .....

    Time to find out. I'm gonna study that long post one more time and then make a run to the Shack for some caps.

    SP
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, it's really more than just limiting the current being stolen from the mag. It's also helping by allowing you to use a smaller capacitor than you might otherwise need to smooth out the pulses.

    I think that by what you've said, a 10k current limiter and a 0.1uF/100nF ceramic cap with a 330k bleeder is going to work pretty darn well - better than what I came up with the first time around, because that was just "thrown together" with nothing really worked out.
     
  14. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    I dunno how you do it but I'm absolutely ecstatic to report that the above circuit is charging that cap to 4.2v at idle and 7.7v wide open. It's perfect!

    Mission Accomplished.

    And a job well done too ...

    Thanx again.

    SP
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    4.2V??? Your motor's idle speed must be set a little fast. :eek:

    No really, don't change your idle speed. ;) I'm genuinely surprised that it worked out that closely, considering how many plain old wild guesses I had to make while setting up the simulation! Things seldom work out that closely, even when everything's known beforehand.

    You may still need to filter the output from that circuit a bit, just to remove most of the rest of the noise. It will slow down the response somewhat, but it will help to keep your comparators from rapidly switching on and off near the threshold level.

    The rest of the noise you can take care of by adding hysterisis to the comparator circuit. This is pretty easily accomplished with a large-value feedback resistor to the non-inverting input.

    Or, do you want that darn starter motor clanking on and off? :eek: ;)
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ok, here's the next step: filtering out some of the noise.

    As things are right now, at idle there will be about 1/2 volt of noise across C1. This is just how the RC time works out. The noise will smooth out as RPMs increase, but you'll need a more stable voltage level for the comparator input, or it'll be switching faster than a sailor in San Francisco. :eek: ;)

    Take a look at the attached. I've added R3 and C2. R98 is the 10 Ohm resistor I edited out of the last several postings. R99 is just a wild guess at the comparator input current - actually, a rather bad guess it turns out. An LM339 has a 25nA typical input bias current (load), which means R99 should be around 145k instead; this will load the signal down a great deal.

    Might have to use a JFET-input op amp like a TL082 as a unity-gain amplifier/buffer, to avoid loading the signal; then feed that output to a comparator. Don't want to use an opamp as a comparator; they're not designed for such use.

    Anyway, have a look at the attached. A piece at a time, right?
     
    Last edited: May 14, 2008
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ok, here's the next step: Using a JFET-input opamp as a unity-gain buffer.

    This actually cuts our noise roughly in half again vs the previous R99; that's because of the JFET inputs. Where the LM339 comparator is 25uA input bias, the TL082 is 50pA, or 1/5000th of the load of the LM339. Now noise is down to about 12mV at idle - that's quite an improvement from 500mV! At top speed, noise will be less than 2mV.

    It wouldn't have been practical to try to feed that much current from the ignition system into the front-end of the LM339; you would've hurt the combustion efficiency of the engine, and you would've needed MUCH larger caps to try to filter out the noise. I know you said you couldn't tell any difference - but over the long haul, it will make a difference.

    We can deal with the small 12mV noise level - remember me mentioning hysterisis on the comparator? But that's in the next installment... ;)
     
    Last edited: May 14, 2008
  18. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    Sarge, you're so far ahead of me I'm not sure we're on the same planet!

    I do understand the noise tho. Due to the charge-discharge cycle on C1 there's gonna be a ripple that matches the engine rpm. If I was to use that admittedly dirty voltage to saturate a transistor would I have to care?

    Here's my starter circuit with the addition of a transistor on the base of the TIP120. Please be aware I have no idea if this would work or not!

    SP
     
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK. Just saw this, I'll have to whip it up in a simulation to see what it's doing.

    Let me clarify a couple of things:
    1) On the left 339 comparator, you have Vin and Vref - Vref is the (-) input, I'm presuming?
    2) From Vin to the output of the same 339, you have a resistor - it looks like 10 MEG - is that correct?
    3) The 5.6v Zener - do you know what it's Wattage rating is, or it's part number?

    To answer your question: yes, you do need to care if you use that admittedly dirty signal to saturate a transistor. Because that would only be a solution to the immediate problem; that of cutting off the starter after the engine gets going.

    The relative engine RPM signal (basically, a rudimentary tachometer) needs to be preserved, because you're going to need it later. After all, how else are you going to tell if the engine is up to speed, and ready for the next step: turning on the alternator to generate the current to charge the battery? That's the whole point, right? :)

    But still - eventually, your circuit will have to figure out when the battery is charged, and turn the motor off. :eek: Yes, I'm jumping ahead! Sue me! No, wait ... :eek: ;)

    You have to keep all of the necessary functions in mind, and how you're going to do all of the functions. It is all too easy to saw off the limb you're sitting on.
     
    Last edited: May 14, 2008
  20. pntrbl

    Thread Starter Active Member

    Apr 21, 2008
    123
    0
    Question #1. Yes. The Vref is the - input.

    Question #2 Yes. 10 meg. That's my best guess of a positive feedback value for between 4-5 mV of hysteresis.

    Question #3 Right now the zener's a 1 watt 1N4733 from the Shack but I got some BZX79C5V6's on the way from Mouser that AudioGuru recommended. They're a 1/2 watt and run on 5 mA compared to the 40 mA I'm putting thru the 4733. No reason to drain the batteries anymore than necessary ...

    Being the kind of person who can't leave new toys alone I've been running the motor some more. Hard to tell with a DMM but it seems to respond very briskly on the up side. When I throttle down things get a little goofy and slow. Up and down even but again, with a DMM I can't really say.

    Been thinking about "preserving the signal." That's probably a small current on the output of the speed sensor circuit? Am I possibly trying to do too much with it? Could be! Most of my projects attempt to defy the laws of physics some where along the way!

    Thanks for all the help Sarge. I got a feeling you've already saved a lot of small parts from an untimely death.

    SP
     
Loading...