. .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Robin Hewitt View Post
    Okay, attempt #2...
    Sick sick drawing skills there Robin!

  2. #2
    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.
    Old router build log here. New router build log here. Lathe build log here.
    Electric motorbike project here.

  3. The Following User Says Thank You to Jonathan For This Useful Post:


  4. #3
    Quote Originally Posted by Jonathan View Post
    If you're happy with that limitation then this is a simple solution to implement
    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.

  5. The Following User Says Thank You to Robin Hewitt For This Useful Post:


  6. #4
    Quote Originally Posted by Robin Hewitt View Post
    Edit: I'm not explaining that very well am I?
    No, perfectly well.

    I put this diagram in the previous post, but immediately deleted it as I realised the problem you mentioned:
    Click image for larger version. 

Name:	Limit switch led wiring.png 
Views:	1226 
Size:	10.7 KB 
ID:	7800
    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!
    Old router build log here. New router build log here. Lathe build log here.
    Electric motorbike project here.

  7. The Following User Says Thank You to Jonathan For This Useful Post:


  8. #5
    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?
    Click image for larger version. 

Name:	Slide1.JPG 
Views:	1257 
Size:	44.6 KB 
ID:	7801This 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

  9. #6
    Quote Originally Posted by manofgresley View Post
    OP AMP / Comparator gui
    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.

  10. The Following User Says Thank You to Robin Hewitt For This Useful Post:


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. EMC2 home/limit switches... only acting as limit?
    By vputz in forum LinuxCNC (EMC)
    Replies: 4
    Last Post: 15-10-2014, 09:51 AM
  2. Limit Switches
    By Leadhead in forum General Electronics
    Replies: 1
    Last Post: 16-10-2013, 10:41 AM
  3. Limit switches and Mach3
    By cropwell in forum Artsoft Mach (3 & 4)
    Replies: 1
    Last Post: 06-03-2013, 10:51 AM
  4. Uniport and limit switches.
    By D-man in forum General Electronics
    Replies: 14
    Last Post: 13-02-2012, 11:37 PM
  5. Limit Switches
    By Lee Roberts in forum General Electronics
    Replies: 13
    Last Post: 27-06-2008, 02:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •