Momentary Switch Circuit

I have a device that requires a momentary switch closure, however I need to activate it using a toggle type switch that will remain closed. I am hoping to find a circuit that will provide the momentary closure when the toggle switch is first closed and then not again unless the toggle switch is opened and then closed again.

I am inexperienced with electronics and need some direction. I thought adding a resistor and cacpacitor might achieve what I need by allowing current to flow while the capacitor is charging and then cutting off when it is fully charged. I don't know if this will work or how to reliably discharge the capacitor to reset for the next switch close.

I also looked at using a one-shot (monostable multivibrator) but they appear to trigger continually if the input signal persists. Maybe some additional logic could overcome this. I also wonder if an edge triggered one-shot would avoid the problem.

I would appreciate any suggestions.

Reply to
kknicker
Loading thread data ...

I am triggering buttons on a device that simulates a USB gamepad on PCs. Specifically the Ultimarc A-PAC. It is often used for building custom controllers for arcade emulators. I am using it to interface the stick, buttons, and switches on an RC airplane radio to a PC so it can be used with the FMS RC flight simulator.

The A-PAC button terminals need to grounded to activate the switch. A want the radio toggle switches like on/off and high/low rate to become momentary button presses on the controller. I think something like

1/10 of a second should be adequate to register the button press. I don't think the rise and fall time is critical here.

I don't have any specification about how much current will flow from the button terminal to ground upon closure. Would grounding the button through a multi-meter tell me this accurately?

Kevin

Reply to
kknicker

I thought a non-retriggerable was what I needed until I read it only prevents retriggering during the output pulse. I need to prevent retriggering after the output pulse because my input will remain pulled low. I only want to trigger again after the input switch goes open and then grounded again.

I see some possibilities based on the 555 in Schematica that Joel referred to. I will try those but in the final product I want to use a newer timer with duals or a quad because I have four switches to connect.

The newer timers seem to use edge triggering instead of level triggering. I am not certain edge triggering will eliminate the need to worry about my persistant input causing additional triggering after the output cycle, but I guess it will.

Reply to
kknicker

snipped-for-privacy@gmail.com wrote in news:1126204673.959601.325010 @g44g2000cwa.googlegroups.com:

I'm sure there's a 555 timer circuit that will do exactly that. The only reason I can't say for certain is because I've never made one.

Check out some of the circuits that come with Schematica's 555 timer design software

formatting link
It's not freeware but the evaluation will allow you to play with several circuit types.

Alternatively you could wait another 10 minutes and a helpful soul in the group will probably post an ASCII schematic for you.

Lastly a properly contructed Google search would probably turn up many solutions.

Joel Moore

Reply to
Joel Moore

An RC circuit can certainly generate a pulse but to know if it will do the job more info is needed about the application. What are you trying to trigger, how long does the pulse have to last, are the requirements for rise or fall time of the pulse, what kinds of voltage and currents are involved?

Dan

--
Dan Hollands
1120 S Creek Dr
 Click to see the full signature
Reply to
Dan Hollands

Simple.

+Vcc ---o o---+---|
Reply to
ehsjr

There are a number of non-retriggerable monostables that would meet your requirement - 74XX221 is a dual that I use often.

There is also a "standard" circuit for this with a 555, but I haven't used one in over a decade.

Reply to
budgie

I posted a simple schematic on sci. electronic design. Check it out.

Reply to
amdxjunk

I guess "sci. electronic design" is a binaries group? I don't have access to them. Would you be kind enough to send it to my e-mail address?

Reply to
kknicker

Here is the solution I ended up with. I found it at

formatting link
I mocked it up and I get an approximate 1/10th second pulse even when the input switch remains closed. Please pardon me if the ASCII art isn't quite standard notation. I am new at this.

+Vcc --+---------+------+---+ | | | | | | | [R1] 1K [R2] 100k [R3] | | | | | +---+-----------+ +--[C2]---+ | | | | | 0.1uF | +---+---+---+---+---+ | | | | 8 7 6 5 | | \\ | | LM555 | [C1] 100uF o | | 1 2 3 4 | | | | +---+---+---+---+---+ | | | | | | | | +----------+ +---------------- | | | Output Gnd --+----------------+-------------------+----

Thank you all for the help.

Reply to
kknicker

I'm sorry I got it backwards, it should have been alt.binaries.schematics.electronics. Mike K.

Reply to
amdx

The 74XX221 is an edge-triggered non-retriggerable mono (x2). The input transition which triggers it will not cause more than the one output pulse.

Reply to
budgie

I didn't think to test the power up behavior. I didn't connect anything to pin 4. I must have been lucky because it seemed to work anyway. I will do what you have suggested.

I noticed the page I referred to recommends connecting the control (pin

5) to ground with a 0.1uf capacitor, but not a capacitor on the reset (pin 4). Is that what you meant in your last sentence?
Reply to
kknicker

I assume you added a connection from pin 4 to Vcc in the actual constructed circuit? It wouldn't work without that.

BTW, that's the classic edge-triggered monostable, one of the possibilities you were correctly considering in your original post.

Does it behave reliably when you first power up? If not (i.e. if it sometimes gives you an unwanted output pulse), try inserting 100k from pin 4 to Vcc (instead of the direct connection), and 0.1uF from pin 4 to ground.

--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

Pin 4 should be connected to Vcc to allow normal operation of the monostable. (Yes, you were just lucky!) To disable the mono for a brief time at power-up, and hence prevent possible spurious output pulses, use an additional R and C as I described. If it behaves consistently OK, then you don't need that refinement.

--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

I'm curious. Why didn't you try this?

+Vcc ---o o---+---|
Reply to
ehsjr

ehsjr wrote (to the OP):

Ed: That looked such an attractively simple circuit that I tried it myself yesterday. I may have missed something but aren't there a couple of downsides to it? I don't think the OP specified what sort of pulse he wanted, but my starting assumptions were a clean, +ve, full supply signal. Your circuit:

1) Delivers only a low amplitude spike, so needs amplifying to get a 'full' pulse. Using say a simple NPN stage that results in a -ve going pulse, which may then need inverting. (BTW, such amplification would presumably be simplified if the headroom voltage is rather larger than your examples?) 2) Transmits switch noise.

I used a 14V supply and a nominal 12V 1W zener, with this circuit:

formatting link

Here are a few screenshots of the results I actually saw:

Relatively 'clean' switch

formatting link

Noisy switch

formatting link

Noisy switch, detail

formatting link

Noisy switch, detail, after NPN stage

formatting link

BTW, I'm puzzled by the roughly triangular shape of the output. I tried one simulation and got a squarish result:

formatting link
Maybe it was just the choice of zener?

--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

Yes, absolutely.

I don't think the OP specified what sort of

He's replacing (or using in place of) a momentary switch. Both the toggle and the momentary are subjecty to switch bounce. Since whatever circuit he's driving will work on a momentary, then switch bounce from a toggle is not a factor.

But your observation is correct. The circuit will not provide a clean, +ve, full signal supply. It is a definite downside to the circuit for general use - it is good only for use where switch bounce is irrelevant.

Your circuit:

That's wierd. It should deliver close to Vcc. Your Vcc is 14 volts and the zener is 12. It (the zener) should conduct until Vcap drops to 12, meaning that the pulse amplitude has to be at least 12. Maybe you are scoping at the input to the zener? The duration depends on the load, and to a lesser extent, on the 220K resistor, but primarily on the zener. It will be a spike, but it should be a spike whose amplitude is over the zener voltage. RC is ~ 9.5 mS (way too short) down to ~1/3 vcc - but it is collapsing only 2 volts or about 14% (instead of ~ 63%) when the zener shuts it off. You need a bigger cap! The circuit "looks at" just the top of the cap discharge curve, which is steep.

We disagree on spike amplitude, but that doesn't change the fact that the output is another downside, as you indicated. You get what amounts to a spike instead of a nice robust square wave.

Using say a simple NPN stage that results in a -ve going

Yes - you need that with a low impedance load, or a long duration pulse, or if the pulse must be square. And as long as you stuff enough drive current into the base, it drives to Vcc minus the transistor Vce. So you can have plenty of headroom between the zener and Vcc and still get square wave output.

I got way over 40 seconds with a 120(?) ohm relay driven that way through a darlington with Hfe > 1000 in a delay off circuit I made. Had to add a resitor in parallel with the cap to get it down to the ~40 second target in that circuit. I don't remember all the values, but I can find them if they are of interest.

The headroom was to make the pulse voltage unambiguous. RC is ~ 63% discharged - the circuit is "looking" at the top ~6% of discharge (eg from 5.0 down to 4.7). I didn't want the the circuit that is being driven to "see" an ambiguous voltage that was not clearly either a high or a low. By using the top of the discharge curve, the voltage will be at a high until the zener cuts it off. It has a wicked slope, but all of it will be above the zener V. Also, I picked common zener voltages. I run into lots of 11 and 4.7v zeners, but rarely a 4.3.

Absolutely. As mentioned earlier, I don't think that's a factor for the op, but it certainly is in many applications.

Thanks for these - they're great! I have a question, inline below.

I'm puzzled by the Vout curves. It should "fall off the cliff" at 12V when the zener stops conducting, but the traces all show Vout curving down below 12 volts.

I think the output (without the noise, which I can't draw) should look like this:

+14 |\\ +12 | \\ | | | | | | 0 ---- ----

Can you determine why there is that curve down to 0 volts? I wonder if your zener doesn't "zen" :-) ?

Regarding the simulation - my guess is that they treat the switch as noiseless, no bounce. But they don't show the Vout "falling off the cliff" pattern - unless the yellow is supposed to be Vout. The green looks more like a capacitor discharge curve than the yellow, but the green doesn't fall off the cliff. And if the yellow is supposed to be Vout, the trailing edge is correct and everything before it is wrong. So I'm clueless.

Ed

Reply to
ehsjr

I think I need a much *smaller* cap! If I make it 10nF instead of 1uf, then I see Vout as an initial *very* brief spike.

You've lost me there. Can you draw that circuit please?

I'm out for rest of day, but I'll get back on the case tonight. I suspect that 'triangle' I saw for Vout might have been an artifact of some sort, due to poorly chosen PC-based 'scope settings. All the simulations I've tried show a square signal, amplitude Vcc-Vz, *apart* from that initial spike which they now show, following the massive reduction in the value of C.

--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

We aren't possibly at cross-purposes here? We're talking about the circuit I illustrated above, with Vout taken from zener's anode, yes?

No, that's down to my choice of input to Circuitmaker's VCS. I simulated a noiseless switch, like the relatively clean one I used in my tests.)

I re-assembled the breadboarded circuit yesterday with a different 12V zener. The waveforms now look OK to me. So the only remaining questions are:

1) Amplitude; I still think it should be as seen here, Vcc-Vz, not close to Vcc? 2) Simulated waveshape versus actual; must be something to do with unrealistic Circuitmaker models. I'll study further.
--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.