586,094 active members*
3,912 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > False triggering of limit swtiches
Results 1 to 16 of 16
  1. #1
    Join Date
    Jul 2007
    Posts
    66

    False triggering of limit swtiches

    Hello,

    I am retrofitting a machine going from NCSTUDIO to Mach3. It has a proprietary control card built into the pc and the breakout board is nothing more than an DB15 plug breakout board.

    I wired in the Homann Designs MB02 breakout board and the machine works correctly with the step/direction signals.

    The proximity sensor limit switches are connected and the LEDs on the board glow dimly, and the corresponding pins in Mach3 flicker randomly.

    The limit switches are NPN proximity switches and the connections are 5+ power, ground and signal, the signal being connected to the BoB input. The switches themselves work fine and mach3 sees a good strong signal when the switches are activated.

    I should also point out that the tool height setter built in also randomly triggers even when the limits are unplugged.

    The limit switch and tool height wiring is not shielded. Could that be the problem?

    We separated the limit switch wiring and ran it straight from the switches into the control box without running next to the motor cables and it fixed the issue of false triggering but when the spindle was started the inputs flickered all over the place again.

    We had to add in grounding as the 48 volt power supplies were not earthed and none of the metal work on the machine or control box was earthed. The 240 socket's earth was not connected to anything (in Australia the exposed metal should all be earthed).

    I would really appreciate some help, I am about to lose the job over this and I have been struggling. I even managed to use an Arduino to process the signal and provide a clean output, but it is a terrible solution, but I was desperate.

    thanks in advance,

    Ash
    Machinists do it with greater precision and less tolerance!

  2. #2
    Join Date
    Mar 2007
    Posts
    2083
    Hi Ash

    what machine is it ?

    does the spindle motor have a good earth connection to the rest of the machine ?

    if its from China make sure any earth tages are not screwed onto a painted surface!

    screened cables for the limit and tool height switches will help

    does all the earth bonding go to a "star point"



    John


    PS

    have a look at post 619 here -

    http://www.cnczone.com/forums/open_s...e_easy-52.html

  3. #3
    Join Date
    Jul 2007
    Posts
    66
    It's a Moretti brand CNC router,

    Yes the spindle is well earthed, yes the earth points are bare metal and yes the earthing is a common point, to avoid ground loops.

    There are 2 things I can think of - the stepper drivers have anodised heatsinks, and there is no earth connection through the anodising.

    The other - being NPN, the limit switch may be creating a voltage divider with its internal resistor and the resistor of the breakout board.

    The switch provides +5v when it is active; but my logic may be flawed because the switch's signal goes to ground potential when active...

    Machinists do it with greater precision and less tolerance!

  4. #4
    Join Date
    Sep 2010
    Posts
    1765
    did u try grounding the mach3 or computer case? the 5v supply common? put a .5ufd cap across the input? shield the spindle motor leads? spindle have 4 wires to motor with 4rth tied well to motor case? try a filter on ac input to spindle drive?

  5. #5
    Join Date
    Jul 2007
    Posts
    66
    The electronics enclosure has now been earthed as it was not and did not meet australian standards. As this was one of the first thigns I did, I do not know if it made things worse or better. I did try an input bypass capacitor/decoupling capacitor (I used 10uF but the value shouldn't make a huge difference). The spindle has 4 wires but the 4th is not connected, but the shield is connected at the electronics enclosure to earth (wouldn't connecting the spindle motor case be creating a ground loop?

    I'm not sure on the question regarding 5v common, are you saying that the ground of the 48v power supply should be connected to the common earth? It is not currently.

    Cheers

    Ash
    Machinists do it with greater precision and less tolerance!

  6. #6
    Join Date
    Sep 2010
    Posts
    1765
    that 4rth wire should be hooked up - see your spindle manual. it is a ground wire in addition to the shield and needs to be hooked up if you want any hope of fixing your noise issue.

    No ground loop; your motor cable shield MUST **MUST** be grounded at **BOTH** ends. It has to do with hi freq PWM switching noise (your problem). Just do it then research it later on google if you want; I dont have time now to explain why.

    Try to make this motor shield ocnnection right too: you should skin back the pvc covering exposing the shld; then wire tie that to metal ground - at spindle and at motor. the noise travels on the shld in what is caslled 'skin effect' it is all on OD molecules of shld and an old fashion pigtail #12 wire tied to shld that is 12" long can have an impedance of hundreds of ohms aqt these freqs - means you might was well not even tie it off.

    5vdc com in computers is usually grounded to computer case, no? If so, that computer case shud be grounded to your star point also. that was my point.

    ur issue is the spindle noise u said so why continue working on grounding the 48v stepper supply? souinded like u had it under enough control.... sorry for spelling but I am behind sched and gotta run.

  7. #7
    Join Date
    Jul 2007
    Posts
    66
    Thanks Mike, I really appreciate the help. I will try your advice today and let you know how it goes. John, thanks for your help also.
    Machinists do it with greater precision and less tolerance!

  8. #8
    Join Date
    Sep 2010
    Posts
    1765
    calmer now..... miller time an' all, no 12 customers calling at same time to talk to me or folks in from out of town anymore. whew. long day. sorry for short answer this morning.

    I am mighty curious to see if any ideas helped u. please do let us know! thanks.

  9. #9
    Join Date
    Dec 2003
    Posts
    24221
    The stress on grounding and bonding has already been stated in previous posts, You did not mention what spindle and VFD you are using?
    If using the 400hz Chinese spindles, these have been found to lack proper connection of the Earth grounding pin of the motor, if using this type, confirm it.
    The earth ground conductor should be fed to the VFD and then on to the frame of the motor.
    If you have a central enclosure, this is preferably where the star grounding and bonding star point should be.
    Another link Need Help! Serious noise issues
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  10. #10
    Join Date
    Jul 2007
    Posts
    66
    Thanks Mike and Al. Yes it is a chinese spindle. We tied the earth to the spindle thought the 4th conductor and the star point of the system as suggested.

    I am convicned that the limit switches are not suitable to the application... they really need to be PNP instead of NPN. I traced the motion card and the switch's output goes to the cathode of an optoisolator, with the anode being positive. There is no resistance between so I am assuming that the pullup resistor in the switch is regulating current through the optoisolator.

    Basically the limit switch is providing a ground, when what I really need is for it to provide a current source (hence PNP).

    I think moving forward we will purchase some good quality mechanical switches and run shielded cable, which should solve the problems mentioned.

    Thanks heaps for all your help guys.

    Ash
    Machinists do it with greater precision and less tolerance!

  11. #11
    Join Date
    Dec 2003
    Posts
    24221
    Are you replacing the NCSTUDIO with Mach?
    Is there any documentation on the card if still using NCSTUDIO and what the nature of the I/O is?
    You really need to find out what the nature of the interface cards or BOB's are, sink or source? to make an informed decision.
    Many do not indicate the nature of the Input/outputs unfortunately?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  12. #12
    Join Date
    Jul 2007
    Posts
    66
    Hi Al,

    Thanks for your help, I really do appreciate it.

    Yes we are replacing the ubiquitous NCSTUDIO with Mach, including replacing the PCI IO card with a parallel port breakout board.

    The Signal wires for each of the limit switches are connected to the cathodes of their own opto-isolators, the anodes of the optos are connected to +5v. So at the moment the switches are sinking current. The new breakout board activates when +5v is connected to the input, as is the way most BoBs I have seen.

    I did try a 4n25 which is an easily available opto, but set up the same way it would not trigger the opto. I am assuming that the 10k pullup reisstor is causing too little current to flow through the opto and turn its transistor on.

    This is the opto on the NCSTUDIO interface card (which I picked by chance on the board and ended up tracing to the limit switch inputs, great hunch!)

    PC817 Datasheet

    This is the opto I tried to place on a circuit to interface between the switches and the breakout board

    http://www.vishay.com/docs/83725/4n25.pdf

    I also out of desperation programmed an arduino to read the analogue signal and turn a digital output on or off. It's a horrible solution, but it worked flawlessly.

    I attached the diagram on the switch and thats about it...

    Cheers

    Ash
    Machinists do it with greater precision and less tolerance!

  13. #13
    Join Date
    Dec 2003
    Posts
    24221
    I believe one of the problems generally is the fact that most BOB manufacturers tend to use 5vdc for I/O instead of the industry standard of 24vdc.
    This is why I make my own I/O break outs and have never had a problem, I earth ground all DC supply commons.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  14. #14
    Join Date
    Jul 2007
    Posts
    66
    I completely agree, I retrofitted another machine last year which was 24v signal, and it went fine, though this machine does have a lot more issues than that did.

    I can't help but think I should have a go at building a BOB, I see many good resources online.

    Thanks again guys for all your help.

    Ash
    Machinists do it with greater precision and less tolerance!

  15. #15
    Join Date
    Mar 2007
    Posts
    2083
    Hi Ashley

    you could try this :-

    Click image for larger version. 

Name:	Hall limit switch plus optoisolator.jpg 
Views:	1 
Size:	63.4 KB 
ID:	193814

    John

  16. #16
    Join Date
    Jul 2007
    Posts
    66
    Excellent diagram,thanks so much John,

    I have decided the best way to go will be to replace the reluctance proximity "home" switches with mechanical limit switches.

    I personally believe that it is not good to rely on soft limits so I think that will be the best way to move forward.

    Cheers

    Ash
    Machinists do it with greater precision and less tolerance!

Similar Threads

  1. Intermittent Limit switch triggering system
    By Capteod in forum Mach Mill
    Replies: 5
    Last Post: 05-07-2013, 08:51 PM
  2. homing with home swtiches and mach3
    By TMaster in forum Mach Mill
    Replies: 8
    Last Post: 02-07-2013, 03:49 AM
  3. Limit swtich false trigger
    By HakBot in forum Benchtop Machines
    Replies: 18
    Last Post: 10-04-2008, 07:01 AM
  4. True Or False(home/limit Option)
    By FLUTE HEAD in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 4
    Last Post: 08-03-2007, 03:03 PM
  5. 555 Timer not triggering other 555 timers
    By Smertrios in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 10-05-2006, 01:16 PM

Posting Permissions

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