GRBL Freezes while sending a file

Discussion about the arduino based g-code interpreter, grbl
Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

GRBL Freezes while sending a file

Post by Will Winder » Sat Sep 01, 2012 6:56 pm

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
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

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 » Sat Sep 01, 2012 7:15 pm

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
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

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 » Sat Sep 01, 2012 11:57 pm

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!
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

Todd Bailey
Posts: 39
Joined: Tue Jul 03, 2012 6:19 pm
Location: Fredericton, NB
Contact:

Re: GRBL Freezes while sending a file

Post by Todd Bailey » Thu Sep 20, 2012 12:37 pm

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.
Attachments
F5BD0CC6-620C-49FE-8E34-8344CE5A3BFA.jpg
F5BD0CC6-620C-49FE-8E34-8344CE5A3BFA.jpg (85.36 KiB) Viewed 9465 times
--------------------------------------------
Todd Bailey and ShapeOko - 413
Owner and Creative Designer
4m3D Creative Design
http://www.4m3d.com
Skype Call - todd.4m3d
Phone - 443-450-4633

Newsletter - Subscribe - Free model every issue

roberlin
Posts: 59
Joined: Tue Apr 10, 2012 12:12 pm
Location: Baton Rouge, Louisiana

Re: GRBL Freezes while sending a file

Post by roberlin » Thu Sep 20, 2012 5:15 pm

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

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

Re: GRBL Freezes while sending a file

Post by Aaron Seltzer » Sun Nov 11, 2012 3:55 am

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.

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

Re: GRBL Freezes while sending a file

Post by dointhangs » Mon Nov 12, 2012 12:32 am

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!
Shapeoko #298, dual drive upgrade, acme z axis, open bed endplates and a slightly larger ("expanded desktop") work area!

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

Re: GRBL Freezes while sending a file

Post by dointhangs » Wed Nov 14, 2012 3:33 am

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...
Shapeoko #298, dual drive upgrade, acme z axis, open bed endplates and a slightly larger ("expanded desktop") work area!

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 4:57 pm

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

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

Re: GRBL Freezes while sending a file

Post by dointhangs » Wed Nov 14, 2012 5:11 pm

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)
Shapeoko #298, dual drive upgrade, acme z axis, open bed endplates and a slightly larger ("expanded desktop") work area!

Post Reply