February 11, 2019 at 12:21 pm #88705
So the MPCNC is built (massive thank you to the folks here at v1!!!) and have got the steppers wired and the spindle (500W chinese spindle) installed. It works!
grbl 1.1f on genuine arduino uno
shielded limit switch wires with switches all wired in NO position with electrical noise suppression circuit from here: https://github.com/gnea/grbl/wiki/Wiring-Limit-Switches
f%^$&ing electrical noise! LOL
I have wired everything up and it works fine but the minute I installed a relay (5V arduino relay) to start/stop the spindle it throws up a hard limit error.
I have even separated the relay from the stepper drivers and uno by 1ft and it still kicks me out the instant the relay opens or closes.
Any suggestions for spindle control that doesn’t rely on a relay that must be somehow broadcasting enough EMP to take out a robot invasion??February 11, 2019 at 3:20 pm #88746
Try putting a surge suppressor in parallel with the relay coil – there are some formulas to pick the right resistance and capacitance. Another option is a “transzorb” or metal oxide varistor (MOV) which limits the maximum voltage kickback from the relay when it deenergizes. If the problem occurs when the relay gets turned on, you may have an issue with the relay coil inrush current dragging the supply voltage down. An MOV could also be used on the output of the relay to help limit the peak voltage when the contacts open.February 12, 2019 at 8:10 am #88835
Thanks for the feedback. I’ve just disabled hard limits on the grbl since farting three houses over seems to trip the hard limits on this thing. This is the second uno ive used with the exact same issue and the web is stacked with similar tales. I wonder if it’s too sensitive a device to use reliably for cnc..
I’ll revisit it later after I’ve used it for awhile.
Thanks again!July 25, 2019 at 9:44 am #107398
(ohai, first post here): with the risk of getting flak for resurrecting an old thread: long wires are antennas, and when connected to a sensitive digital input, they’ll deliver enough current to switch things randomly; there are a few things you can do:
- optically isolate the inputs (best solution)
- add capacitors in parallel with the inputs
I recently rebuilt my MPCNC and what worked well previously because the arduino was screwed to the table next to the end stops (so there were like 30cm of cable in between them) stopped working when I put the thing in a nice metallic cabinet together with all the electronics, power and otherwise, and had a bigger table and 3m of wire routed next to the stepper cables.
I connected the oscilloscope to the limit switch input, and with the limit cables connected it was picking up presumably the PWM from steppers (I have shielded cables everywhere, doesn’t seem to help in this case), reading from -0.3 to +6V, so enough voltage swing to register a signal. What I ended up doing was putting some ceramic caps on the CNC shield (it has pins for +X / -X, etc. connected in parallel, so I just crimped 2.2nf capacitors in 2-pin dupont connector thingies and popped them on the free pins); suddenly the signal was clean as a whistle, it works reliably now.
I think I’ll still optically isolate inputs (I have a few of those 4-channel optocoupler boards, I’ll probably mount one right next to the connectors with double stick tape), but it seems pretty okay as is.
I also had to put a ferrite bead on the USB cable (and I placed one on the 24V power line close to the shield as well, for good measure) because the VFD tended to scare the USB away occasionally when starting.
Maybe I’ll post images of the complete thing later when my workshop is no longer a disaster zone 🙂
You must be logged in to reply to this topic.