How does CNC control work

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,362
Hi guys!

I am interested in 2 parts of the CNC control.

1. After I generate the gerber files from KiCad, how do I transfer them to motors in order to create an image. There are 2 or 3 motors depending on the machine, how are they translated to a decart coordinate system? How is it known which motor gets what? It should be simple coordinates to drill.

2. The mechanical part with the tubes is ambiguous, you can not connect metal to metal, there must be something in between? Where to buy the tubes and this in between from?
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
In the case of printed circuits, you need a Gerber file and a drill file at minimum.
Kicad does this for you.
The CNC controller must be capable of reading these files which essentially give the machining and drilling positions.
Not sure what is meant by 'mechanical part with the tubes' however?
Max.
 

KeithWalker

Joined Jul 10, 2017
3,093
From your many vague questions, it appears that you need to do a lot of learning about CNC in general. Is this homework? Is it about a particular installation? What kind of CNC machines are you referring to? What are the tubes you mention. There are so many un-knowns that I could not even start to answer any of your questions.
Regards,
Keith
 

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,362
From your many vague questions, it appears that you need to do a lot of learning about CNC in general. Is this homework? Is it about a particular installation? What kind of CNC machines are you referring to? What are the tubes you mention. There are so many un-knowns that I could not even start to answer any of your questions.
Regards,
Keith
Its not homework, the tubes are what moves the drill. The drill needs to move left, right, up, down, back and forth. This is done by the stepper motor, but how exactly is it translated to each stepper motor.

In the video its shown that the drill is on a tube and the motor moves the tube, at 1 min and 45 sec time.
 

BobTPH

Joined Jun 5, 2013
8,967
Tubes? Never heard of tubes on a CNC machine.

A CNC machine likely as 4 motors: X-axis, Y-axis, Z-axis and spindle.

They are controlled by commands like this:

M3 S1000 / spindle motor on at 1000 RPM
G0 Z-2 / lower spindle by 2mm
G1 X10 Y10 F100 / move to (10,10) at 100 mm per minute

Bob
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
I assume you mean the ballscrew's when you refer to the tubes?
Machines that are dedicated to PCT board creation are designed to read the Gerber/drill files, which do resemble normal CNC language, but with some differences.
A normal CNC machine uses programs called CAD & CAM the CAD file creates the part DWG and the CAM program produces the tool paths for maching, a post processor then translates the CAM program to the format for your particular machine.
In the case of Gerber/Drill a dedicated machine is designed for this purpose.
The standard CNC language is ISO 6983.
Max.
 

AlbertHall

Joined Jun 4, 2014
12,346
I make PCBs, and quite a few other things on a CNC machine.
I use Eagle to draw the schematic and to layout the PCB.
Then pcb-gcode reads the Eagle board file and generates the G-code to isolate the tracks, etch any text, and mill any needed slots and the board outline.
Finally, I use LinxCNC to actually control the machine.
The machine is a cheap Chinese job which does a pretty good job.

The machine is the only bit which which cost money. The mentioned software is free.

pcb-gcode is the part which outlines the tracks to isolate them from the rest of the copper on the PCB. I don't use kicad so I don't know whether it is capable of this for you.
 

KeithWalker

Joined Jul 10, 2017
3,093
In the video its shown that the drill is on a tube and the motor moves the tube, at 1 min and 45 sec time.
Those are not tubes you see in the video. They are solid steel guides. The drill head and platform are moved by motors that rotate feed screws. You can see this in the video showing the drill head. There is a feed screw between the two steel cylindrical guides which rotates to raise and lower the head.
Keith
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
Just watched the video and now see what the OP was talking about.
@ArakelTheDragon if you want info or help on DIY CNC machine, there is the CNCzone forum which has a large following and examples of these types of machines.
Max..
 

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,362
Just watched the video and now see what the OP was talking about.
@ArakelTheDragon if you want info or help on DIY CNC machine, there is the CNCzone forum which has a large following and examples of these types of machines.
Max..
@MaxHeadRoom I tried that, but their posts have broken links and this forum seems like it will soon be gone.

@AlbertHall 200 dollars is the cheapest price I found.

I am trying to build the machine by myself, I am using a PIC MCU and I want to do it with as less materials as possible. I need to understand how this translation works in order to write the code for the post processor which will convert the gerber and drill files. I am planning on using 3 motors, 1 for the down plate of the PCB, 1 for the up and down of the drill and 1 for the left and right of the drill.

EDIT:
Like in this
video, but instead of a laser, I will use a drill so I will need 2 extra motors.
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
@MaxHeadRoom I tried that, but their posts have broken links and this forum seems like it will soon be gone.
You have to be kidding! It is one of the largest forums out there with its sister site, Industry Arena, it has over 500,000 members.

The video in #11 shows some kind of toy version,
You not only need the mechanics, but CNC software to run the machine with a suitable HMI.
For the price of board with all their features such as through hole plating etc, I would not have thought it worth the effort.
If you still are determined to build, I would look at one of the kit sources, or a small ready made.
Max.
 

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,362
I may have hit the old section of the forum, but I did really try 4-5 options and they were all with broken links.

Yes I am determined to build, its better than giving 200 USD and more. Thanks for the help to everyone.
 

BobTPH

Joined Jun 5, 2013
8,967
If you can get precision and repeatability of about 0.1 mm, good for you. I recently bought a Cheap Chinese CNC engraver. It typically crashes the USB driver of the host computer as soon as it starts milling, have bought a new (different) controller board which I am about to install. Wish me luck.

Bob
 

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,362
The motors will be with 8 steps, 45 degrees each. The circuit is ready.

I intend to use these motors, unfortunately they are very expensive and I am beginning to think the whole project will cost the same as bying it.
 

RobNevada

Joined Jul 29, 2019
66
You go from your STL file to a program that converts it to G code and then to a board that controls the stepper motors or a servo with encoder. You can review G code by searching for it. There is any number of programs that achieve this translation. GRBL, Mach 4, TinyG, just to name a few.
 
Top