Definitely don’t have the patience to rewire with shielded cables. I’m going to put a small noise canceling circuit together to go in between the arduino and the stock wires. In theory it should do the trick, i’ll let you know.
Thanks guys, the feedback through these forums is really helpful.
Larry, yes, I’m using UGS to send commands, however I’m not really sure why I ran into the issue that I did. I rather suspect that I’ve lost position somewhere during the things I was doing at the time. I’m normally pretty careful.
I’d homed the machine, set zero on a job and then jogged the machine clear of the work. When I clicked on "Return to zero), my Z axis ran upwards and pushed through the switch and hit the physical limits of the lead screw. I certainly cannot discount “operator error” as one of the causes…
One suggestion I’d make is to consider adding a nylock nut over the threaded eccentric nuts on each axis. Last night my Z axis eccentric nut came loose during a job, the bit was forced progressively deeper into the work until the top right V-Wheel came completely adrift and the collet was forced off the spindle. Not pretty…
I’d coincidentally checked the collet grub screws just prior to this job, so I know they were secure. My assumption at this stage is the eccentric nut came loose and then as the bit was forced deeper into the work, the vibration worsened the loosening exponentially. The lasting damage to the machine is that the shoulder of the hole in which the eccentric nut fits has been worn away.
I’m back up and running, but I’d encourage regular checks of every fastening and the addition of the aforementioned locknuts. They may save some considerable heartache.
Brian, any noise suppression ideas would be very welcome.
Larry, one other small mod that has saved the z axis switch a couple of times can be seen in the second of the images I posted above. The small metal lever on the switch was bent around so the z axis strikes it a little earlier. Yes it reduces the total available z axis travel, but it does give a few moments of additional time in which you can hit the power switch before breaking the switch off…
I sent out a circuit to oshpark for 3 of these boards 1 for each axis, since it’s so cheap. Now haven’t exactly tested it yet so do at your own risk or wait for me to get the boards and i’ll let you know if it works.
@DavidWestley
David, you could try something like this for those bad moments in life. It’s not exactly what I would use, but is just something to make the point. If the Z axis goes crazy it will hit the mechanical stop before destroying the switch, but is placed in such a way that Homing still works. If things go bad the carriage will hit the white plastic stop and either stop or destroy the plastic stop, but in any event should give you added time to hit the panic button without having to compromise your Z travel distance and if sufficiently strong prevent the switch from being destroyed.
@BrianSaban
Brian, a schematic would have been very helpful. Based on what I can tell from your board layout I don’t think this is going work at all. So, I must be missing something. Can you post a schematic so that I can take a look at it without making assumptions?
Thanks…
Larry
@BrianSaban
Brian, this circuit has the power supply (through the 680 ohm resistor) connected to the input of the low pass filter and the output going to the Arduino pin. So, if your interference is coming in on the 5 volt line this would help some (not much). I think maybe you intended to filter the wire coming from your limit switch to the Arduino.
The 680 ohm resistor doesn’t really serve any purpose in this circuit and just adds to the power draw on the 5 volt line.
You are trying to pull the Arduino pin low through the 10K ohm resistor.
It’s just a basic low-pass filter (Never saw one without a pull-up resistor); from switch contact, pull-up resistor to 5V (680 ohm), series resistor (10 K), then capacitor to GND (100 nF). Should do the trick when you have one connected to each switch. Either way it shouldn’t hurt any of the electronics, worth giving it a try.
I was focused on reducing the noise on the limit switch wire. The 680 ohm resistor does hook the power supply into the low pass filter, so if the noise you are getting is on the power supply then the 680 ohm resistor would serve a purpose.
However, if the noise really is coming in on the power wire I would think you would be having more problems than just the limit switches.
(Edit: 7/27/2015) I really shouldn’t do things late at night. The 10K ohm resistor forms a voltage divider with the internal pull-up resistor of the Arduino.
It seems that the equivalent resistance of the internal pull-up is about 35.7K ohms. With your 10K ohm resistor in the circuit then you would get a current of about 5 volts / 47.5K ohms = 1.1 mA. So the voltage drop across the 10K ohm resistor is 10K ohms * 1.1 mA = 1.1 volts. This is outside the limit for a logic 0 for all logic families except CMOS.
You would have to use a smaller resistor to get your limit switch to trip reliably. Lowering the resistance also shifts the cut-off frequency of the low pass filter.
Well, I had to revisit this after having more time to think about it. Below is a revised schematic of the circuit that I think you want. It’s a low pass filter for the signal wire (limit switch) that you are trying to filter to remove noise. I included my calculations so that my work can be checked by others.
Turns out that the Arduino pins will accept anything less than 0.3 * Vcc as a logic low. With the Arduino at +5 volts power, your logic low level on an input pin can be as high as 1.5 volts.
To be most effective the resistor/capacitor should be connected as close as you can reasonably get it to the gShield pin.
I suppose the frequency cut-off that you selected was somewhat arbitrary.
For those just reading this the internal pull-up on the Arduino pin is generally considered to be 35.7K ohms.
interesting. When the heat drops from 100 degrees here in NYC and I can stand to be in the garage I will definitely give it a look over. So hot and humid here this week!
Thanks Larry, looks like a trip to my friendly electronic store tomorrow.
Talking to one of our Engineers, he suggested that the USB shielded cable I’ve used was less than ideal. His suggestion was twisted pairs of wires that are shielded - for example the blue data cable in ubiquitous use on PC’s, routers etc.
Worth the upgrade while I’m playing do you think? (Not urgent - I’m happily playing just with the homing switches and soft limits).
David.
Hi, David. Glad to hear you’re having fun with your machine.
The limit switch idea has some appeal to the engineering side of me, but having gone through this exercise and the conversations on this forum I don’t see much advantage to true limit switches on this machine.
I’m going the homing/soft limits approach as my solution as I think for the X-carve it has enough of an advantage that I don’t see spending the extra time/money/aggravation of doing the limit switch solution.
I’m going to be interested in Brian’s results from the low pass filter idea, but I’m not overly optimistic about that approach.
Since the soft limits system doesn’t use the homing/limit switches after the actual homing operation I think that unless you have issues with homing failures I would just go with what you have.
Larry
@LarryM Well the little boards I made came in, but i’m so bogged down at work it may take a week or two to get to and I need to grab some little blue screw terminals. But i’m on it! (at some point)
Just for giggles, I ran some extra wires and installed true limit switches at the ends of the X and left-hand Y rails. They’re wired in parallel for NO operation at the moment, and so far they seem to be working great. The machine will still home on the +Z/-X/-Y switches, and once it’s finished and pulled off, all of the switches then work as hard limits and stop all motion when any one is activated - even when jogging, which was important to me. The only movement with no protection now is in the -Z direction, but there’s a very fine line there that I’m not sure I really want to toe. That’s what the big red button is for.
@TimothyHanson
My Tormach 770 does not have a limit switch at Z- and I keep my thumb on the Estop for the first run of all operations for a job. Even then I’ve drilled through 1/2" of alu in less time then I could hit the Estop.
When I get my machine assembled and running I too will have full limit switches less Z-
Dave
Ok, so got my X,Y,Z low pass filters made, assembled and soldered, hopefully i’ll get to test them this week! If it works it would sure be much easier than rewiring everything with shielded cable (More maker like also)
I am proud to say my little boards performed perfectly!!! No more crashing rails or breaking “Limit Switches” yes now I can officially call them limit switches (Most importantly without having to rewire the original unshielded wires) , oh and the homing works perfect as well.
I only tested them in UGS, I try it with easel tomorrow but should work the same. The only glitch I did find was when I do trip a switch and reset the hard limit, It locks once more when attempting to move the other way. After unlocking the second time all is fine. I will need to test further this week to make 100% all is ok