Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Mini-update. Tach arrived and I got some time to play with it this evening. It doesn't seem to care much about duty cycle either. So far I've only tested it up to 1700RPM; the most I can get on my 4hp spun with a drill. The plugs out and the L/U is off. But I get the same reading on the tach if I connect at the output of the detector as I get if I connect to the 50% signal. Looks like I'm in for a dramatic simplification! :p
 

byacey

Chief Petty Officer
Joined
Jul 20, 2005
Messages
443
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

That's good! Most Auto hand held RPM / Dwell meters don't seem to be affected by the dwell between 4 / 6 / 8 cylinder engines, so I didn't think it was too critical.
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Hey guys .. while we're all doing our two cents .. Three thoughts come to mind:<br /><br />On the input, the LM324 can take high differential input voltage differences, but you can't drive the inputs below Vdd .. in this case ground. I think you are fine there (don't need a clamp). I don't know ANYTHING about a magneto output, but the 220K should isolate you just fine as the input bias current is about 45 nanoamps, so it's fairly impossible to hurt the input.<br /><br />The second thought on the input is I don't think I'd let it drift. Again, don't know anything about the nature of the input, but if is is some coil with a magnet going by, then it may be some sort of current pump with a fairly high output impedence. Have you scoped pin 13? It seems like we are relying the bias current from the op amp to bring the voltage back up after the mag brings it down? If it is sloshing around (with respect to the input) it might make sense to set the voltage with a ladder just like you did on pin 12. I guess my concern is is the filter cap is making pin 13 slew at a much different rate than the input. Which brings us to my third thought:<br /><br />Man, that is a pretty fast amp. 50v/uS by my spec. This means you should have had a pretty square wave with very sharp slews. less than a 1/4 uS to slew 12V. You shouldn't need the flip buffer. No big deal, but clearly something is amiss. You aren't driving a capacitive load, is Vcc current limited in any way?<br /><br />Just thinking out loud ...<br /><br />Dave
 

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Thanks for the input davef! I don't know what was going on with the CLK input of the 4013 - maybe the one I have on hand here is plain broken. I thought I had a few but when I went looking there was just one left. Vcc is current limited by the power supply protection parts, but I tried bypassing that (along with a bunch of other things) to get it to switch properly. <br />The wave I captured at pin 14 appeared very square, but the capure equpitment I have is somewhat primative.<br />The detector OP AMP is set up as a bit of a schmitt trigger to help cancel out any noise. The output of the magneto has a lot of ringing and needs (IMO) a little more than simple filtering. I'll try to get a pic of the output of the magneto up so you can see what I mean.<br /><br />But now I think I'm back to squre 1. If the tach doesn't care, most of that circuit is pointless. I think if I'm just amplifying and cleaning up the signal, then I may switch back to discrete transistors since that'll simplify the power supply. (wait a minute though - I just have to loose the 4013 for that. Hmmm...)<br /><br />Right now I have a perfectly good working circuit, tested up to 1700 RPM. It's just overcomplicated.
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Maybe just a emitter-follower or darlinton off the op amp? Also, again, I don't know anything about magnetos, but I would imagine this is a pretty noisy environment electronically (including ground). If the output is differential, you might try twisted pairs and possibly isolate the ground of your circuit. If it is single-ended, you might try some ferite beads. Noisy environments, especially when ground is noisy as well are sometimes more art than science. If ground is very stable (check case ground to different ground points in your circuit with a scope), then eliminating noise is a bit easier. In general, lower the input impedence of your ciruit as much as possible without swamping out the mag .. that's what you are doing at high frequencies with C1. In some cases, WHERE you put the components matters as much as their value if you have a noisy environment. <br /><br />Many many years ago I designed electronics for targeting systems in tanks. We'd spend hours hand-building a high gain amp (that was amplifying EVERYTHING we didn't want to amplify), and would move twisted pairs a couple of inches, and then relocate a cap on the board and tah dah! I found you can pretty much build one of anything .. it's building 100 a month by little old ladies that is the trick. In general, put filter caps on all your chips and inputs as close as possible to the chip. Well, enough rambling .. looks like you clearly know what you are doing. Nice work!
 

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

No, no, I'm an amature at this! Thanks for your input, it's very valuable to me. I'll set up an expermiment to see how much loading the magneto can take before spark starts to weaken. Initially I just checked it out and then went with a lot more resistance to be safe - not thinking that this would hurt with noise from the other things on the boat. (other than the ringing magneto & noise from the HT sparkplug leads).<br /><br />EDIT: Wow, I was way off. I tested with a 1/2" gap (I set up my magnetos deadly) and spark only disappeared after loading it down to appx 5k ohms. Looks like I can reduce my input resistor by a factor of 10.
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Hey Paul. Well, the first thing I missed was that R5 and R2 are tied to the input of your op amp. I tried to train my eyes years ago when I was looking at a node to ignore everything not connected. My .gif doesn't have a "dot" there, so I was wondering why you had that op amp input drifting. I see you do have it nailed at about 1/3 Vcc. Dopey me. I do think you want to drop your input resistor value some .. bear in mind this will drop your RC time constant, so the voltage at pin 18 will now slew down much faster as the mag drives the voltage down, but will slew back up at the same rate it does now since what pulls 18 down is your mag in series with your new lower R1, but what pulls it up is Vcc through R5, which is 220K. I'm thinking I'd lower your bias resistors (R5 and R2) proportionally as well or you will probably get some very asymetrical waves at the inverting input. Exactly how much will be imperical as your diode and mag impedences are a bit unknown. The little I understand of the mag is that it is a current pump (as opposed to a voltage source). Finally, again, since your are dropping RC by an order of magnitude, the pole on your input filter will go up by that same amount (factor of 10). In general terms, the pole is the frequency where the filter is dropping the input voltage by 3db .. it's just a reference point to give you an idea what frequencies are being filtered (1/(2XpiXRC)). If you drop R1 by some amount (say, a factor of 10), you will need to increase C1 by that same factor to continue filtering the same noise frequencies. Unfortunately, this stuff gets so complicated so quickly, that, unless you have computer models and simulation tools, the best bet is to swag and try. You are swagging well.
 

byacey

Chief Petty Officer
Joined
Jul 20, 2005
Messages
443
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

I would also put a 1.0mfd across R23 to Create a virtual AC ground at the + input of the LM324.
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Hmm. Again, it's been many years since I've done this stuff, but I think as the circuit stands, you will have the inverting input dropping from 3.75v to something less than 2.28v, but I don't know what, as, again, I don't know much about the mag. The non-inverting input should be sitting around 2.28v and then will slew quickly to 2.8v when the inverting input crosses below 2.28v. This raises the threshold (hysteresis) on the Schmitt trigger in case you have some ringing on the input.<br /><br />If you add the cap, everything will probably stay the same (may get rid of some noise at the non-inverting input) except the non-inverting pin will slew from 2.28 to 2.8 slower, and may cause oscillations if you have input ringing.<br /><br />Also, with a schmitt, it's pretty common to clamp the output with back-to-back zeners for better control.<br /><br />Ok .. how do you get images imbeded in this message .. do you have to put them on the web somewhere first? I had some drawings to illustrate this, but it looks like I have to publish them to a url and then grab them?
 

byacey

Chief Petty Officer
Joined
Jul 20, 2005
Messages
443
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

I don't think speed it that big a concern here. The I doubt it will ever see 1 KHz.
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Hey byacey ... I agree. I wish I were smart enough to insert a drawing. I was concerned that Paul may be getting considerable ringing and noise on the rise/fall edges from the inductive input. In not, you're probably right. That 324 is fast enough that if, once it switches, if the input rings or spikes negatively (with respect to the pulse), the output will switch in a couple of microsecs. If the ringing is not fast or of enough magnitude to cross the threshold, the cap may be a good idea.
 

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Ok, sorry I didn't reply immediately. All that needed to sink in a bit. Pardon my missing node, somehow I missed it on the original schematic.<br /><br />I don't understand why, but when I lowered the input impedance I hardly needed to increase C1 to get rid of most the noise - just 2x. Perhaps this has something to do with the lowering of the bias resistor. There's plenty I don't understand about the magneto too. :) <br />The much stronger signal is producing a pulse that is much wider than the one I was working with. Here's the signal at the input of the schmitt trigger (bias is now about 5.5v, 1000rpm):<br />
fbc4du.gif
<br />So no trouble at all driving a tach with that. You'll notice one pulse is a fair bit different than the second. The first is firing over a 3/8" gap while the second is firing over a 0.030" gap. I'm doing this because it sort of simulates firing under compression, which greatly increases the breakdown voltage for air. <br /><br />Here's what I'm working with now:<br /> http://tinypic.com/fbc6kw.gif <br /><br />Since I don't have any of that pulse lengthening stuff there anymore, I can safely remove all that power supply protection (LM358 is good for 32v, which shouldn't be a problem). I did put in the zener just in case - those magnetos can arc over on themselves and although the LM358 is tough, I don't think it would survive that. Also I "re-programmed" the schmitt to fire at about 2.5v and 3.5v to give a real wide margin. <br /><br />I did have a problem with occasional flicking up & down on the tach. You were right, noise at the non-inverting input was at fault. I first tried .47uf, but it seemed too much. .1uF did the trick nicely. <br /><br />The 1k on the output is to permit shorting to +12v or ground without hurting the amp.<br /><br />Here's a shot of the output to the tach:<br />
fbc9w1.gif
<br />So far I've only tested it to about 1700RPMS, but I don't see any reason it wouldn't go right up.<br /><br />davef, would you mind explaining the back to back zeners on the output? Do you clamp it to ground? Will it help with the slow-rising inverting input, which is really slow rising now that it's got a .1uf capacitor hanging off it?<br /><br />I went with the LM358 because it's practically identical to the LM324 and easy to find. But I'm only using one of the opamps - any suggestions on what to do for the second?
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Hey Paul. Apologies for my slow response as well. I've been "off line" for a bit. Actually, the zeners will harm your desire for a faster slew at the non-inverting if anything. Yes, they are a clamp to ground, and, in your case (single sided power with no negative Vdd), you only need the one. They are typically put in if your output needs to be an exact level so it doesn't follow your power supply (Vcc). I'm thinking for your app, it's really not needed (I'm over-designing). <br /><br />I think to help your slew at the non-inverting, start dropping R24. It will increase your hysteresis, and your thresholds will widen, so you will need to see how this affects your pulse width, but it will also increase your slew rate. Might make sense to just drop a pot in there and start tweaking.<br /><br />As for the other amp? Well, there's always (gulp) active feedback. Understand, I'm not necessarily advocating it, but, in theory, if you can keep it from oscillating, you may get some better noise isolation at your non-inverting input, as well as that node could be a much lower impedence node (thus, faster, less noisy). Active feedback circuits are always tricky, and (in my opinion) should only be used if it's the only thing you can think of. I'll include a possible example where I replaced the schmitt passive feedback (resistor) with an op amp follower. The output impedence of the second op amp is MUCH lower than the 100K previously there, so that node now should swing much faster between the zener voltage (3.3 .. or whatever you think makes sense with respect to the inverting input) and, in this case, about 2v. You can set the 5K and 1K to whatever you want to adjust the hysteresis. You can explore what makes sense with the cap (or if you even need one now). These types of circuits are notorious for startup issues, however. Meaning, depending on what part of the amp comes up first, they can start to oscillate on startup, so startup caps sometimes need to be placed to insure one input is always below another until the circuit is fully active.<br /><br />Again .. if you can drop the feedback resister and get there, that is clearly the simpler route.<br /><br />Good luck!<br /> http://pg.photos.yahoo.com/ph/fox_d_a/album?.dir=/6a62
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

OH .. BTW, I don't have a breadboard anymore, so this was completely a sketch off the top of my head. If you actually want to implement it, you'll have to dink with it. It's absolutely not a proven circuit I found in a book .. it's more of an idea than anything. Also, "hat's off" to byacey, who came up with the noise-defeating cap.
 

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Hey, that's pretty neat! I'll try fooling with it a bit & see what I can come up with.<br /><br />I don't breadboard much but rather wire circuits up with soldered point-to-point wiring using wire-wrap wire. I'm always scavanging parts from old equiptment and they don't seem to fit bread boards all that well with the clipped leads. And now I find I'm using a lot more SMT parts and that won't work at all with the bread board.<br /><br />I'm hesitating to use fixed voltages at any point in the circuit because of the wide V+ variences we can expect (say, 10.5-16v). But perhaps it won't matter there. Will test and see.
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

Yeah .. if Vcc varies alot, it would seem like the input to the Schmitt would move around at a 22/37 (about half) ratio to Vcc assuming a low impedence for the mag. You'd need to put a resistor in series with the zener so that the voltage at the non-inverting goes up as Vcc goes up. A bit tricky, as you need to make sure you are on the somewhat linear part of the V/I curves of the zener (and you'll need to use a lower zener voltage).<br /><br />Good luck!
 

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

That's what simulators are for - a crutch for my bad math. :D <br /><br />Thanks again!
 

dafox99

Petty Officer 1st Class
Joined
Jul 8, 2005
Messages
203
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

ABSOLUTELY! Is there a cheap simulator for us normal guys? Typically, the engine behind them is SPICE, but I didn't know if there was something inexpensive that a guy could just run at home?
 

Paul Moir

Admiral
Joined
Nov 5, 2002
Messages
6,847
Re: Tachometer black box for magnetos, Attn byacey, lark2004 (DONE?!?)

I've just been using CircuitMaker Student version. Its got some limitations but none are really very serious. It used to be freely downloadable but it seems to be taken off. Searching for cmstudnt.exe reveals a couple cracks, so perhaps that's the reason it's gone.<br />The computer I had the install exe on is down and I've got to go fix it to get it back. But that will take some time. Let me know if you need it though and I'll get on it.<br /><br />SPICE is the core naturally. CM works a lot better than SPICECAD 1.0 (linux) which is the only other SPICE front end I've ever used.
 
Top