Main > Main Forum
Microswitches that light up when pushed?
brian23:
--- Quote from: rdagger on January 03, 2006, 11:19:59 pm ---
--- Quote from: ShinAce on January 03, 2006, 09:23:44 pm ---The last circuit is flat wrong. Do not place a load between an IPAC input and a GND connection. The connection must be made in parallel.
--- End quote ---
Now you made me open up my CP to test my flat wrong theory.
--- End quote ---
rdagger:
--- Quote from: brian23 on January 04, 2006, 10:42:45 am ---Ok, so let me see if I am tracking. Take a look at the pictures below. Which one is valid?
--- End quote ---
Assuming the box on the left is an encoder and the blue box on the right is a pushbutton, then the first drawing is the way I tested it using a 330 ohm resistor and a standard LED.
Trimoor:
That's how it goes, no one remembers you until they want something from you. Well maybe I want something in return...
Alright kids, time for 'ol Trimoor to clear things up.
This circuit will make an LED illuminate when the button is pressed. It will not harm an encoder, and is perfectly acceptable by engineering standards. It allows both the LED and encoder to share a common ground without frying one another. I have included robust labels for the electronically challenged. I have personally used this circuit, and can assure you it is safe and elegant. Just don't lick it.
This circuit is the one I made for cholin. It functions the same as the first, but it has an extra all-on feature. When idle, all the lights will be partly illuminated, with the brightness controlled by a single potentiometer. This can be anything from completely off, to completely on. When a button is pressed, that individual light will jump to full brightness, regardless of the potentiometer setting. Thus all your lights can be dimly lit, but each one will be bright when pressed.
Connecting an LED in series with an encoder is a bad idea. It could reduce the reliability, damage the LED with excessive current, damage the encoder with excessive current, and simply lacks elegance. We engineers always want the most elegant solution.
If anything goes wrong, be sure to blame cholin for giving me ideas.
brian23:
Ok, third time's a charm :)
Here is my next try at your circuit Trimoor. Which one is correct, first or second? Corrections?
Trimoor:
Neither is correct. The first will constantly register a button press, and the second will end up frying your power supply. Actually both will fry the power supply.
I can't get much simpler than the diagram. Just follow it carefully and try again. It's not that hard. Try not to deviate from the standard symbols too much: your diagram gives no indication of LED polarity.
See how the diode goes straight from the encoder pin to the switch? The LED goes straight from the power supply to the switch. The ground from both the encoder and the power supply connect to the other side of the switch. That's it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version