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!