Jan 22, 2011 - Also, I am after some simple G-code examples for testing purposes. What I know about Smoothstepper it communicates directly with Mach3. Jan 26, 2011 I have basic g-code import, translation and display working ok, and thought you might like to see the results. First photo is a 'sphere in cube' example I found on the forum, second is your g-code Ger21, it looks like a sculpted 1/4 round object (part of a plaque?).
Congratulations, you machine is under its own power. By now you have spent some time jogging the machine around using the keyboard or the buttons on Universal G-Code Sender. This is all well and good, but the real power of your CNC machine lies in its ability to run long complex gcode programs. The following is a step by step guide on how to run a CNC program. We even include a gcode example program to run that will draw a circle. If you don’t have your machine running just yet and would like some guidance, check out How to setup your Arduino CNC Machine.
The following is exactly what is saved in the circle.nc file. Click the link below to download the file.
G17 G20 G90 G94 G54
G0 Z0.25
X-0.5 Y0.
Z0.1
G01 Z0. F5.
G02 X0. Y0.5 I0.5 J0. F2.5
X0.5 Y0. I0. J-0.5
X0. Y-0.5 I-0.5 J0.
X-0.5 Y0. I0. J0.5
G01 Z0.1 F5.
G00 X0. Y0. Z0.25
This simple program will draw a 1” diameter circle about the origin. Use this program to test your CNC machine and confirm your axis directions are set correctly.
Note all gcode programs a simple text files save with a “.nc” extension. You can open the “circle.nc” file downloaded above in a text editor like Notepad. You can also copy and past the above lines into a text editor and create your very own CNC program. Simply save the file with a .nc extension.
Use the following steps to run the program… If you are more of a visual learner, scroll down and click on the video below for walk through of the process.
1. Load a marker into the spindle (Keep the spindle off!) Markers work better than pens or pencils because the tip is softer and more forgiving. Also setup a piece of paper or other material on which to draw near the center of your machine’s work envelop.
2. Power on your machine
3. Connect to the machine with Universal gCode Sender
4. Jog (move) the spindle to the center of your machine table
a. Under the “Machine Control” Tab enter “.1” into the “Step Size” box & press enter
b. Ensure “inches” is selected
c. Use the X+,X-,Y+ and Y- buttons to move the machine close to the center of your work table (You can also use the arrow keys on the keyboard)
d. Press the “Reset X Axis” button (This tells the machine to remember this position as your X zero location)
e. Press the “Reset Y Axis” button (This tells the machine to remember this position as your Y zero location)
f. Now slowly use the “Z-“ button to lower the marker tip. When the marker tip gets close to the paper, stop.
g. Adjust the “Step Size” to .01 (Remember to hit enter after you enter your value)
h. Continue lowering the marker until it touches the paper by tapping the “Z-“ button.
i. Press the “Reset Z Axis” button (This tells the machine to remember this position as your Z zero location)
j. Retract the marker from the paper using the “Z+” button. Go at least .1” above the paper. This is equal to 10 clicks of the “Z+” button when your step size is set to .01
5. Ok, now the machine is almost ready.
6. Go to the “File Mode” tab
7. Select “Browse” and search for the “circle.nc” file (If you have not downloaded the file click here)
8. Click “Open”
9. The next button press will send the “circle.nc” g Code program to your machine and it will start to move. As soon as I hit “Send” I like to move my mouse cursor over the “Pause” button. If anything goes wrong, all I have to do is click the mouse to stop the program since it’s over the pause button.
10. This is for all the marbles. Click the “Send” button.
11. The machine will start moving.
a. First, it will move the Z axis to .25”
b. Next, the machine will move to X = -0.5 and Y = 0.0 (Note the marker should not be touching the paper yet)
c. Now the machine will lower to Z = 0.0 and then marker should touch the paper)
d. The machine will slowly draw a clockwise circle.
e. When the circle is complete, the machine will move the Z axis up to .1”
f. Now that machine will return to the X & Y zero position.
g. Finally the z axis will move back up to the original .25” starting position.
That’s it! You just ran your first CNC program. As you run more programs, this process will become second nature. Again you can download the g code example by clinking the link below.
If you run into any problems, contact me at [email protected] or in the comment section.
What CNC program are you going to run next? Leave a comment and let me know.
Thanks for reading. Until next time…
Tim
Now that your machine is running, check out the following options for tooling. Note, these are affiliate links and DIY Machining earns a commission if you purchase using the links below. However, there is no additional cost to you.
Enter your name & email address below to join our mailing list & receive the latest updates and information from us.
This page has an assortment of free G-code, CamBam, dxf, and stl files that are meant for hobby CNC machine use. Some of these files appear elsewhere on this site and have also been placed here to help keep everything organized.
I will try and update this page periodically as I gather together more files, so check back from time to time for more.
Also, check out Links to other Sites with Free Files Useful for CNC for more.
I cannot completely guarantee that the files on this page will function correctly. It is always possible that I accidentally uploaded a previous version of a file that didn’t have all the kinks worked out yet. Use them at your own discretion and remember that I will not take responsibility for any damage to one’s self, to others, or to one’s property. To put it simply, you can’t sue me if something goes wrong. : )
Because of the wide range of different CNC machines, it is hard to create G-code that will fit all of them. This is probably the reason why it is so hard to find it on the web. To fill the gap, here are some simple G-code files so that the CNC newbie might have something to try out his or her machine with.
These files were all tested to make sure they worked correctly, but I can’t guarantee that I didn’t leave something out accidentally. I don’t know the limits of your machine, so be careful and practice cutting air first.
Use a router bit with a fairly small diameter for these files. (1/8″ or smaller for example.) These G-code files are set up so that the router bit will just barely graze the surface of what’s being cut. If your machine isn’t quite level, the depth of the cut may need to be adjusted to compensate. This cannot be done with the G-code files (at least not easily), but it can be done with the CamBam files below.
Click the image to download the G-code file.
CamBam files have the advantage that you can edit them before generating the G-code so that it will work better with your particular machine. Make sure you double check the settings I used because what might work perfectly fine on my CNC machine could cause problems on yours.
In case you didn’t know, CamBam is free if you only want to do 2.5D. It can be found here.
Note: When you open some of these files in CamBam you may have to click and drag over the screen to make the image visible. I’m not sure why this is and would fix it if I knew how.
Click the image to download the CamBam file.
Faces
Use a router bit with a fairly small diameter for these faces. (1/8″ for example.)
Gears
Here is an assortment of gears. The tutorial for making them can be found on the page . They should be all set for turning into G-code, but double check the settings of the 2.5D profiles to make sure they won’t cause problems for your machine.
I personally haven’t had the chance to cut some of these gears out, so be careful and practice cutting air first.
I already put a hole in the center of each of the gears, but if you want to delete it and put one of a different size, you can do it with CAMBAM.
The gears below are meant to be cut with a 1/8″ router bit from MDF 3/4″ thick. The gear on the left has a pitch radius of 1.5″ the gear in the middle has a pitch radius of 3″, and the gear on the right has a pitch radius of 6″. Please note that the pitch radius is actually smaller than the total radius of the gear, so the gears might end up bigger than you expected them to be. These three gears should all mesh with one another if need be.
Tutorial Gear
This is the gear made in the tutorial .
Miscellaneous gear
This is a spare gear file that I had laying around on my computer. It is set up to be cut out with a 1/4″ diameter router bit, but that can be changed in CamBam of course. The gear is about 8″ in diameter.
Worm Gear
Here is a worm gear that can be cut out with a CNC. The full page explaining exactly how to put it together is at this link How to Make a Single Turn Worm Gear with a CNC.
Gimbal
Here is a gimbal design that can be cut out with a CNC. The full page explaining how it is put together is at this link Gimbal Made with CNC
CNC Vacuum Attachment
Here is design that can be used for attaching a vacuum hose to your CNC machine. The link that shows you how to put it together is DIY Vacuum Attachment for CNC
Click the image to download the dxf file.
I am a “Genious”
Just to avoid any embarrassment on your part, that isn’t how you actually spell “genious.” Although, it probably would have been a lot funnier if I hadn’t told you that.
Note: Click the image to download the stl file.
Parabola
Here is a stl file of a parabola. More info on it and details for designing your own can be found on the page.
(Right Click, Save As)