586,567 active members*
3,649 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2005
    Posts
    101

    Opto isolators on the limit swtich

    Attachment 220350

    I'm in rf hell. My home built is plagued with limit switch problems in Mach3. I'm using shielded cable (I tried solid core and stranded), grounded at the board, for the limits, e-stop and the motor. My board is a hobbycnc pro, motors 200oz, and tabbed N/C limits.
    I've tried debounce in Mach3, chokes on the power motor cables, and running the wires at right angles whenever they meet. I've unhooked the motors one at a time, thinking I could isolate why Mach3 keeps tripping the limit switch and I still get the same results. Limits trip after 30 seconds or so. If debounce is set to "0" limits are permantely tripped even after reset.

    I've purchased an opto-isolator on ebay

    Opto Isolator Breakout Board FOR Your Microcontroller Connecting A High Voltage | eBay

    Hopefully this will be the solution. I'm not completely sure how to wire this into the board though? Has anyone used this with success. I know about using caps (and relay), but thought I would try the opto-isolator to move this foward


    Doing some reading on this post

    http://www.cnczone.com/forums/genera...ing_noise.html

    Is it me, or is there a grounding problem (inherit with the design) with the hobbycnc pro build?

  2. #2
    Join Date
    Jan 2008
    Posts
    853
    How long a debounce in M3 have you tried? Does it ever improve with longer waits?
    Does it trip with the motors powered but not moving ?
    Paul Rowntree
    Vectric Gadgets, WarpDriver, StandingWave and Topo available at PaulRowntree.weebly.com

  3. #3
    Join Date
    Apr 2005
    Posts
    101
    Anything under 6500 results in almost immediate tripping.

    I built this inside of the pac tec case, exactly as provided by Dave R. My problem is I'm kind of limited in my knowledge of electronics, so I'm doing a lot of trial and error guess work. One of the posts mentions that he solved the problem by using a jumper from the caps negative terminal to starground? This might seem dumb, but there isnt' a starground (single point ground) on this is there? Any reason not to try .01uf capacitors on the limits as filters?

  4. #4
    Join Date
    Jan 2008
    Posts
    853
    That is very long. Can you see this instability with a voltmeter, perhaps set for AC measurements?
    Can't comment on the board or the caps, sorry.
    Paul Rowntree
    Vectric Gadgets, WarpDriver, StandingWave and Topo available at PaulRowntree.weebly.com

  5. #5
    Join Date
    Mar 2007
    Posts
    2083
    now I've downloaded the circuit of the opto isolator board -

    Attachment 220390

    to help we need to know what type of limit switches your using and how they are connected to your PC
    what breakout board and stepper drivers are you using ?

    if they are mechanical switches that ground one of the printer port input pins then
    you will need the re wire them to connect an isolated +5V supply to
    the inputs on the opto isolator board (pin 2 or 3 on JP2)

    John

  6. #6
    Join Date
    Apr 2005
    Posts
    101
    They're mechincal long tab limit swithc. N/O, N/C, common. The circuit is wired in parallel, with each lead (n/c and common) running to the next(s) either common or n/c.
    Each wire is then terminated at the hobbycnc pro #10 and the GND, making a big loop. All of the GNDS are ganged together.

    Can I run the opto BOB at 24v (powered by a seperate ps...and that would then power the limit switchs wouldn't it) and have them output to the limit switch and gnd on the hobbycnc board @ 3.3v ? (does that make sense?)

  7. #7
    Join Date
    Jun 2005
    Posts
    1730
    I would recommend you start at the beginning. Your breakout board feeds directly into the parallel port for limits, per the webpage for this board.

    You did not say the limits fail when you turn on the spindle or just sitting idle. If they fire when the spindle runs this is often due to the AC noise, few spindle motors have shielded cables and this would be a common issue, routing the AC cable away from the breakout board and parallel cable can sometimes avoid these type issues.

    Second there are makes of parallel cards. Most parallel cards pull up the inputs using resistors, so they require a low to get activated. Some cheaper cards have no pull up resistors and those input signals just float. A good test would be to disconnect your limits switch from the parallel card does Mach3 show faulted limits?

    While opto-couplers are great you need to determine the root cause of your issue, prior to attempting to enhance a solution.

    Mechanical limit switches will not be bouncing around, again disconnect the limits and see if MACH3 is happy. If MACH is happy you can go to the next step and look step by step what you are doing. Are the limits active low or active high. Check your limit switch cabling and put a meter on the end to determine if they are working correct. Go to the page on Mach3 to look at all inputs to the parallel port, are they flashing jumping around or solid?

    You have to be methodical when debugging issues, especially ones involving noise. I have seen my estop fire unexpectedly but I am using a three phase spindle motor which is a huge source of RF noise. Ultimately, I went to using a solid state relay that ran on 24VDC and small ac noise would not impact. The output of the relay feeds the input port of the parallel port with a ground on the other side of the relay. The noise issue disappeared instantly. There are many solutions, write down your steps and you start looking for the source. Hope this helps.

    CNCMAN172

  8. #8
    Join Date
    Dec 2003
    Posts
    24223
    As I have posted here many times, it is often overlooked that your PC. P.S. is usually at the same potential as your spindle, i.e. no galvanic isolation.
    The PC P.S. is at earth ground and so are most spindles through the grounded neutral, so it is important to set up a central earth ground star point for all machine bonding and the service ground to be terminated at.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  9. #9
    Join Date
    Mar 2007
    Posts
    2083
    Hi Tercero

    the Hobbycnc board input terminals are connected directly to the printerport input pins
    your system will be sensitive to ground loops and noise picked up on the wires to your limit switches
    especially if they are unscreened or run close to the motor wiring

    to add the opto isolator to break any groung loop
    I'd either connect the opto isolator board JP1 terminal 3 to +5V taken from the Hobbycnc board
    or one of the PC USB ports

    re wire the limit switches to supply +5V to the opto isolator input terminal JP terminal 3
    the opto isolator board has 220 ohm resistors to limit the input current from a +5V signal

    to connect the limit switches to a + 24Vsupply you will need to add a 1500 ohm 1/2 W resistor

    Attachment 220414



    John

    ps

    for the circuit diagram of the Hobbycnc pro
    see post 16 here -

    http://www.cnczone.com/forums/joes_c...-_mach3-2.html

  10. #10
    Join Date
    Dec 2003
    Posts
    24223
    Here's another that was cured.
    http://www.cnczone.com/forums/phase_...se_issues.html
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  11. #11
    Join Date
    Apr 2005
    Posts
    101
    Thanks for the quick answers.

    I'm using an older Dell c650 laptop. I found the pulse rate excellent and stable so I decided to go with it, instead of a full sized PC (I've also changed power supplies X2 thinking perhaps I was having problems with the grounding with the supply). The limits (according to the documentation that came with the board) are pulled UP with RN5 @ 10k Ohm. So far, I've left the router unplugged and unenergized at all times. The only source of power is to the motors and I've unhooked the motors from their connections at the board, and still received a limit switch error. I've gone through 4 sets of limit switches (4 complete changes of wire from solid core to stranded to both shielded and unshieled), from cheap to expensive. All N/C..no help. The weird part is the e-stop and the home(s) work perfectly. No problems....Same exact brand of wire. Laying in the same cat track as the motor cabling. I'm guessing it's a problem somewhere in grounding in the case (why I was mentioning the referenced thread about connecting the cap - to the starground?).

    Thanks for the information john_100. I'll try that when I get the opto bob

Similar Threads

  1. How to use Opto-isolators?
    By Plecc in forum CNC Machine Related Electronics
    Replies: 5
    Last Post: 02-04-2011, 09:51 PM
  2. opto-isolators inside PMC?
    By sinha_nsit in forum Fanuc
    Replies: 3
    Last Post: 11-19-2009, 01:00 AM
  3. Limit swtich false trigger
    By HakBot in forum Benchtop Machines
    Replies: 18
    Last Post: 10-04-2008, 07:01 AM
  4. Limit swtich newbie question
    By mealman in forum CNC Machine Related Electronics
    Replies: 10
    Last Post: 09-24-2007, 07:16 AM
  5. Opto Limit/Home switches from a mouse?
    By Rance in forum CNC Machine Related Electronics
    Replies: 9
    Last Post: 01-22-2007, 05:48 AM

Tags for this Thread

Posting Permissions

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