Hello. I am trying to learn about electronics and have no background in it. I am not able to figure out how to generate a pulse from closing a switch. Here is a description of my entire project:
I have a micro switch with a NO and a NC position. I want to create a less than 1 second pulse in both positions. I thought a monostable circuit would be the answer so I prototyped one a breadboard using a 555 timer before I realized that the trigger must be shorter than the the set time. Turns out that the output is continuous if the input is continuous in the configuration that I made. I can't find an example of a monostable that will accept a continuous trigger. It would be great to end up with a clean square output, but I'm not sure it will be necessary. The output will be used to invoke an RF remote control (on and off). Thank you for any help.
Mike
Hello. I am trying to learn about electronics and have no background in it. I am not able to figure out how to generate a pulse from closing a switch. Here is a description of my entire project:
I have a micro switch with a NO and a NC position. I want to create a less than 1 second pulse in both positions. I thought a monostable circuit would be the answer so I prototyped one a breadboard using a 555 timer before I realized that the trigger must be shorter than the the set time. Turns out that the output is continuous if the input is continuous in the configuration that I made. I can't find an example of a monostable that will accept a continuous trigger. It would be great to end up with a clean square output, but I'm not sure it will be necessary. The output will be used to invoke an RF remote control (on and off). Thank you for any help.
Mike
Here is one way to do it. It makes clean pulses on both the rising and falling edges of a square wave, in this case created by a single pole single throw switch.
LTSpice has a voltage-controlled switch for simulation, so V2 is flipping the switch back and forth for the simulation.
I know you said you wanted a pulse in both directions (switch on and switch off). But just in case it works like a tv remote (push on, push off) here is the circuit first mentioned.
Adding a 100 micro Farad cap between the switch and 0V on pin 2 worked and the 2 resistors with .01 micro farad and diode worked also. The second one has a much better recovery time. I wonder which one is better and is the least drain on the battery while the switch is on?
Bychon suggested adding a capacitor to the switch. The schematic posted here is the monostable I made, but I added the 100 micro Farad capacitor to the circuit and indicated with an arrow per the suggestion from Bychon. The other circuit was posted by ronv and a schematic is included with the post above. I connected the output of that circuit to pin 2 of the 555 in this circuit. Both ways work, but the ronv circuit has better recovery. I wonder which is more correct and is the least drain on the battery while the switch is on.
Yes. The current will be I = E/R = 9/10000 = 0.9mA. The quiescent current for the 555 is about 9mA, so that is by far the dominant power drain. If this is too high, get a CMOS 555, and replace your pull-up with 100K. Now the 9V battery will run for a couple of weeks instead of a couple of days
Thank you for all of your help. I really appreciate it. I will assume that the .9ma is better than the other 2 circuits that have been posted. In future posts, I will remember to include schematics to get good answers quickly.
I should have asked this question from the beginning. Is there such a thing as a micro switch that pulses a momentary output without having to mechanically center? (that would be the ideal solution to this problem).
If you wire the Normally Open to the positive supply, the Normally Closed to ground, connect the Common to a capacitor-resistor differentiator, then there is no quiescent current. This might work if you can deal with the bi-directional current pulses. See Draft28
You could use steering diodes (or LEDS) to separate the output pulses. In Draft29, the LEDs flash alternatively each the switch moves either way...
**broken link removed**
I have the triggering of my monostable under control thanks to you guys. I thought I would know how to use the output to do what I want. I want to cause contacts on a keyboard circuit board as if the keys were typed by the keyboard. I have traced out the keyboard matrix and I know the mapping of the keys that I want to invoke. I thought I would be able to used transistors like relays to connect the key circuits. I could hard wire the key circuits together and power up the circuit board with the monostable.. but I want certain keystrokes for the micro switch closing and certain keystrokes for it opening, so i need to be able to switch the circuits electronically. I could use relays, but I want to keep the devices as small as possible. I thought that I could use the transistors as switches, but the collector and emitter are dependent on power unlike a relay. I have tried many ways to make it work, but no success. The schematic I included is incomplete because I'm not sure how to deal with it. I want to connect A Right with A Left and B Right with B Left when the monostable is triggered. This is what I want to occur when the micro switch closes.
First, a standard 555 will not run reliably on 3V. Read the data sheet.
Second, the reason you are having trouble with the keyboard is because most keyboards use a row-column multiplexing method to scan for key closures. Unfortunately, relays (dry switch contacts) are likely the only thing that would work without having a schematic diagram of the kevboard.