Welcome to Our Community

Some features disabled for guests. Register Today.

limit switches

Discussion in 'CNC Mills/Routers' started by ZINN, Jul 4, 2019.

  1. ZINN

    ZINN New
    Builder

    Joined:
    Feb 14, 2019
    Messages:
    15
    Likes Received:
    3
    Is it possible to install all 6 limit switch positions on an openbuilds 1010 with black box controller which onl has 3 locations for limit switches?
     
  2. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
  3. ZINN

    ZINN New
    Builder

    Joined:
    Feb 14, 2019
    Messages:
    15
    Likes Received:
    3
    How do the connections on limit switches labeled C NO NC match up with the 3 pin connectors on the Black Box (GR L D)?
     
  4. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
  5. ZINN

    ZINN New
    Builder

    Joined:
    Feb 14, 2019
    Messages:
    15
    Likes Received:
    3
    I am trying to add 3 additional 2 wire limit switches that I have to the 3 wire connections that are hooked to the Black Box. So can I hook the C to the GND and the NO to the SIG for a normally open setting? Is the 3 wire connection configuration at the Black Box a normally open configuration for the new GND - V+ - SIG limit switches ?
     
  6. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
    Ignore the V+ pin. The link I sent you says "TIP: To use Normally-Open switch wiring, ensure that $5=1 in your Grbl settings". In other words, the BB will work with either NO or NC wiring. You just need to make sure you set $5 in grbl correctly.
     
    Fed and Peter Van Der Walt like this.
  7. ZINN

    ZINN New
    Builder

    Joined:
    Feb 14, 2019
    Messages:
    15
    Likes Received:
    3
    Thanks, I will try this.
     
    sharmstr likes this.
  8. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    If you are putting two limit switches on each X, Y and Z it hurt anything to have two SIG coming to the same switch input?
     
  9. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,173
    Likes Received:
    4,145
    Our Xtension switches are designed to be wired that way. Sig on controller, to Sig on first switch, to Sig on second switch. Same for V+ and GND.
     
    sharmstr likes this.
  10. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,704
    Likes Received:
    1,329
    No - it won't hurt. If you have normally open switches wire them in parallel, if they are normally closed wire them in series.
    Alex.
     
    sharmstr likes this.
  11. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    I'm using six open builds limit switched Xtension Limit Switch Kit with an arduino UNO running GRBL 1.1 and a standard GRBL pinout. I bring two signal lines from each X, Y and Z to UNO pins 9, 10 and 12. The switches work great and are reliable under Estlcam. Strangely, when I run open builds control I get a few false switch hits at idle and frequent false switch hits when the steppers are running. I've been over my wiring and can't find any problems. I tried toggling $5 on and off to no effect. Estlcam has an option on the inputs for "pull up 5V." I don't know exactly what this does but it is required to get the switches to operate correctly with Estlcam. Anybody know what I can do to get my configuration working with open builds control?
     
  12. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,173
    Likes Received:
    4,145
    Did you wire up the V+ pins on the Xtension Switches? They add power for the switch to do the pullup and RC filter. If you only wired SIG and GND but no power, the filter cannot do its thing
     
  13. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    The switches all have 5V and the embedded LEDs fire appropriately when the switch is actuated. There must be something in Estlcam's GRBL programming that different than what the wizard in Control flashes into the Uno.
     
    #13 Coleman Martin, Jan 9, 2021
    Last edited: Jan 9, 2021
  14. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    Still trying to sort this out. I've been into the weeds of grbl's config.h. There is a setting
    define ENABLE_SOFTWARE_DEBOUNCE
    "A simple software debouncing feature for hard limit switches. When enabled, the interrupt
    monitoring the hard limit switch pins will enable the Arduino's watchdog timer to re-check
    the limit pin state after a delay of about 32msec.This can help with CNC machines with
    problematic false triggering of their hard limit switches, but it WILL NOT fix issues with
    electrical interference on the signal cables from external sources. It's recommended to first
    use shielded signal cables with their shielding connected to ground (old USB/computer cables
    work well and are cheap to find) and wire in a low-pass circuit into each limit pin."

    I wonder if Estlcam is using this setting and Openbuilds Control is not. I'm using the standard
    openbuilds cables. Maybe if I change to USB cables I can get Control working.
     
  15. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    The other thing I see in the header is config.h which might be important is define DISABLE_LIMIT_PIN_PULL_UP

    Here is the text:
    // By default, Grbl sets all input pins to normal-high operation with their internal pull-up resistors
    // enabled. This simplifies the wiring for users by requiring only a switch connected to ground,
    // although its recommended that users take the extra step of wiring in low-pass filter to reduce
    // electrical noise detected by the pin. If the user inverts the pin in Grbl settings, this just flips
    // which high or low reading indicates an active signal. In normal operation, this means the user
    // needs to connect a normal-open switch, but if inverted, this means the user should connect a
    // normal-closed switch.
    // The following options disable the internal pull-up resistors, sets the pins to a normal-low
    // operation, and switches must be now connect to Vcc instead of ground. This also flips the meaning
    // of the invert pin Grbl setting, where an inverted setting now means the user should connect a
    // normal-open switch and vice versa.
    // NOTE: All pins associated with the feature are disabled, i.e. XYZ limit pins, not individual axes.
    // WARNING: When the pull-ups are disabled, this requires additional wiring with pull-down resistors!
    //#define DISABLE_LIMIT_PIN_PULL_UP

    This is a bit confusing. I wonder what Control is doing with this setting.
     
  16. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,173
    Likes Received:
    4,145
    Nothing. Control doesnt touch Grbl compile options.
    Blackboxes ship with grbl, but also the 100% stock configuration

    The reason is simple of course, don't need to fuss with that. Debounce is on by default. Blackbox has actual pull-up resistors (stronger than the measly chip based pullup available via the atmega pins themselves) , filtering caps, and a reversed biased HV protection diode already built it. Software workarounds just arent as good as fixing it in the physical hardware, so thats why it was built this way. Same goes for our Xtension switches. BlackBox + Xtension limits = no false limit alarms - so what are you running? Wired correctly as per documentation?

    Filtering endstops from EMI helps. But what helps a lot more is sorting out the source of the EMi. What is your root cause, where is all the EMI coming from? VFD? Plasma? Dust collector? Post some pics of your setups
     
  17. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    Thanks for getting back so early in the morning! I 100% agree that fixing my EMi is the way to go. I have a pretty simple setup with just the steppers running. No Plasma, no spindle engaged and no dust collection turned on. I have open builds switch cables running to openbuild limit switches. There are 6 switches total. A pair of Z's and a pair of X's and a single Y cable all running in my drag chains along side my X and Z stepper wires. In my "black box" I tie the signals of X's Y's and Z's together bringing each to the appropriate Uno input pin. I'm powering the limit switches with +5 from the extra power pins from my Uno. The voltage measures about 4.8v. The Uno is getting power from my laptop. Probably this is not the ideal way to wire the switches but under Estlcam, the function is solid including some test cuts. But with Open Builds control I get many false switch hits.
     
  18. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,173
    Likes Received:
    4,145
    Now seeing as the Uno doesnt have the Pullups and decoupling caps like a BlackBox: You'd need to add at least those to the Uno: https://user-images.githubusercontent.com/1461231/34397640-bbb8628c-eb45-11e7-91ca-f53a38e70566.png


    Its probably just oversampling many times and rejecting a few pulses to get an average - all taking longer, motors keep on moving while it tries to work around the noise. At the end of the day - logically, is a software workaround "better" than building the electronics right? That $5 uno + all the time spent troubleshooting = more expensive than a BlackBox (;
     
  19. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
  20. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    Appreciate the input Peter and Shawn. I'm using the open builds limit switches which require +5, GND and provide a signal in return. It's unclear to me how I would implement the optical limit switch isolator or the pull up and decoupling caps. Both those solutions appear to map to simple normally open switches which don't have a +5 power requirement. Of course I can dump the nice switches but that seems a waste if there is a way to implement them with a Uno.
     
  21. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,173
    Likes Received:
    4,145
  22. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    This is very helpful. I will wire it up and try it out.
     
  23. Corey Corbin

    Corey Corbin Well-Known
    Builder

    Joined:
    Feb 27, 2016
    Messages:
    135
    Likes Received:
    62
    Have you tried powering the UNO with a seperate power source?
     
  24. Coleman Martin

    Builder

    Joined:
    Dec 15, 2020
    Messages:
    26
    Likes Received:
    18
    Hi Guys. Update. I wired in 100 MFD caps and 4.7K resistors according to the diagram here . [​IMG]
    Thus far I have not had any false triggers on the 3 laser projects I tried and with jogging. I haven't tried a separate power source but if false triggers start again, I will replace my 100MFD with 100NFD caps AND put the Arduino on a different power supply.
     
    Peter Van Der Walt likes this.
  25. JustinTime

    JustinTime Veteran
    Builder

    Joined:
    Dec 18, 2013
    Messages:
    762
    Likes Received:
    254
    I used just the caps connected to the GND, as suggested by Rob in another thread, and it works just fine. No resistors.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice