GRBL Freezes while sending a file

Discussion about the arduino based g-code interpreter, grbl
xenoputtss
Posts: 47
Joined: Mon Oct 22, 2012 3:17 pm

Re: GRBL Freezes while sending a file

Post by xenoputtss » Wed Nov 14, 2012 6:13 pm

dointhangs wrote:A very nice thought, my workaround to the other receptacle is not much to look at and I would rather have a proper fix! I am not going to hit buy just yet but its cheap enough to just try... would this just go into the power supply to the electronics? (All the power hungry appliances into a power strip "upstream" of this)
I think (and I mean think) you would either plug your EMI generating device into this, or plug your EMI sensitive devices into this....

These things (albeit more expensive versions) are popular with home theater groups, that kinda where i got the idea.


http://ulstandardsinfonet.ul.com/scopes ... =1283.html - seems to be the standard for what I am talking about
http://www.homecontrols.com/Tripp-Lite- ... TRABLOK428 - another similar device (which looks "prettier")
*edit; added more info/noise to my post

Aaron Seltzer
Posts: 46
Joined: Tue Apr 10, 2012 4:33 am

Re: GRBL Freezes while sending a file

Post by Aaron Seltzer » Wed Nov 14, 2012 11:45 pm

dointhangs wrote:I havent run a huge job but this problem seems to have gone away by moving some of the appliances to another receptacle as I described in the previous post. I will run some bigger jobs in the next few days. If I think this is truly the solution to the bug I will post a few lines on the GRBL wiki page...
http://www.shapeoko.com/wiki/index.php/Grbl
maybe a section "9" on the TOC: "Noted GRBL freezing problem and possible fix". Then the section will simply say "A problem has been noted by several users that having the electronics on the same ac circuit as multiple other devices (spindle, fan, vacuum, or other) can cause electromagnetic interference with the usb connection and somehow cause GRBL to freeze midway during sending a file. Clean routing of wiring is also suggested to avoid this problem."
Sound good? I really do pity the poor lonely souls who encounter this problem without the luck of encountering this forum post...
I have everything on the same extension box (that's my kill all switch) with no problems. The problem for me occurred when the Arduino USB cable was laying on top of a/c lines, or the stepper motor cables. Very repeatable. Move cables and it runs for hours.

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: GRBL Freezes while sending a file

Post by edwardrford » Mon Nov 19, 2012 1:54 am

In a former life I was something like a system administrator. Part of my gig sometimes involved wiring server racks. We always stuck to the idea of wiring the power down one side of the rack and the data down the other. Although most cables are supposed to prevent this sort of contamination, in my experience, it doesn't. Or more specifically, the odds of interference are great enough that precautions should be taken. With that in mind, I run the power for my spindle out to the back left of my machine, and the stepper cables to the back left. I also plug them into two separate outlets.

I guess that's a long way of saying I concur with the previous posts/suggestions of taking the precaution of giving space to the AC lines :-)

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

dointhangs
Posts: 179
Joined: Tue Jun 05, 2012 7:31 pm

Re: GRBL Freezes while sending a file

Post by dointhangs » Mon Nov 19, 2012 6:36 pm

i added a quick edit to the wiki - TOC title = Streaming Grbl "glitch free" :-)
http://www.shapeoko.com/wiki/index.php/Grbl
Shapeoko #298, dual drive upgrade, acme z axis, open bed endplates and a slightly larger ("expanded desktop") work area!

forgottenCNC
Posts: 34
Joined: Mon Jul 30, 2012 6:36 am

Re: GRBL Freezes while sending a file

Post by forgottenCNC » Tue Nov 20, 2012 10:18 am

Some information that my be helpful...Bypass capacitors ( A.K.A Decoupling capacitors) help remove AC noise from your circuits. (don't use cheap power supplies as they are known to have poor decoupling), Just had a Idea... you could try placing a 4.7uF capacitor (rated at 50V) across the GRBL + and - terminal, this would be the easiest fix.

Also make sure you are using a good shield USB cable between your computer and Ardunio because not all USB cables are shielded

On another note is that the GRBL does not freeze it is in a waiting state, once the lines of code that are on the Ardunio (Gcode interpreter) have be executed it sends a conman to the gcode sender to send more gcode and this is the conman that gets lost due to noise. So as a result both ends ( Gcode interpreter and Gcode sender) are waiting for each other. A on the fly fix is to resend the last line of code sent to the interpreter and this will start the hand shaking again.

AngusF
Posts: 17
Joined: Mon Apr 09, 2012 9:33 pm

Re: GRBL Freezes while sending a file

Post by AngusF » Sun Dec 23, 2012 6:53 am

Great thread! I've made it sticky. I've had issues like this, and in my case, USB cable routing helped a fair bit, but I'm not at 100% yet.

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: GRBL Freezes while sending a file

Post by Will Winder » Sun Dec 23, 2012 11:38 pm

This issue mysteriously returned for me over the past week. Very frustrating. I now have my spindle and Stepper power supply on a separate outlet (which is on a separate circuit). When the issue happens the serial connection between the computer and the arduino gets completely trashed, I need to unplug and re-plug the USB cable.

I've tried the following tests:
1. Replace USB cable, there was no change.

2. Different Gcode senders, Universal Gcode Sender (standard 1.0.5 and modified to send commands one at a time rather than buffering them), I also tried stream.py which comes with Grbl. Both have the same issue.

3. Spindle + Stepper PSU on same or separate outlets - Most jobs freeze after a minute or 2.

4. Spindle OFF, Stepper PSU powered so that it is "cutting air" - Job finishes with no issue.

5. Spindle ON, Stepper PSU off - Jobs freeze just like test 3.

So the root cause is definitely related to the spindle somehow. I've ordered replacement brushes for my dremel (XPR 400) and will see if that helps. If there is no change I guess I'll have to upgrade to a proxxon or dewalt trim router. I'd like to upgrade, but the dremel has worked fine for everything I've thrown at it (wood/acrylic/aluminum).
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

dointhangs
Posts: 179
Joined: Tue Jun 05, 2012 7:31 pm

Re: GRBL Freezes while sending a file

Post by dointhangs » Tue Dec 25, 2012 3:45 am

Ah sorry to hear that will, I have been on a run of good luck with this problem, I have the usb cable coming out of the arduino taped to the wall (getting it away from any other stepper or of course power cable) and that seems to be my major breakthrough. But fwiw a couple of months ago, I thought that it happened once when I powered a vacuum on the same ac circuit to clean up the bed. So thats agreeing with your findings here.
Shapeoko #298, dual drive upgrade, acme z axis, open bed endplates and a slightly larger ("expanded desktop") work area!

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: GRBL Freezes while sending a file

Post by cvoinescu » Tue Dec 25, 2012 10:09 pm

FWIW, I have my eShapeOko configured as a 3D printer and I occasionally lose connection between the computer and the Arduino (it's a Mega 2560, not a Uno, but that shoulnd't make a difference). I suspect a lousy USB cable or I may be doing something wrong with the grounding, but haven't had time to do much debugging. It seems to be caused by electrical noise, as a certain vacuum cleaner and the bandsaw at my local hackspace always bork it when they turn off, in addition to relatively rare random occurrences.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

misan2
Posts: 22
Joined: Tue Jun 19, 2012 8:32 am

Re: GRBL Freezes while sending a file

Post by misan2 » Sun Dec 30, 2012 12:09 am

I had the same problem with my 3D printer powered by an Arduino Mega 2560.

I solved completely with a my USB cable giving three turns to a ferrite torus.

Post Reply