. .
Page 1 of 2 12 LastLast

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by JAZZCNC View Post
    Problem here is that really you want limit switches wired Normally closed and active low

    Okay, attempt #2...
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	LED2.jpg 
Views:	875 
Size:	190.4 KB 
ID:	7781  

  2. #2
    Hi Robin

    Thanks, i'll give it a go, can you recommend a particular NPN transistor, and what is the Resistor rating for the one in front of your 5v mark.

    Regards

    Ray

  3. #3
    Quote Originally Posted by manofgresley View Post
    can you recommend a particular NPN transistor, and what is the Resistor rating for the one in front of your 5v mark.
    I am a dinosaur when it comes to transistors, how about a BC547.

    Assuming 20mA to drive the LED and a 1.2 Volt drop across it, about 190 Ohms for the resistor.

    I drew it up to minimise the component count, when the transistor switches on the Volts it has to play with fall away, may need a third resistor so don't lay any PCB's until you have tried it.

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


  5. #4
    Quote Originally Posted by Robin Hewitt View Post
    Assuming 20mA to drive the LED and a 1.2 Volt drop across it, about 190 Ohms for the resistor.
    Personally I'd have gone with a resistor for each LED (to get their respective brightnesses balanced right)...therefore I'd connect the common anode direct to 5V & then place a current limiting resistor in each of the the LED cathode legs (the fwd voltage of a red led is about 2V, whereas a green led is about 3.2V ...therefore to get the right level balanced you'll likely need different value resistors).

    Also 20mA - depending on LED - is gonna be very bright, I'd have aimed for 10mA or less.

    Edit: Actually the way Robin has drawn it, for the red led you'll get a drop across the tranny itself, which pretty much balances the fwd voltage difference out for the red & green LEDs, so you may get away with a 180R single resistor for both....a 180R resistor will yield about 10mA through the LEDs
    Last edited by HankMcSpank; 29-12-2012 at 09:09 PM.

  6. The Following User Says Thank You to HankMcSpank For This Useful Post:


  7. #5
    Quote Originally Posted by HankMcSpank View Post
    Personally I'd have gone with a resistor for each LED (to get their respective brightnesses balanced right)...
    That would get around the Volts falling away when the transistor comes on problem nicely and let you tinker with individual brighteness. Good idea.

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


  9. #6
    Hi Robin
    My apologies if my protocol is incorrect.
    I have attached a PowerPoint Drawing, which is my interpretation of your drawing, which contains everything i know so far. Would you be kind enough to go over it, and advise me if it would work or not?

    Regards

    RayClick image for larger version. 

Name:	Led Circuit.JPG 
Views:	1766 
Size:	38.3 KB 
ID:	7794
    Last edited by manofgresley; 30-12-2012 at 05:54 PM.

  10. #7
    So you don't have a seperate ground.

    That means every LED up stream of the one that goes red will go out.

    If you accept that limitation, dump the transistor and the 10k resistor, not required.

    Connect one LED cathode to NO, one cathode to NC and the common anode to your 190 ohm off 5V.

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


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

  13. #9
    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.

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


  15. #10
    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.

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


Page 1 of 2 12 LastLast

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
  •