Is there any ways to make a CNC controller board with simple AVR or PIC micros? - Page 1
Forum section: electronics / projects

author: Refrigerator
author_rank: Super Contributor
timestamp: February 24, 2014, 07:12:47 pm
content: I really want to make a cnc but i couldn't find any info on how to make the controller board, only lots upon lots of stepper driver boards....I've seen people also use serial connector in their PC to work in cnc application.Which would be better ?Do you know of any ways to make the controller board ? ( NOT the driver board )Thanks in advance.

author: mazurov
author_rank: Frequent Contributor
timestamp: February 24, 2014, 08:04:13 pm
content: There is an Arduino code called grbl which can drive steppers with gcode. There are also many derivatives, take a look at RAMPS. All this will run on AVR. PIC is less popular.

author: pickle9000
author_rank: Super Contributor
timestamp: February 24, 2014, 08:40:00 pm
content: There are many ways to do this but if you have an old computer with a printer port get a rig like this. It's great to learn on and the price is fair.http://www.ebay.ca/sch/i.html?_odkw=cnc+kit+3+axis&LH_FS=1&LH_BIN=1&_osacat=0&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xcnc+kit+3+axis+&_nkw=cnc+kit+3+axis+TB6560&_sacat=0&_from=R40

author: Erwin Ried
author_rank: Regular Contributor
timestamp: February 24, 2014, 09:56:17 pm
content: Sure you can, in fact most of the early cnc and 3d printers used arduinoI was trying to do one with old dvd drives:but is still not complete.

author: poorchava
author_rank: Super Contributor
timestamp: February 25, 2014, 08:02:29 am
content: There is a popular project called GRBL. It's targeted at certain popular board containing an ATMega328.For higher end you'll want something with more power, eg. STM32F4...

author: Psi
author_rank: Super Contributor
timestamp: February 25, 2014, 09:05:16 am
content: Quote from: Erwin Ried on February 24, 2014, 09:56:17 pmAre you sure the dvd drive motor&gearing is strong enough for that sort of thing?

author: peter-h
author_rank: Super Contributor
timestamp: February 25, 2014, 10:24:15 am
content: How will you get your position feedback?I have a Wabeco turret mill with a Newall DRO but no servos and thus no CNC. I can build the servos and have made one already, and my plan was to knock up some laptop software which can take in the RS232 x,y position data stream from the DRO and (via some USB D-A converter add-on) drive the servos, with just enough functionality to enable me to mill circles (in sheet metal, a real pig to do otherwise e.g. with a fly-cutter).Looking into this briefly, I have found that all the commercial CNC products use TTL signals from the position encoders which give an "instant" feedback. They don't use the RS232 data (or any other serialised data containing textual floating point values) because, fairly obviously, there is too much of a lag.I thought I can still make it work, however, simply by milling very slowly, but that causes another problem: you can't mill "slowly" because a very low feed rate just welds metal to the cutter. Probably OK in brass but definitely not ok in aluminium.I haven't done any more on this (have enough projects already!) but one solution would be to interpolate/extrapolate the values from the DRO and try to be a bit more intelligent about it, and possibly mill in small steps where each step is done with a decent feed rate. For what I want it for (milling holes in aircraft instrument panels, mainly) having a circle milled as say 0.25mm steps would be fine.The "proper" solution is a DRO with a high speed TTL output... Also you need to do something about backlash, for which the correct solution in the CNC world is ball guides, but they add a few k to the cost of the mill. I have ball guides on all 3 axes so that bit should be OK.

author: Kremmen
author_rank: Super Contributor
timestamp: February 25, 2014, 01:19:32 pm
content: A small simple mill is usually driven by steppers with no feedback at all. So one steps the motos and hopes the holding torque is enough to prevent slipping. There are allegedly solutions for encoder feedback with steppers but i have never seenm one and the reports are ambiguous as to the benefits.Small servos, especially legacy ones do use ABZ quadrature encoding, usually single-ended 5V logic. Modern hi-speed hi-power servos use serial encoder connections exclusively. The data rates can be vvery high, into the MHz range and signaling is usually differential RS485 os similar (sometimes the encoders are connected to a bus passing more than 1 encoder to a central multijoint controller).The motors in this image are from left to right: a Fujitsu-Fanuc Hi-Pulse 5 phase hi power stepper of vintage 1973; Yaskawa SGMGH-20DE 2 kW/400VAC servo with integrated serial encoder of 131072 p/rev resolution; Sanyo Denki P80 2.5 kW/230VAC servo with similar encoder. The middle one is replacing the left one as one of the joint motors for the mill in my hobby den that you can see in the background.

author: Kremmen
author_rank: Super Contributor
timestamp: February 25, 2014, 01:58:33 pm
content: Quote from: Refrigerator on February 24, 2014, 07:12:47 pmPlease clarify "ways to make the controller board". I assume you don't mean how to fabricate the PCB?How much system design have you done on this project so far? Or let's first ask: how much system design work have you done ever? Designing a complete cnc controller is a non-trivial exercise. Based on your questions it looks like you don't have experience in cnc systems and i can only suggest that you should try to put some ready made systems into operation before you even think of building your own from scratch.As noted there are implementations made for Arduino but those are not true cnc systems, rather they are simple step generators for steppers. I haven't reviewed them all, of course. But the ones i have, are not true servo systems i.e. they lack feedback.Anyway, to create a cnc system you need at least the following:- an input file parser to read some control presentation, usually G-code,- a trajectory planner to create motion primitives for coordinated motion,- a transformation engine from coordinate space to joint space. At least if the machine kinematics are non-trivial or if you wish to correct for joint misalignment- motion command generation for individual joints- lots of housekeeping code to manage user interface, machine status etc etc.Wouldn't it be simpler to start by getting all of that in a working package such as LinuxCNChttp://www.linuxcnc.org/? Once you have mastered the use of that, you are in a better position to evaluate the sense in attemptin your own, and especially in estimating how big a job you would be taking on.

author: Frost
author_rank: Regular Contributor
timestamp: February 25, 2014, 02:17:39 pm
content: Quote from: Kremmen on February 25, 2014, 01:19:32 pmThey work extremely well, absolutely no step losseseven at higher speeds and changing loads.I use the Closed Loop Stepper motors from Orientalmotoron my CNC milling machine.http://www.orientalmotor.com/products/stepper-motors/closed-loop-stepper-motor-overview.html

author: Kremmen
author_rank: Super Contributor
timestamp: February 25, 2014, 05:59:31 pm
content: Hmm, interestin, so it is true. While Oriental Motor is a familiar brand (there are Orientals in the mill in my prev pictures) i didn't know they have this kind of solution.Still, it is a special solution as the encoder is built in the motor. Nothing wrong in it, but the question is what do you win compared to a small servo?

author: FreddyVictor
author_rank: Regular Contributor
timestamp: February 25, 2014, 10:39:01 pm
content: @OPhere'san interesting project someone did (arduino shiled) - uses std stepper driver modules from Pololu & othersthe design is fairly simple and straightforward enuf to 'roll your own'

author: Erwin Ried
author_rank: Regular Contributor
timestamp: February 26, 2014, 04:50:21 am
content: Quote from: Psi on February 25, 2014, 09:05:16 amWell it is not a cnc, it is just a crappy small laser engraver (4x4 cms?), I tested the steppers and they work well, but the laser part is not complete.

author: mathsquid
author_rank: Frequent Contributor
timestamp: February 26, 2014, 11:46:37 pm
content: I built a control board for a small CNC machine. You can see it on my blog athttp://mathsquid.wordpress.com/.If you're interested in it I could show you some rough circuit diagrams or share the code.

author: kc9qvl
author_rank: Regular Contributor
timestamp: February 27, 2014, 03:45:07 am
content: Here closed loop stepper kits. Although most diy cnc mill setups don't use feed back from closed loops.http://www.automationtechnologiesinc.com/products-page/nema34-closed-loop-stepper-motor-system-hybrid-servo-kitFor a micro controller already the mentioned arduino also A beaglebone black Running the linuxcnc oshttp://blog.machinekit.io/p/machinekit_16.htmlMach 3 (windows) and linux cnc (linux obviously) can both take dro output for positioning. Unknown is the directly support your dro.From the mach 3 manualQuote