Page 1 of 6

GRBL Freezes while sending a file

Posted: Sat Sep 01, 2012 6:56 pm
by Will Winder
I'm not sure what is happening, but it appears that GRBL is shutting down part way through sending a gcode file.

The freeze seems to happen in a random location of the Gcode file, I have seen the freeze 5-10 times now and it has never happened on the same line twice. So I don't think it is a problem with the gcode file.

I thought it might be a bug in Universal Gcode Sender, so I switched to the python script... saw the same issue.

So I decided maybe a problem with OSX, so I switched to a linux machine... same issue!!!

The pololu chips shouldn't be overheating... I have a massive heatsink on them with a 12v fan running @24v. Without the fan running I can feel the heatsink will slowly heat up until it is too hot to touch, so I know it is sinking the heat... with the fan running the heatsink doesn't even get warm.

I have been milling aluminum so one theory is that maybe an aluminum chip is shorting something out, but why would it wait to short something out until 5 minutes into a file? And why would it allow the latest command to finish up?

Has anyone seen something like this? Any ideas for troubleshooting?

Thanks,
Will

Re: GRBL Freezes while sending a file

Posted: Sat Sep 01, 2012 7:15 pm
by edwardrford
I'd be interested to see the gcode.

I had a similar issue with EMC2, and it ended up being a command that it didn't understand (which was a result of bad CAM...).

Anyway, I think grbl will simply "skip" the line if it doesn't understand the command, so it seems unlikely that would be the case. However, I can imagine that maybe a specific combination of commands could potentially have exposed a bug?

-Edward

Re: GRBL Freezes while sending a file

Posted: Sat Sep 01, 2012 11:57 pm
by Will Winder
That was my first thought, but since the issue would occur at random locations in the file I don't think it is an issue with GRBL interpreting a command.

I scanned through the A4988 documentation trying to see if I could find an explanation to this issue. There were a few cases I could find where the chip would disable itself: (a) if it begins to overheat, but in this case it would re-enable itself when the temperature goes down and (b) in event of a short between motor leads or a short to ground, in this case the chip disables itself until power is reset or the chip is put to sleep and re-activated.

Since (b) described what I saw, I took a closer look at my arduino + stepper shield and sure enough there were a small number of aluminum shavings in there which could be causing a short. I cleaned them out and blew everything off with some compressed air.

That did the trick. Unfortunately while un-mounting and re-mounting my heatsink I've stripped 2 of the 4 screw holes. So now the heatsink doesn't sit flat and my 2nd Y axis motor is overheating!

Re: GRBL Freezes while sending a file

Posted: Thu Sep 20, 2012 12:37 pm
by Todd Bailey
Will...

I am not sure if this is the same issue as you were having but it seems my controller is stopping but the my G-Code sender continues to send the code.

I have attached an image of the part.

This is the second time I have run this part and it seems to stop in different places. Seeing as the code keeps sending I can start where I left off.

This is a very common thing for my machine and happens on my larger parts. It sounds like an overheating issue, maybe? I will look over my connections and see if all is OK... but I just want to confirm that this might be the same issue as you were having.

Re: GRBL Freezes while sending a file

Posted: Thu Sep 20, 2012 5:15 pm
by roberlin
I was having similar issues (albeit with tinyg rather than grblshield) and they seem to have been due to electromagnetic interference messing up the usb communication.
Anyway, I put the spindle (and my shop-vac) on a different ac circuit than my controller and laptop and my problems disappeared (knock on wood).

It might be worth a shot.

-Richard

Re: GRBL Freezes while sending a file

Posted: Sun Nov 11, 2012 3:55 am
by Aaron Seltzer
roberlin wrote:I was having similar issues (albeit with tinyg rather than grblshield) and they seem to have been due to electromagnetic interference messing up the usb communication.
Anyway, I put the spindle (and my shop-vac) on a different ac circuit than my controller and laptop and my problems disappeared (knock on wood).

It might be worth a shot.

-Richard
I have been running my Shapeoko for a while now, large files, no problem, and suddenly today it starts with the behavior. The Arduino stops replying and the gcode stops sending. Very frustrating. Turns out I moved all my cables around this morning, and the USB cable moved over the stepper wires. Moved it again, giving a gap between the USB and the other wire, and it now keeps going as normal.

Great catch Richard! Wish I had read your post earlier as this killed a lot of time, restarting a big job over and over.

Re: GRBL Freezes while sending a file

Posted: Mon Nov 12, 2012 12:32 am
by dointhangs
I am/was having the same problem. Not fun. Very glad to see this thread, I moved the spindle, fan, a big light and a vacuum which I had going off the same power strip as the main electronics onto another receptacle. I am not sure if its another breaker circuit on my panel or not. But it seems to be doing better now, although time will tell. This is what I love about open source communities as it might have taken awhile for me to figure this one out!

Re: GRBL Freezes while sending a file

Posted: Wed Nov 14, 2012 3:33 am
by dointhangs
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...

Re: GRBL Freezes while sending a file

Posted: Wed Nov 14, 2012 4:57 pm
by xenoputtss
Couldn't you use an AC Power Line Filter to stop most of the EMI from transmitting down your main power line? I'm asking because when i build mine, the room where this was all going to sit does not have multiple circuits to it to plug the different devices into.

If this is true, would this work for that purpose? http://www.jameco.com/webapp/wcs/stores ... 2114124_-1

Re: GRBL Freezes while sending a file

Posted: Wed Nov 14, 2012 5:11 pm
by dointhangs
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)