584,814 active members*
5,180 visitors online*
Register for free
Login
Results 1 to 19 of 19
  1. #1
    Join Date
    Jul 2009
    Posts
    690

    BOB's input interference, help please!

    Hi

    I'm having a hard time with my last cnc router. I just finished building it and just needed to wire the limit switches to the breakout box, which is optoisolated. Today I did just that and found myself in a horrible situation.

    I think I'd better make a list of facts, so it's easier to know my situation:


    - Input pins 10, 11, 12 and 13 are optoisolated.

    - Input pin 15 is not optoisolated and is wired directly to que parallel port.

    - The isolated and not isolated parts of the BOB have different grounds.

    - With the steppers connected (doesn't matter if 1 or all 3), the isolated inputs have constant spikes that won't even let me move the steppers.

    - With the steppers disconnected, the isolated inputs work fine.

    - With the steppers connected, the non isolated input works perfectly if I connect a limit switch into it (the same switch that had spikes previously).

    -I tried joining different grounds (not only the BOB's) in different ways to no avail, the problem is still there.

    -If I join the grounds from the isolated and not isolated sides of the board, with a switch connected to the isolated side and another one connected to the non isolated side, the isolated one still have the same frequent spikes, while the non isolated one (which, as I previously said, usually works fine) starts having spikes, but not so frequently as the other switch.

    -If I disconnect the USB plug (used only as a 5V supply to power the optoisolators), the interference stops and all the switches from the isolated side work perfectly, but I can't move the steppers correctly (they can move, but quite inconsistently since the optoisolators are not working with the proper 5V; curiously, they seem to be getting power from the DIR signals under this circumstances). In other worlds, the optoisolators seem to handle the limit switches fine when they aren't supposed to, but seem to be unable to do so under normal circumstances.

    -If I use the BOB's integrated power regulator (an alternative to the usb power) I get the same spikes.

    -All the switches I mentioned are installed in the machine and are wired near the steppers' cables side by side. They are all wired NC. I really, really don't want to replace the wiring since it took me a lot of time to finish it (it goes through holes and cable carriers), looks really clean, I'm very happy with the soldering job I did at the XLR connectors and I'm not even sure if that would fix the problem at all.

    -If I wire an external switch to the isolated side, the spikes stop.




    All those points make me think that there is probably some interference from the steppers' cables, but at a level that the parallel port can handle directly but the BOB's isolated side can't (the switches working when the optoisolators are not properly powered up makes things even weirder). I don't know if the optoisolators can't "copy" the signal accurately enough when the spikes are present, or if the problem lies in the BOB's way of handling ground.


    I read someone suggested using 0.01uF capacitors parallel to each limit switch (between each input and ground) to filter the signal, I'll try that on monday if I still can't figure out what's going on by then.

    The other option I can think of would be to build a relay board so I can drive the switches at 24V, but the 24V would be from the same psu I'm using to power the isolated side of the breakout board, would the interference would still be there?

    This is my BOB:
    http://www.probotix.com/manuals/PBX-RF_manual.pdf




    Does anyone have any theory about what could be probably be happening?


    I don't join all the switches and the e-stop to the only usable input since I would be left without hardware homing and touch probe. I don't want to use a "Y" parallel cable (or even a second parallel port) to feed the inputs directly, since the control box is really nice (made on my other CNC) with the limit's connector included in it and even "Limits/E-Stop" v-carved over it; it would just not look good after the 3 months I took designing and building this machine.

    Thanks in advance!

  2. #2
    Join Date
    Jun 2007
    Posts
    3757

    Photos please.

    Take some photos so we can see exactly where your wiring, including power supply wire come and go to.

    It is not sufficient just to connect grounds together, wherever they are.
    This needs some planning, and what you have is symptomatic of some wrongly shared ground leads.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  3. #3
    Join Date
    Dec 2003
    Posts
    24216
    Is your PC power supply 5v common connected to ground? Usually this is done internally by ground buss screws.
    By ground, I mean earth ground.
    Using the term ground for various commons can get confusing.
    If so I would take a Ground wire from PP common to the central earth ground plate.
    Make sure the service ground is also connected to the central plate.
    Also ensure that all metalic parts of the machine and motors are bonded back to the Earth Plate.
    See this past post also http://www.cnczone.com/forums/showthread.php?t=71923
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  4. #4
    Join Date
    Jul 2009
    Posts
    690
    Quote Originally Posted by Al_The_Man View Post
    Is your PC power supply 5v common connected to ground? Usually this is done internally by ground buss screws.
    By ground, I mean earth ground.
    Using the term ground for various commons can get confusing.
    If so I would take a Ground wire from PP common to the central earth ground plate.
    Make sure the service ground is also connected to the central plate.
    Also ensure that all metalic parts of the machine and motors are bonded back to the Earth Plate.
    See this past post also http://www.cnczone.com/forums/showthread.php?t=71923
    Al.
    I checked the grounding and it seems fine (PP- 5Vgnd, PP-earth ground, 5Vgnd-earth ground). I noticed the BOB's PP case is not connected to the non-isolated side's ground; y tried connecting it to the isolated and non isolated grounds but it didn't make a difference. Maybe I should modify the BOB to bypass the opto and feed the inputs directly to the PP, but I don't want to screw up and kill the board, since I've already spent too much in this project.

    The machine uses awg22 wire for the steppers and awg26 for the limit switches and e-stop, they run parallel all the way (the router is wired independently to make it easier to replace). I know I should have used shielded wire, but it was the only flexible wire I could find locally that could handle the motor's current (actually, I had to modify the XLR connectors to make the wires fit in it). The design makes it difficult to add extra wires (it would be way too tight) to ground the motors and metallic parts (luckily, most of the machine is made of MDF).

    I'll try to add some pictures soon.

  5. #5
    Join Date
    Dec 2003
    Posts
    24216
    Quote Originally Posted by Walky View Post
    The design makes it difficult to add extra wires (it would be way too tight) to ground the motors and metallic parts (luckily, most of the machine is made of MDF).

    I'll try to add some pictures soon.
    Actually that is a case where it might be more important to add ground bonding, as with MDF, motor frames can become isolated from earth ground much easier.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  6. #6
    Join Date
    Jul 2009
    Posts
    690
    Quote Originally Posted by Al_The_Man View Post
    Actually that is a case where it might be more important to add ground bonding, as with MDF, motor frames can become isolated from earth ground much easier.
    Al.
    Sorry, my mistake. I though of the metal structure as a big antenna and forgot it would be grounded.

    BTW, I grounded the motors cases to the AC ground, and I'm still getting spikes :drowning:

    It seems I'll probably have to replace the wiring (or try the relay board's approach). Would shielded 24awg be enough for my 6-wire (originally 8-wire) steppers at 41V, ~2.5A each?

    Do you think there's a chance that it won't fix my problem?

  7. #7
    Join Date
    Jun 2007
    Posts
    3757

    Pictures please?

    The wrong termination of ANY of the power wiring AND powers supply components can cause this fault.
    As I said, take some pictures so we can assist.
    Using a guessing game, has not much chance of resolving your problem.
    A connecting wire as short as 1" in the wrong place, especially in the power supply low voltage terminations can cause this.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  8. #8
    Join Date
    Jul 2009
    Posts
    690
    Here are some pictures (the inputs' connector doesn't appear since I took the pictures after some experimenting).

    http://img268.imageshack.us/img268/6...6784grande.jpg
    http://img833.imageshack.us/img833/8...6778grande.jpg
    http://img834.imageshack.us/img834/5...6779grande.jpg
    http://img830.imageshack.us/img830/4...6780grande.jpg
    http://img833.imageshack.us/img833/3...6781grande.jpg
    http://img834.imageshack.us/img834/7...6782grande.jpg

    The psu at the left is 24V and powers the fans (two pairs in series) and the breakout board. The other psu is 36V running at 41V by the built-in potentiometer, specifically for the steppers.

  9. #9
    Join Date
    Jun 2007
    Posts
    3757

    Power wires.

    I see the switchmode supply has is one of the ones that has 3 negative and 3 positive terminals.
    Try not to use common wires, like for the negative and positive.
    Reason: Each of the drivers can be drawing different currents at any one time, and the voltage drop on the common wires changes all the time.

    From each of the positive power terminals, run 3 red wires to each fuse individually.
    I see you have a common negative bus. Good try, but the white wire to the supply negative will have varying voltage drops.

    Run each of the negatives from the driver straight to the supply negatives, and 1 wire to the ground common busbar.

    Return single wire grounds all back to the bus bar.
    Don't daisy chain ANY wires.

    Your limit switch wiring not in the photos. Are they connected yet?
    You can run all of your limit wires in a shielded cable, like an old printer cable.
    The shield on your cable should ONLY connect to the busbar.
    The other end of the shield should not be terminated at the machine.

    From the small supply run individual pairs of wires to where they are needed.

    Keep the mains wiring separately routed away from low voltage wires.
    Try to rout the stepper wires away from the limit switch wiring.

    Run a single wire from the common negative point to the busbar, if you need one. Try putting a 100 ohm resistor in series with this wire.
    It should run COLD, with no voltage drop across it. If not that should lead you to where the fault currents might be going.

    I assume the fifth wire from each stepper is an earth.
    Connect each to the busbar.

    The whole strategy here is that any voltage drops in the wires do not interfere with another circuit.

    Allow the router earth to be done through it's own cable, or is it double insulated? If turning it on and off does not cause resets etc, that's OK.
    Beware that you may need an earth from the router, to the nearest stepper will probably be OK, so that static electricity doesn't cause glitches.

    You might earth the guide rails too.

    Small voltage drops in wires can be quite significant compared to the low voltages used in the limit switch circuits.
    The spikes quite often can be larger than the signals, and are very hard to capture. The above rules makes mostly them irrelevant.

    When wires are run to limit switches in pairs, and not commoned anywhere in the machine, then any interference introduced on one wire appears on the other too, and they subtract from each other (call common mode) and interference cancels!

    One hidden source of trouble is currents running back to the PC through the 0v common. This will cause havoc, as evidenced by unplugging the USB.

    You need to make sure currents don't go through your signal commons.

    Machine looks nice. I hope this helps.
    As you are finding, disconnecting circuits can make the problem move, but while currents (including interference spikes) flow through common signal wires you will have problems.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  10. #10
    Join Date
    Jul 2009
    Posts
    690
    Thank you very much for your advice, I'll rewire everything as you said.

    My limit switches wiring appears in the pictures as a bunch of wires next to the steppers' ones, coming out of the back of the machine (with a DE9 at the end of it, and a miniplug intended to use with a touch probe). The controller's part of this connection is missing in the pictures, but it's just a male DE9 with some short wires going straight into the BOB's input (I removed it meanwhile so the cables don't stay in the way while testing the inputs).

    Run a single wire from the common negative point to the busbar, if you need one. Try putting a 100 ohm resistor in series with this wire.
    What do you mean by "common negative point"?


    I made a little test a couple of minutes ago:
    I just removed the Z axis switches' wires so they don't run near the stepper wires and then connected them as a single input (from the bob directly to the Z assembly): the spikes are still there! I even tried disabling the Z motor and it made no difference. This pair of cables is originally joined together by heatshrink every 5 inches or so, but not twisted.

    It seems that the problem might indeed be in the controller box or its surroundings; I sort of hope so, since rewiring the whole machine would be a horrible task.

  11. #11
    Join Date
    Jul 2009
    Posts
    690
    I've just found this:

    http://www.cnczone.com/forums/showthread.php?t=54739

    It seems I'm not alone in this, go figure.

    I sent a mail to Probotix, I hope they can help me with it (their customer service have been great so far).

    BTW, I just noticed the isolators ICs on the board are not optical but RF-based.

  12. #12
    Join Date
    Jun 2007
    Posts
    3757
    Quote Originally Posted by Walky View Post
    Thank you very much for your advice, I'll rewire everything as you said.

    My limit switches wiring appears in the pictures as a bunch of wires next to the steppers' ones, coming out of the back of the machine (with a DB9 at the end of it, and a miniplug intended to use with a touch probe). The controller's part of this connection is missing in the pictures, but it's just a male DB9 with some short wires going straight into the BOB's input (I removed it meanwhile so the cables don't stay in the way while testing the inputs).



    What do you mean by "common negative point"?
    The negative of the 12v power supply.


    I made a little test a couple of minutes ago:
    I just removed the Z axis switches' wires so they don't run near the stepper wires and then connected them as a single input (from the bob directly to the Z assembly): the spikes are still there!
    How are you measuring the spikes? Relative to which point?
    I even tried disabling the Z motor and it made no difference. This pair of cables is originally joined together by heatshrink every 5 inches or so, but not twisted.

    Disconnect the wires at the BOB and if the spike problem is still there then the noise is coming in through the supply leads.

    With multiple circuits it is often easiest to get each circuit going one at a time.

    It seems that the problem might indeed be in the controller box or its surroundings; I sort of hope so, since rewiring the whole machine would be a horrible task.
    If you haven't changed the power wires to the drivers, then nothing will have changed.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  13. #13
    Join Date
    Jul 2009
    Posts
    690
    I wired the drivers independently using the 6 leads of the psu and connected que negative lead of the BOB's PSU to the ground block (right now it's the only thing connected to it besides que wire that goes to earth ground), and the problem is still there.

    I disconnected the drivers from the BOB and the spikes stop; the same happens if I disconnect the XLR motors connections. It only takes one connected motor/driver to get the spikes.

    Last update:
    I just added a short jumper wire instead of the switch and the problem isn't there even with the motors working!. I then cut the long wire of the switch I used before (the one having interference) and joined the leads by hand... the spikes are gone!. Now I touched the joined leads to different metallic parts of the machine, and the limits are triggered even by touching the smallest screws of the machine! Hell, it even triggers by touching the (unplugged) router, and even the linear rails. I tried grounding each stepper directly to the ground block; it makes it harder to trigger the spikes, but they happen anyway. I don't have an oscilloscope to measure the spikes accurately, but Mach won't even let me quit Emergency mode when the problem is present (in fact, if I debounce a second, the spikes are back in a second).

    It seems it really was interference from the motor's wiring or the motors themselves, affecting even the shortest span of limit wiring (the test switch was still installed in the Z assembly, even when the cable was taken by air to the BOB).

    I guess I'll have to replace the limit's wiring with shielded wire. I should then connect the controller's side of the shielding to earth ground, right?. I'll try adding ceramic capacitors to each input before going into changing the wiring, maybe it'll work.


    Thanks again for your help.

  14. #14
    Join Date
    Dec 2003
    Posts
    24216
    Unless I am missing something, I do not see a ground bus/star point set up?
    There appears to be a neutral bus, but especially in the case of non-metallic enclosure and non-metallic machine construction, it is even more important, IMO.
    The service ground and router frame ground, together with shields and bonding conductors should terminate at the Earth ground star point, whether or not you chose to opt for completely isolation between each part of the system is your call.
    But Earth grounding and bonding applies whatever system is used.
    My personal practice is well stated on previous record that I have always advocated bonding supplies and systems to earth ground, this also covers PC based controls, this has stood me in good stead for more decades than I care to remember, with no recollection of the problems you appear to be having.
    Do NOT rely on picking up the earth ground for the PC and the router etc at their respective outlets, make sure they are bonded in the enclosure at the star point.
    This may, or not be the cause of your problem, but this is where I would start, together with using shielded cable for some of those low level signals that appear to be strung around the machine.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  15. #15
    Join Date
    Jul 2009
    Posts
    690
    Thanks, I'll get some shielded cable tomorrow.

    I hope to have rewiring done by tuesday, I'll tell you the results as soon as I have this done. I'll ground as much as I can at the machine itself (rails, reinforcement threaded rods, etc).

  16. #16
    Join Date
    Jun 2007
    Posts
    3757

    And beware...

    Quote Originally Posted by Walky View Post
    Thanks, I'll get some shielded cable tomorrow.

    I hope to have rewiring done by tuesday, I'll tell you the results as soon as I have this done. I'll ground as much as I can at the machine itself (rails, reinforcement threaded rods, etc).
    DON'T use the shield for a return or try to pass ANY current through the shield. It MUST be terminated to your ground star point, even by a long piece of wire.

    Never try to 'save a wire' by using a wire connected to the same place.
    It will work for light globes, but not with electronics.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  17. #17
    Join Date
    Jul 2009
    Posts
    690
    Probotix suggested 0.1uF capacitors between ground and each input... I bought them today (and some shielded cable, just in case) and that did the trick!. :banana:

    I even tried to induce interference and I didn't get any (mach3 is running right now just in case I get a spike). I'll solder the connectors again and see how it behaves; if I don't get a spike within the week I probably won't replace the wiring (as I said before, I'm in a hurry to finish this, and the machine design probably wouldn't allow for a quick replacement. Some microswitches are even glued in inaccesible places with heatshrink in every pin (easily breakable pins, btw).


    You can't imagine how grateful I'm of all your help, be sure I'll apply all your advices in my next builds (and when I add limit switches to my other machine). I'll only use shielded cables from now on, and be sure that the first thing I'll do once I sell this router is a donation to the Zone (I'll do it right now if I could).

    I'll make a topic about the finished machine very soon, be sure to check it out! Meanwhile I'll leave you a couple of videos from the last two weeks:

    [nomedia="http://www.youtube.com/watch?v=jTzg1zJ0E_A"]YouTube- Fresadora CNC[/nomedia]
    [nomedia="http://www.youtube.com/watch?v=GvpCh517_70"]YouTube- Tallado en pino.[/nomedia]

    Thanks again! :cheers:

  18. #18
    Join Date
    Sep 2009
    Posts
    22

    try this

    Hi Walky,

    1) Driver to stepper cables should be shielded and ground at one end.
    2) Change Debounce settings to 2.

    Regards Julian.

  19. #19
    Join Date
    Jul 2009
    Posts
    690
    Quote Originally Posted by sylvester1073 View Post
    Hi Walky,

    1) Driver to stepper cables should be shielded and ground at one end.
    2) Change Debounce settings to 2.

    Regards Julian.
    Hi

    I already fixed it by adding capacitors (parallel to each input). I won't use shielded cables this time because replacing all of it would be a problem at this point, but I will sure use them on every machine I build from now on. Debouncing didn't work for me before adding the capacitors, and luckily hasn't been neccesary after fixing the problem.

    Thanks anyway for your will to help

Similar Threads

  1. Help - Get interference from Plasma on my PC
    By nicjac in forum Waterjet General Topics
    Replies: 17
    Last Post: 03-02-2021, 08:42 AM
  2. Reducing RF Interference
    By stirling in forum Gecko Drives
    Replies: 4
    Last Post: 04-09-2010, 04:40 PM
  3. ERROR 041 INTERFERENCE IN NRC
    By jdgromi in forum G-Code Programing
    Replies: 4
    Last Post: 01-02-2009, 03:05 PM
  4. Hf Interference
    By Alex S.A in forum Waterjet General Topics
    Replies: 2
    Last Post: 02-12-2007, 01:05 AM
  5. Electrical Interference
    By Scratch in forum Waterjet General Topics
    Replies: 0
    Last Post: 01-13-2007, 05:49 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
  •