. .
Page 2 of 2 FirstFirst 12

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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.

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


  3. #2
    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.

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


  5. #3
    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.

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


  7. #4
    Hi Jazz

    You know i think that i am a newbie to this world of CNC / Electronics. As previously mentioned i have a ZP54 - int Breakout Board, would you have a drawing for the HOME position switches or do they have to be configured in Mach 3 as software limits with the Stepper motor positions. I understand how this would work with Servo's but not Steppers.

    Regards

    Ray

  8. #5
    Ray think you may be mixing up soft limits with homing and physical limit switches. Soft limits have nothing to do with Actual physical limit switches they are just a software version of a limit switch and use the machine coordinate system has reference.
    In fact with soft limits defined which you usually setup to be just less than the machines physical hard stop range then it's very easy to crash the machine into the hard stops because when you RefAllHome without Physical Home switches Mach just Zeros out Machine coords where ever it's parked.
    So if you happen to RefAllHome with the table or Gantry say towards the middle of movement range then Mach use's this Zero coord has the start point for soft limits and if for instance you set-up soft limits with a movement range of 500 positive before soft limits kick-in but you only have 400 physical movement left then Mach won't know and crash into stops.!!

    Soft limits have absolutely nothing to do with home switches at all other than they share the same setup menu in Mach.

    Personally I use separate Limit switches wired in series using one input on the Bob. Then have separate Home switch's wired in series using another input of the BOB.
    You only need 1 home switch per Axis.

    To set-up Home switches in Mach first set the input your using in Ports&pins/input-signals. You really have 3 options now.
    If sharing LIMIT switches has home switches then set each Axis Home signal to the same input your using for limits from the BOB.
    Same has above for separate Home switches if your using them wired in series just using the different input from BOB.
    If using individual home switches then you'll need to set each Axis signal with the individual Input used on BOB.

    Next in the Home/soft-limits menu set which way you want the machine to set off looking for the home position using the HomeNeg selection.
    In this same Menu you can define other things like auto zeroing the DRO's after hitting switch and percentage of Rapid speed to home at.

    Thats all there is too it.
    Last edited by JAZZCNC; 29-12-2012 at 02:24 PM.

  9. The Following User Says Thank You to JAZZCNC For This Useful Post:


  10. #6
    Hi Jazz

    Many thanks, you are both right and wrong. I may be a bit confused, but in the days when i had to work for a living, i can remember,that on our robots, we had physical limit switches (Usually Proximity Switches) to prevent the machine from crashing when being used in MANUAL MODE. The HOME position was a position set in a separate program just for re homing the machine to it's start position, this is what i would like to do on my machine, not because it needs it, though i do appreciate it needs some degree of safety, it's just that i would like to do it, after all when i have finished the machine i have no production targets just there as a Hobby.

    Regards

    Ray

Page 2 of 2 FirstFirst 12

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
  •