GRBL randomly disconnecting during carve

I am using Gsender on windows 10 with my homemade cnc.

I am having the issue of GRBL disconnecting randomly during a job. I make crib boards so I use the same gcode over and over, attached is the gcode for drilling the 367 holes needed for one board. It randomly will stop in the middle because the machine disconnects. I have to disconnect the USB and plug it back in before I can reconnect to the machine. By random, I mean it happens after 10 holes sometimes, sometimes it finished two boards. Almost always it disconnects while moving from hole to hole at rapid speed.

My setup:
Homemade cnc with Arduino Uno with shield running A4988 drivers. 500w air cooled spindle.
Power for the Arduino is from a 24V power supply and power for the spindle is from its own power supply. Both power supplies use the same power cord to get power.

What I have tried:

  • Replaced USB cable, new one is shielded.
  • Reduced max rate on all axis’s way down to 1000mm/min
  • Tried a different computer to run the gcode
  • separated spindle power wires from stepper wires
  • Replaced Arduino with a new Arduino
  • Tried UGS and Gsender
  • Tried powered usb hub
  • Turned all power saving off for the computer and disabled any power saving for usb ports

I currently have ferrites on order, where should I put these. I believe I should put 1 on each end of the USB cable, should I put them on each stepper cable and spindle power cable?

I have multiple 3D printers and laser engravers and have never had this issue with those. Is there anything else anyone can recommend to try? I have thought about using shielded cat 6 cables for the stepper motors, would this help? How about changing the power so that I plug in different cables into different circuits for the 24V power supply and spindle power supply? Should I be grounding the Arduino in some way?

Below is my grbl config.

$0 10 Step pulse time
$1 255 Step idle delay
$2 0 Step pulse invert
$3 0 Step direction invert
$4 0 Invert step enable pin
$5 0 Invert limit pins
$6 0 Invert probe pin
$10 1 Status report options
$11 0.010 Junction deviation
$12 0.002 Arc tolerance
$13 0 Report in inches
$20 0 Soft limits enable
$21 0 Hard limits enable
$22 0 Homing cycle enable
$23 0 Homing direction invert
$24 25.000 Homing locate feed rate
$25 500.000 Homing search seek rate
$26 250 Homing switch debounce delay
$27 1.000 Homing switch pull-off distance
$30 1000 Maximum spindle speed
$31 0 Minimum spindle speed
$32 0 Laser-mode enable
$100 40.000 X-axis travel resolution
$101 40.000 Y-axis travel resolution
$102 250.000 Z-axis travel resolution
$110 1000.000 X-axis maximum rate
$111 1000.000 Y-axis maximum rate
$112 500.000 Z-axis maximum rate
$120 1000.000 X-axis acceleration
$121 1000.000 Y-axis acceleration
$122 1000.000 Z-axis acceleration
$130 200.000 X-axis maximum travel
$131 200.000 Y-axis maximum travel
$132 200.000 Z-axis maximum travel

@hardingb The simplest first step is to make sure that you have turned OFF all USB power saving/controlling features in Windows. Do this in the power settings tab of control panel AND in device manager as well. This may not solve your problem, unfortunately. However, it is a very common cause of disconnects, so it’s a reasonable first step.

I actually have done this as well. I will update my list to include this. As well, I have my computer to never sleep. Thanks for suggestion!

@hardingb I knew that it wouldn’t be that easy. :frowning_face:

If you search on this forum and elsewhere on the internet, you will find many, many articles and papers on the problems of grbl-controlled machines freezing and/or disconnecting while cutting. There doesn’t seem to be a one size fits all solution. Major culprits seem to be static and emi interference. With luck one or more of the solutions that you find will solve your particular problem. I wish that I could be more helpful.

2 Likes

I had good luck with putting my router and shop vac on a separate household circuit - borders on superstition I suppose, but does give some isolation / impedance between the electronics and the noisy brushed motors in the router and vac. If you don’t have a separate circuit nearby, try using an extension cord to get to another circuit - cheapest / easiest experiment to run. I think there was someone else on the forum who did try that and it was a temporary resolution.

I have been looking into power supply filtering - I would like to try something out that way, but I don’t want to just throw money / parts at the situation without having a stronger understanding of what may be happening.

My ideal case would be to run a test where I can measure and replicate the problem (say with an oscilloscope + disconnection happening), and then demonstrate the effectiveness of the solution - but I’m not sure if I can get my hands on instrumentation to do so.

1 Like

Please if you find the solution for lt, take a moment to post here. While I don’t have that particular problem currently, I may in the future. My only suggestion is a good quality USB cable, but I am sure you already have that covered.

Best of luck!
Jake

I did a number of things yesterday to work on the issue and I think I have found a solution.

Below is what I did in order:

  • Isolated the electronics from the spindle. I have not been running a shop vac during a job to take that out of the picture. I placed each on its own circuit. I did get a program to run for a few minutes and was optimistic but it failed.
  • Next I changed the z-axis stepper cable to a shielded cable. This did not work as well.
  • Next my ferrites finally arrived and I put them everywhere. I got a package of 12 and I put one on each end of my usb cable (I think this was the solution) but I also put one on each end of my stepper motor cables and my spindle cable. This seems to have fixed the job. I ran a 40min job, 25min job, and 2hr job all without any problems.

I cannot guarantee it was just the ferrites and not a combination of the things I did, but the ferrites were the final thing that eliminated the problem.

Hope this helps someone in the future.

2 Likes

Hey, did your solutions stand up to the test of time?

I had this problem and I found a fix. I took the router power cable out of the cable chain and ran the cord to the front left side (opposite side from the controller)
. Since then i haven’t had a disconnect.

Apparently it has to with the router brushes inducing extra voltage/current into the wires going into the controller.

It was the best day ever.

1 Like

Can’t wait to get back to my CNC next week to try this soln (ie removing the router cable from the chain).

Yesterday I had a perfect record of zero disconnects on a long day of multiple types of cuts (4 inlays, pockets etc) but all with smaller bits (eg V-bit, 1/8 , roundover, keyhole etc)
Then this morning, while I was trying to actually cut yesterday’s projects out of the stock, I had 5 or 6 disconnects in quick succession almost at the same place in the job.

I tried some of the low hanging fruit like turning the vac off, ensuring USB port never goes to sleep, changing the USB cable etc but the disconnect happened repeatedly at more or less the same place immediately after a step down.

I was trying to cut out a 10 inch clock face from a 4/4 (1inch thick) piece of cherry. At about 3/4 of an inch down, on each attempt, the 1/4 inch bit seemed to bind and then the disconnect happened. I did try chango bits thinking that maybe it was a bit sharpness issue causing the bind, but eventually found that by increasing the spindle speed, I could get past that point with no bind and no disconnect.

What I suspect happened is that when the router motor came under increased load, it must have drawn more power and that was enough to cause the interference and resulting disconnect.

I am looking forward to getting back next week to try this soln as I have another project waiting (in trepidation) to be cut out.

@GregM I hope that you report back on your results, Greg. I’ve been working with my buddy who has a Mill that was going well, but has now been pretty much out of action for a couple of weeks owing to freezes. He has made all the changes suggested here - and then some. Some seem to work for a while, then the freezes start up again. His router cable has not been in the drag chain for almost a year, so that cannot be the problem in his case. If it fixes your problems, though, that would be great.

I bought my Long Mill Mk1 used not too long ago, with the plan to use it as a learning thing. Unfortunately, what I have learned is that Uno/grbl machines don’t like me. I sold it last night at cost. I hope that you have much better luck than I did.

Please explain (maybe a photo) of how you attached and supported the cable somthat it kept out of the way of.the moving parts gantry etc.

Thanks !