Arduino CNC will not cut a circle

Hi. I’ve built a CNC router using an Arduino uno. My software is Carveco maker CAD/CAM and OpenBuilds controller. I’ve created a simple vector file of an 8” square with a 4” die. Circle in the square to check machine measurements. Transferred the tool path file to a thumb drive and uploaded the file into my laptop running Openbuilds witch is connected to the machine. The 8” square cuts fine but the 4” circle comes out as a 4” square turned 90* like a diamond. Know idea where my problem lies, firmware, software, hardware or operator (me). I’ve watch a YouTube video addressing a “pin configuration bug” between arduino board and CNC shield but it isn’t clear that, that is the cause of my problem so I’m reluctant to try. I’ve recently purchased a shielded USB cable but hasn’t arrived yet. Any help will be greatly appreciated.
Tim Atkins

Most of the time a CNC machine uses Gcode somewhere along the way of converting a graphics design into instructions for the CNC machine.

There are Gcode instructions for drawing a circle G2 and G3. However, not all CNC machines, especially the DIY type do not support these commands and require a seise of small steps of G1 code in order to draw a circle.

I suspect that the software that converts a circle from you CAD program is using G2 and G3 commands but your CNC machine can't handle these.

How to solve this, or even investigate it, is another matter.

You will need to look at your software chain closely, and maybe call upon an expert in the software you are using.

post the code (click </> icon)

Hi Mike. Thanks for your response. First, I’m a complete rookie. Caught the CNC bug in August, started my build in September. Bought a subscription to Carveco last week. My software chain is Carveco Maker for CAD/CAM and OpenBuilds Controller for gcode. My control board is an Arduino uno. Carveco Maker has OpenBuilds listed in the tool paths file selection. Should I try saving tool paths with different tool manufacturers listed in the Carveco drop down (there must be 50 or more choices) I’ve been unsuccessful getting UGS to connect to my machine. Should I try to find a different gcode sender? I’ll try contacting Carveco, no idea how good there customer service is. Thanks again. If you have any idea’s please let me know. It’s getting harder to justify the $800 investment to my wife.

First thing I suggest is post the g-code, so we can make sure that is really telling the machine to cut a circle.

Does your code understand G2 and G3 commands in g-code? Those are the ones that cut arcs and circle. G0 and G1 cut straight lines.

What sketch is the UNO running?

1 Like

I also wonder why the OP is not using fully-developed CNC controller firmware, like grbl, rather than a DIY minimal implementation. grbl is very capable and relatively get running on almost any Arduino platform. Pre-built binaries exist for many Arduino board, especially the Mega2560. Many, many, many 3D printers and routers use grbl.

Not much point if the Gcode it is sending can't be understood by the unit that turns the Gcode into stepping motor X Y positions of the router head.

It is that last step that you should be looking at in the code that is in the Arduino. Just look at the code and you will see what it implements, it should be quite obvious if you can read code.

If you can't then post the code or link to it so we can all look at it.

You might want a read about my CNC conversion. I talk about both the sender and the code in the what in effect is a Uno.

http://www.thebox.myzen.co.uk/Hardware/CNC_Conversion.html

Thank you so much for taking the time to help. I'm completely lost. This is the gcode that Carveco Maker generated for a 6" circle. If pictures of anything would help please ask.

AG17
G20
G90
G0Z0.2000
G0X0.0000Y0.0000
M3 S15000
G0X-3.1250Y0.0000Z0.2000
G1Z0.0000F30.0
G1X-3.0828Y0.5028F200.0
X-2.9514Y1.0183
X-2.7238Y1.5229
X-2.4020Y1.9901
X-1.9973Y2.3945
X-1.5298Y2.7160
X-1.0250Y2.9431
X-0.5094Y3.0742
X-0.0066Y3.1159
X0.4964Y3.0762
X1.0126Y2.9472
X1.5183Y2.7221
X1.9871Y2.4025
X2.3934Y1.9998
X2.7171Y1.5339
X2.9467Y1.0301
X3.0802Y0.5151
X3.1244Y0.0125
X3.0835Y-0.4911
X2.9530Y-1.0078
X2.7261Y-1.5138
X2.4045Y-1.9825
X1.9996Y-2.3882
X1.5315Y-2.7108
X1.0259Y-2.9387
X0.5095Y-3.0701
X0.0059Y-3.1120
X-0.4978Y-3.0722
X-1.0148Y-2.9428
X-1.5212Y-2.7169
X-1.9906Y-2.3962
X-2.3971Y-1.9921
X-2.7206Y-1.5248
G2X-3.1250Y0.0000I2.7203J1.5374
G2X-0.0066Y3.1159I3.1247J-0.0088
G2X3.1244Y0.0125I0.0063J-3.1247
G2X0.0059Y-3.1120I-3.1247J0.0001
G2X-3.1250Y0.0000I-0.0063J3.1247
G0Z0.2000
G0X0.0000
M5
G0Z0.2000
G0X0.0000Y0.0000
M2

gcode posted below

Hi Ray
I installed grbl on the Arduino uno as soon as I received the board. Followed a YouTube video. It seemed to install ok.

This is the bit where the G2 commands are.

Now see if the Arduino does something with them, or are they just ignored?

Someone else had this exact problem back in 2015:

It turned out that they had accidentally set grbl's "Arc tolerance" (parameter $12) to zero.

1 Like

Any use of "G2 Ix" coo-ordinates under GRBL will be ignored as an INVALID command.
Some programs can either just ignore or STOP at the usage and that is usually set in the senders preferences.

That is an absolute rule under GRBL.
2023-01-03 at 10-05-59

For Mike and bob. I am a complete novice when it comes to coding. Sorry. Please explain how I can check your suggestions. Would installing a new control board be the easy fix and if so could you suggest one?

A new control board can be useful but in this case I don't think it is required.
Only got into GRBL in the last 4 years so g-code as a whole is also quite new to me in most respects.
I struggled a little to start until I had a EUREKA moment and realised that I did not have to spend anything on software to accomplish what I needed and more.

My GOTO is LASERDRBL which can import a large variety of pictures and more and send them directly to my little CNC's No g-coding on my part whatsoever.
UGS is also fantastic but expects things to be correct in the code.

Personally I would not have spent any money either way as a noob to the topic on software until
I had first got to grips with it a little.
CNC and its foibles sounds all too easy to many people.
Unfortunately when it comes to Arduino there are some limitations.

Also remember that a very large majority of CNC users work on a METRIC system.
If you want to change your program to metric and generate the same thing but no bigger than 125 mm in size I can run it here on a small test rig I have free to play with.

It will tell me where any errors are and we can take it from there.

Your CNC machine should not care one bit whether the g-code is metric or imperial. That is defined in the G-code, with the G20 and G21 commands. The machine should be perfectly happy with either, unles you're using a really bastardized g-code interpreter.

That is mostly true.
However I work in metric and have size limitations.
Hence my suggestion.
So long as the units themselves imperial/metric are included in the g-code the machine will react accordingly.
I find it much easier to read the metric g-codes.

Here is the gcode after I up loaded it into OpenBuilds controller. There are a lot of command’s in red. Agin, sorry I have no idea how the fix this.





Every single one of those is a valid command. G0 is a rapid move. G1 is a feed move. G2 and G3 are arc moves. Without those, the g-code will do nothing of value.