Page 1 of 2 12 LastLast
Results 1 to 12 of 16

Thread: Limit switch problems

  1. #1
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Downloads
    0
    Uploads
    0

    Limit switch problems

    Hi everyone,

    I am building my own CNC machine. It is roughly 30"x30"x10" set up as xxyz. I had my machine working properly on Linuxcnc's EMC2 with just the x and y axes while I was building the z axis. I finished the z recently and wired the z axis motor and limit switches. All of the motors run properly.

    I do have one problem though...

    When I power up the machine in emc2, I get a "joint 2 (z axis) on limit switch error", and the program prevents additional power up attempts. This is confusing because the z axis has not tripped the switches. Also, the program correctly registers when the switches are actually open and closed (it displays that little white arrow by the z axis coordinates).

    Is this a hardware or software issue? I checked the limit switch wires and they are free of shorts (they are like 10' long - could too much resistance be the problem?). I checked the pinouts and home settings, and nothing is conflicting (I used the same settings as my other working axes).

    Thanks for the help!


  2. #2
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Can you physically trip one of the z-axis switches, before you power up and see what it reports?

    You should be able to use Halscope to see what happens on a pin when you trip the z-switch and compare that with what happens on the pin connected to the x or y limits when one of them is tripped.

    Is there a possibility that you wired one or both of the z switches Normally Open (NO) while the x and y switches are properly wired (NC)?

    Alan


  3. #3
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Downloads
    0
    Uploads
    0
    I tripped the switches before startup, and still the same thing happens. I checked the halscope and nothing strikes me as unusual. Also, I did wire the switches as NC as I intended. I tested them for continuity and they are working properly.

    I redid all of the wiring hoping to find a short or something - still no dice. I thought that I was possibly getting interference from the nearby motor power cables, but the problem remained even when I physically moved the limit switch wires away from the motor ones.

    I did discover new behaviors of this problem that might aid in a diagnosis:

    -The problem is resolved when I place a jumper across the wires directly at the ports on the parallel port breakout board (bypassing the switches). However, this short-circuit idea doesn't work on any other part of the wires (I thought that at a certain point in the wires the resistance might be too great. At that point I would place a short to signal a closed switch there. It didn't work).

    -At my initial press of the "machine power on" in the software, I don't have any issues. Only about 5-10 seconds later do I get an error message.

    -The error message doesn't appear when the machine is in the e-stop mode or the power supply is turned off.

    -The problem is not consistent at all. Sometimes I get an error immediately - other times, I get an error 30 seconds later.

    -Rarely, I can power on the machine without an error. I triumphantly go move the motors, but as soon as they move a fraction of an inch I get the error.

    -Finally, this issue happens regardless of which pin I use on the parallel port. It doesn't happen if no z-axis limit is included in the pinout.


  4. #4
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Is it possible that you have an intermittent break in a wire?

    Is your z-limit supposed to be active high or active low? (i.e., are you shorting to ground or shorting to +5v).

    Check your voltage levels on the z-axis limit with a switch open and with a switch closed.

    On one circuit, I had to put a pull-up resistor on a breakout board because I was using an open collector device and it wasn't going high enough to be recognized by the computer.


  • #5
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Downloads
    0
    Uploads
    0
    Thanks for the advice. I stumbled upon a solution by dumb luck when I was trying to isolate the electronics. It turns out that the limits function normally when they are hooked up with solid core wire (I used stranded core for some sections).

    This works but seems kind of sketchy to me. Is there any sort of signal boosting circuit I could use on these wires to increase their reliability?


  • #6
    Registered acondit's Avatar
    Join Date
    Apr 2005
    Location
    USA
    Posts
    1,778
    Downloads
    0
    Uploads
    0
    Maybe it is just a problem of contact with the BOB. Try using the stranded wire but soldering the ends before inserting them the BOB connectors. So it is like solid wire at the the ends but flexible where it needs to be. I assume they are already soldered to the microswitches???

    Alan


  • #7
    Registered
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    524
    Downloads
    0
    Uploads
    0
    You could use an opto-isolator and run the limit switch circuit at a higher current than the current used on the BOB, that would remove any interference possibilities.

    I've seen a problem with this on a BOB for a friends machine a while ago. I built him a small opto-isolator setup for all four input circuits (estop + 3 limits) and all his problems went away. The BOB just had a pullup and filter cap, so was quite susceptible to interference. His symptom was similar although often the machine would move but powering on the spindle would trigger estop or a limit.

    If you think it'd help and you're OK with a soldering iron and veroboard (or similar) I can sketch up the circuit for you.. It was just some 4N25's, a couple of resistors and some filter caps.

    Cheers, Chris H.


  • #8
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Downloads
    0
    Uploads
    0
    An optoisolator might help. I would really appreciate a schematic.

    Thank you very much!


  • #9
    Registered
    Join Date
    Nov 2012
    Location
    Ireland
    Posts
    2
    Downloads
    0
    Uploads
    0
    Im looking for a bit of help. Bought a blackfoot cnc router. I got all working fine but every so often the x axis would loose signal.Therefore I replace the breakout board with this:
    Upgraded 5 Axis Cnc Breakout Board For Max 5Pcs Single Axis Stepper Motor Driver | eBay

    Now I'm having a different problem! I never had problems with interference in the limit switches with the original breakout board however I do with the new board (at least I think its interference) I keep getting pulses coming through the limit switch wires every few seconds that trigger the emergency stop.

    The pulses can be read as .01v. I have changed the debounce. This didn't cure it. I understand that shielded wire is recommended for the limit switch wires but I don' understand how these pulses never affected the old breakout board but it is affecting the new one??
    Can anybody help please?

    Mike


  • #10
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,933
    Downloads
    0
    Uploads
    0
    Ground all supply commons to a earth ground star point.
    Make sure all metallic parts and motor frames are grounded.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #11
    Registered
    Join Date
    May 2012
    Location
    USA
    Posts
    200
    Downloads
    2
    Uploads
    0
    Do you have a shielded cable for the limit switches? If so you only need to run the shield to ground on one side of the run. Otherwise you could run in to a ground loop problem.


  • #12
    Registered
    Join Date
    Nov 2012
    Location
    Ireland
    Posts
    2
    Downloads
    0
    Uploads
    0
    Thanks Al the Man and Dodger889.

    The cable is not shielded. I didn't have the need for it with the old bob. I grounded all commons as you suggested Al. This made no difference. I thought it could be that the new bob hasn't got the right pull up resistors to kill the interference so I took 3 parallel port cables, split them so I could have one cable coming from the computer taking the inputs from the old bob and sending the outputs to the new bob. ( I assumed this would work as the old bob never had interference triggering the limit switches) However after hours of work the interference was still happening when all was reconnected. I really don't understand how this could be.

    Mike


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Limit switch problems.
      By Don Clement in forum Tormach Personal CNC Mill
      Replies: 32
      Last Post: 09-24-2009, 10:25 PM
    2. Problem- Limit switch problems
      By kennected in forum DIY CNC Router Table Machines
      Replies: 5
      Last Post: 07-01-2009, 12:21 AM
    3. limit switch and home switch setup
      By Runner4404spd in forum General Electronics Discussion
      Replies: 0
      Last Post: 12-15-2005, 08:58 AM
    4. Limit Switch Problems
      By johnd in forum Mach Software (ArtSoft software)
      Replies: 2
      Last Post: 12-06-2005, 11:04 PM

    Visitors found this page by searching for:

    Nobody landed on this page from a search engine, yet!
    SEO Blog

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.