Thread: Limit Switches with LED's
-
31-12-2012 #21
If you're happy with just one colour LED - i.e. red when the switch is pressed, off otherwise, which basically tells you the same thing as having red/green, then it's a lot simpler. Just put an LED with series resistor in parallel with each switch.
Since you will use normally closed switches, when the switch is open (pressed) the supply voltage to the switches is now present across the switch, so will light the LED. If multiple switches are pressed, the same is true except the voltage is now divided by the number of switches that are pressed so the LEDs would be dim, hence you need to choose the resistor values carefully. If you're happy with that limitation then this is a simple solution to implement, but for the sake of one extra component Robin's solution is better.
You could instead do it in software - make a box on the gui turn red/green for each switch.Last edited by Jonathan; 31-12-2012 at 02:10 AM.
-
The Following User Says Thank You to Jonathan For This Useful Post:
-
31-12-2012 #22
Good try, but what happens if two switches open?
Will 2 diodes and two resistors all in series sink enough curent to switch the Bob?
How about three?
Edit: I'm not explaining that very well am I? You aren't actually breaking the circuit, you are still requiring current to flow and light the LED's.
-
The Following User Says Thank You to Robin Hewitt For This Useful Post:
-
31-12-2012 #23
No, perfectly well.
I put this diagram in the previous post, but immediately deleted it as I realised the problem you mentioned:
If V=5V, then when one switch is pressed the voltage at the node the breakout board is connected to will be the forward voltage of the LED, so about 2.1V, plus the voltage of the resistor. As you say that's probably acceptable with just one switch pressed, but still more susceptible to interference and probably not going to work with more.
We can fix this by increasing V, to say 24V, and connecting the breakout board via an op-amp used as a comparator. Set the threshold of the comparator to be just under the voltage present when one switch is pressed, then any number of switches are pressed the comparator output will switch. I guess that does loose the simplicity...I'd do it your way, except I don't really see the point of adding LEDs!
-
The Following User Says Thank You to Jonathan For This Useful Post:
-
31-12-2012 #24
Hi Jonathan
Thanks for all your help, seems like i was asking for quiet a lot when i said simple. Forgive me but you lost me at OP AMP / Comparator, and can you explain what a gui is from a previous post?
This is my latest interpration, do you think it will work, i realise that the only LED to illuminate will be the one on the activated switch.
Regards and Thank You
Ray
-
01-01-2013 #25
An Operational Amplifier is wonderful thing. It has 2 inputs labled + and -. If the Voltage on plus is higher than the Voltage on minus the output pin goes high, vice versa and it goes low. With a bit of resistor jiggery pokery you can multiply or divide a voltage by anything you like.
If they make an Op amp and it turns out to be too clunky they mod the circuit to lose the drive high on the output and call it a comparator. You connect your input to one pin, a reference Voltage to the other and the output tells you which is the higher.
GUI usually stands for Graphical User Interface.
I can't comment on your circuit because I still don't know what is coming out of the Bob.
-
The Following User Says Thank You to Robin Hewitt For This Useful Post:
-
01-01-2013 #26
The plan above won't work as having just checked the datasheet for the BOB, the limit switch input is gets pulled to ground, so it won't provde enough power to light up anything, and adding LEDs in that way will probably be enough to pull it to ground.
Using some kind of high impedence sensing is the only way to make this work without affecting the BOB input.
For design/build simplicity and to avoid dealing with individual chips, I'd suggest an Arduino UNO. A quick sketch (arduino talk for code/programme) will do what you want easily, the inputs are high impedence by default, and it'll power LEDs easily.
-
The Following User Says Thank You to m_c For This Useful Post:
-
01-01-2013 #27
-
01-01-2013 #28
Or, use a double throw microswitch and have red green on every switch, fully independant and all on one 3 wire loop, easy peasy.
-
The Following User Says Thank You to Robin Hewitt For This Useful Post:
-
02-01-2013 #29
Hi Robin
Many thanks, still confused, would that be a SPDT? I thought I was trying to illustrate that in my drawing, or did I get that wrong?
Regards
Ray
-
02-01-2013 #30
Hi Jazz
Many thanks again, will this stop the machine from moving if activated.?
Regards
Ray
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
EMC2 home/limit switches... only acting as limit?
By vputz in forum LinuxCNC (EMC)Replies: 4Last Post: 15-10-2014, 09:51 AM -
Limit Switches
By Leadhead in forum General ElectronicsReplies: 1Last Post: 16-10-2013, 10:41 AM -
Limit switches and Mach3
By cropwell in forum Artsoft Mach (3 & 4)Replies: 1Last Post: 06-03-2013, 10:51 AM -
Uniport and limit switches.
By D-man in forum General ElectronicsReplies: 14Last Post: 13-02-2012, 11:37 PM -
Limit Switches
By Lee Roberts in forum General ElectronicsReplies: 13Last Post: 27-06-2008, 02:21 AM
Bookmarks