Inventables Community Forum

Peck Drilling In Grbl - Script Included

This weekend I needed to peck drill several holes with my Xcarve. Since grbl cannot interpret G83 peck instructions I wrote a quick script that converts the G83 to grlbl accepted commands. I successfully used it with my Xcarve to drill >50 0.09" holes into 5/8 Aluminum. I’ve placed it on github G83_to_grbl, please pass along any comments or suggestions.

I suggest using something like OpenSCAM to simulate your code before trying it on your machine.

2 Likes

Interesting.
However I do not know what Peck drill is.
Can you elaborate for us novices please.
:slight_smile:

What is “Peck Drilling”?

A term you’ll hear a lot is “peck drilling”. This is the practice of drilling a little ways (the peck distance), back off some distance, and then going back down to the bottom to take another peck. Think of the motion as being not unlike a woodpecker. The reason it’s done is to evacuate the chips from the bore. Recutting chips is always a bad thing for tool life. There’s only enough room down in the bore for the chips that fit in the flutes of the twist drill, and the deeper the hole, the harder it is to evacuate those chips out of the hole. Peck drilling helps in two ways. First, even a very short peck where the retraction is minimal helps to break off the chip resulting in shorter chips. Shorter chips are much easier to evacuate.

1 Like

Great answer! @ErikJenkins

To tack on to Eriks answer, The high speed of the spindle on the Xcarve causes it to generate significant heat while drilling deep (3-4x tool diam) bores in metal. Getting the chips out of the bore helps to keep the work area cooler by reducing the amount of material that the cutter has to constantly “push” away. At 5/8"s down into my bore, the cutter wasn’t able to lift the chips out on its own. So I added in the pecking process the help the machine clear the bore and cool itself off between passes. G83 (the code for Peck drilling) is a standard process for many machines, but the grbl interpreter skips over it because it does not accept the command. I didn’t develop anything new here, I just converted the G83 into something our machines can understand. I use several different CAM software packages to generate my gcode, and have run into the G83 problem often. It was finally time to stop avoiding the problem.

Drilling metal with the Xcarve is actually a little trickier than milling because with milling you have the benefit of the cutter moving through your part allowing the area to cool down before the mill returns to the same spot. There are “drill-mills” which are better designed to drill at high spindle speeds, however you still have to make sure they are “cutting” and not “abrading” the surface if you want them to stay cool.

2 Likes

The Carve working hard.

Looks like someone is making a small heat exchanger :wink:

Very awesome, thanks for sharing, I’ve been looking for this kind of script!

So how do I use that file ? Am I opening the link through easel ?

@ShonnRonza I had to look over the code to remember :slight_smile: its been a while.

The script is a Python file, so if you don’t have Python install it first. The easiest way I do this is to install Anaconda, from Continuum Analytics. It is a VERY powerful toolset that installs Python and most of the libraries you’ll need for easy development.

The script takes in a GCode file that calls out the peck drill MOP, G83 and converts it into milling instructions in a new output file. If you aren’t working with GCode files (like working straight out of easel) then this tool won’t be beneficial to you.

Once you have Python, you can execute the script. If you used Anaconda, then the library you need for the GUI to work will pop up and ask you for the file you want to convert. If you don’t have the Tkinter library in your install, you can just comment out that part and hardcode the filepath to the Gcode. Tell the script where you file is and out pops a mill converted peck drill.

PLEASE PLEASE use something like OpenSCAM to make sure the tool path makes sense, and PLEASE do an air cut first. Anytime Gcode is manipulated, pretty nasty things can happen. And the machine always does what it’s told…unfortunately.

Apparently OS X has python installed. I’m trying to do this on a Mac. As I look into this further it is suggested to use Mac ports for python with a new install. ? I’ll keep at it thanks.

Great! I wrote it in python 2.7, not sure if it will run in python 3x. At the Mac console/terminal type, python -V, if it says version 2.x you should be good to go.

To run the file, open a terminal, navigate to where you placed the file, and enter python FILENAMEYOUSAVEDITAS.py

If it throws any errors, let me know what it says. If it doesn’t look for a newfile in the same directory as the Gcode file you wanted to manipulate.

Hi.

Great. I try evening.