Using the probe command in GRBL 0.9 to accurately set the Z-axis to the workpiece surface. An Eagle BRD file into ChiliPeppr, inflating your milling. Create G-Code from an EAGLE File. Z Down sets the cutting depth for the trace isolation. This should be set to go just bellow the copper layer. I use -0.007 inches. Drill Depth should be set to about 0.005 inches below the thickness of your carrier board. So if your carrier board is 0.062 inches, you would set this option to -0.
2) Layout the PCB artwork in EAGLE. These files are standard Gcode text files specifying CNC X,Y, and Z moves. If your machine table accuracy allows the depth of cut to be very uniform across the PCB area (say +/- 0.5 mil or so).
Universal Gcode Sender Main Screen Display Current GRBL SettingsThere are quite a few GRBL settings that we can adjust to get our CNC machines to do exactly what we want. I found it was easier to refer back to a single sheet while setting up my machine as opposed to going back and searching the GRBL wiki page. To download a copy of this cheat sheet, click the link below.The first step is to see your current settings. Type “$$” to display the available user defined settings in the console window.For a complete list check out theHere, we are interested in the “Steps/mm” settings.$100=314.961 (x, step/mm)$101=314.961 (y, step/mm)$102=78.740 (z, step/mm)Note these were not the default settings on my system.
How did I get 314.961? Good question. All it takes is some quick math and a few pieces of information.Lead Screw Pitch =.200 inches (inches per revolution)Stepper Motor # of Steps per Revolution = 200 (steps/revolution)Micro Stepping Setting = 8XI am using.200 inch pitch lead screws, my stepper motors are 200 steps per revolution and my stepper motor controller is set to 8X micro stepping for the x & y axis. Calculating the “step/mm” ValueLets break it down one step at a time. Example calculations demonstrating how to find the step/mm valueAfter a few quick calculations you have the values you need. Update the GRBL settings by typing the following into the command line.$100 = 314.961This will set the X axis steps per mm.
Repeat the process for the Y and Z axis using $101 and $102 respectively.Note the Z axis setting is different because I am running a lower micro stepping count of 2x to get a little more power to lift the head of the mill. Final ThoughtsRemember, these are just initial values to get you int the ball park. We will need to use a dial indicator and tweak the values to get the most accurate motion. More on that in the future.Are you building a CNC mill? Are thinking about building one? Are you simply fascinated by CNC machines like me? Tell us what you want to make in the comments below.Thanks for reading.
Until next timeTim. Gary,I appreciate the comment.
Nothing worse than getting so close to finishing a project and one little setting is keeping it from working. I have never used CAMBam or Chilipeppr, however, I did not need to make any changes in my GRBL settings to run a gcode program. Have you tried running the sample circle code from the GRBL GitHub site?
Scroll all the way to the bottom of the page. Copy and paste the gcode into a text editor and save as a.nc file. Try opening this and running it with Chilipeppr. If it works, we know there is something that needs to be adjusted in CamBam. If my explanation of the.nc file creation was not clear, just send an e-mail to me and I will reply with the file attached.
Let me know how it goes. Udaykumar – I appreciate the feedback. You are right to want to set the microstepping first. Keep in mind, microstepping is a hardware setting and cannot be changed in GRBL. You will need to know your microstepping setting to enter your steps per mm value in GRBL.
You will also need to know the mechanical setup of your machine. Feel free to email the details to me and I can walk you through the calculations.To set the current, you use the trim pot on the board that holds the A4988 driver. I simply increased the current by adjusting the trim pot until my machine ran smoothly at the maximum speed and acceleration I wanted. Hi Tim,Thanks for this explanation.
It helps a lot. I have constructed CNC m/c with Arduino Grbl shield and DRV8552 controller.
Following are few details.1) I have used T8-2-D8 T8 screw 8mm, 2mm picth, 8mm lead trapezoidal screw.2) Stepper Motor is 1.8 Deg/Step or 200 Steps/revolution.3) No micro-stepping used. So micro-stepping = 1.When I rotate the lead screw by hand and make one complete revolution, I measured my axis is moving 8mm. That’s matching the “lead” information given point 1) above.My question is if 200 steps gives me 8mm, then 25 Steps would give me 1mm. But according to the calculation given in this site it will be200 steps/2mm pitch = 100 Steps/mm.So $100=? Please suggest me.
Z Depth Tutorial
Gururaj – Congrats on building your machine! You are correct, your $100 setting should be 25. Unfortunately, the terms lead and pitch are often used interchangeable. This is fine if you have a single start screw. However, that does not work when you have a multiple start screw.
As you correctly pointed out, we are interested in the lead. The amount of linear distance per revolution. I will update the post to clarify lead, pitch and starts. In your case you have a 4 start lead screw. Lead/Pitch = # of Starts.
Hi Tim,Thanks for reply and clarification provided.I found one issues in my setup. I was using grblv09aedge328p16mhz9600build20121210 and the configuration are completely different.
I reinstalled grbl 0.9j Atmega328p 16MHZ 115200 2.hex now I can see X,Y,Z max limits, enabling soft limits etcTim, if I set $100=25, its moving very slowly which does not look normal to me.But if I set $100=100 axis is moving quite rapidly.(I have not measured the distance its moving.) I am still wondering which is correct setting for x,y,z step/mm Now learning how to get homing, soft limit and limit switches working.Ya I agree with you. It will be great help if you could post few information about lead, pitch, # of starts and how that will effect steps/mm.I wanted to post pics of my machine and the lead screw, but did not find file upload option here. If its available please let me know.Regards,Gururaj. Hi Tim hope you can help me. I think I’m correct setting the $100=50, I’m using a200 steps per rev motors a 8mm per rev screw an half step. I’m using Inkscape to draw a square of 100 x100 mm.Run the machine I got a square of about 27 mm per sideIf I draw a square with the machine control in mm and run for instance 30mm in each axis the result is perfectI think is the Inkscape software but not sure,can’t find the solution to have what I draw and the result a the machine the same sizeAny ideasThanks Maurice. Maurice – I agree with you.
Your steps/mm settings sound correct. I also suspect Inkscape is the likely source of the problem. I am not an expert at Inkscape. Is there a post processor for Inkscape? Perhaps there is a scaling value you can adjust in the post processor.
Initially I thought we might have a mm to inches type conversion problem. Will you post or email a copy of the.nc file to me? I am curious to see what the values. You can open the.nc file that you used to draw the square in any text editor and paste it into a comment here or email me. Tim,I am surprised your not running UGS PLatform! Do you know much about and if so maybe guide us on first time setup and use?I had a huge problem getting my woodpecker cnc going. Commands in Arduino Ide wouldn’t work for the $ & $$.
I tried running UGS and it wouldn’t connect. I downloaded Hype Terminal and could connect to the machine and I also got a response back from the board. At that point I was just scratching my head as to what was going on and even posted on some forums.
Of coarse I got every suggestion under the sun. I finally made sure I had a java jre library installed and then tried Source RabbitGcode Sender and it worked and could move the machine around. I then downloaded and installed UGS Platform and low and behold it works and can move the machine around. I did read after all this GRBL has problems with especially CH430G usb to serial chips on the nano boards and the chinese boards nano and uno.So I hope this helps everyone out that may end up with the same problem.
I've had my Shapeoko 2 for a few weeks now working my way up to circuit boards. I use Eagle and the PCB G-Code ULP but ran into the typical problems with a unleveled bed. Half is etched through, and then it gets lighter and then misses the copper clad all together.First thing I did was use some plywood and made a 1mm deep 4'x6' pocket to tape down my copper clad using the thin double-sided tape. But out of paranoia I looked for autoleveling scripts using the v-bit as a probe from here:First problem I ran into was that when I tried to run it, it didn't move the steppers at all even though everything was plugged in and I was on the right COM port. So I decided to say screw it and hoped my pocket did a good job leveling it to my spindle.it didn't. I ended up with the same problem as to be expected; one side went through all the copper, then as it moved across the x-axis it got thinner and finally non-existent.Has anyone else used the probing script from the above link using GRBL?

Eagle Grbl Z Depth Map
Is there anything better that people have used using the stock motor controller? Aiden1015 wrote:I saw the manual, but it didn't seem to help. For example, on the first tab in the board section, I select generate milling and set the depth. But then I go over to the machine tab where it shows the actual end mill and explains what the different parameters are.
I just don't seem to understand what the difference between those two are and it doesn't seem clear in the PDFOn the first tab, milling refers to cutting out the PCB board's perimeter, not the cutting of the copper traces. So the depth is about the same same as the thickness of the PCB.
I like to go a little deeper, but you can go shallower if you don't want to cut into whatever kind of board you have under the PCB. Pcbgcode will generate gcode for the milling based on whatever you have on layer 46 in eagle. Note, when you mill the board outline, pcb-gode just goes down the centerline of the line on layer 46.
So if you have a 2' x 2' PCB and just have a thin outline line on layer 46 and a 1/8' end mill, your board will be 1-7/8 x 1/78. What I like to do is make my line width in Eagle the same width as my milling end mill and adjust the line position so the edge is where I want.If you have text on layer 46, then that gcode is put into a text gcode file. The depth for the text is also set on the first tab.Depth for cutting the copper traces (etching) is on the Machine tab in the Z-axis section called z-down.

Depth for drilling holes is right below that.I attached screen shots of my settings. I'm still playing with the etching feedrate, I think I can go higher.I use a Dewalt DW660 at 30k rpm with a isolation bit.
I also put WD-40 on my PCB. I plan to experiment with cutting dry.A good place to get answers for PCBGcode is this Yahoo GroupAttachmentsPCB-GCode setup Generation Options Tab Generation Tab.png (137.71 KiB) Viewed 9059 times PCB-GCode setup machine tab Machine Tab.png (136.49 KiB) Viewed 9059 times. I started using Chilipeppr and that works great. Thanks for the help.The g-code generation doesn't seem to be very good. It messed up a few of my traces and can't do arcs. Is there an overview on the ULP PCB-gcode generator for Eagle?I understand the machine tab, but the board section of the generation options seems redundant with the machine tab.I am trying too to use Chilipeppr Autoleveling with grbl, but while I can run gcode well in Chilipeppr, I cannot succed in autoleveling.When I run the probing, I got the S02 starting to probe without touching the pcb (it was over 5 mm higher than surface), doing two or three probes (reported on the screen as superwarped pcb) and then crashing with 'Probe Failed! Alarm state' error message.I think I did the wrong setting with arduino pins / probe /pcb wiring.
The failed test had ground pcb wired to ground arduino pin and the alligator clip on the bit (probe) on the A5 arduino pin. Is this the right setup?