Author Topic: Is there any ways to make a CNC controller board with simple AVR or PIC micros?  (Read 8317 times)

0 Members and 1 Guest are viewing this topic.

Offline Refrigerator

  • Frequent Contributor
  • **
  • Posts: 834
  • Country: lt
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.
Just started a blog at http://brimmingideas.blogspot.com/ . Not much in it as of now but more is sure to come :)
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 448
  • Country: us
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.
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2132
  • Country: ca
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

 

Offline Erwin Ried

  • Regular Contributor
  • *
  • Posts: 175
  • Country: no
Sure you can, in fact most of the early cnc and 3d printers used arduino :D I was trying to do one with old dvd drives: but is still not complete.
My website: http://ried.cl
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1540
  • Country: pl
  • Troll Cave Electronics!
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...
I love the smell of FR4 in the morning!
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7345
  • Country: nz
Sure you can, in fact most of the early cnc and 3d printers used arduino :D I was trying to do one with old dvd drives: but is still not complete.
Are you sure the dvd drive motor&gearing is strong enough for that sort of thing?
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline peter-h

  • Regular Contributor
  • *
  • Posts: 167
  • Country: gb
  • Doing electronics since the 1960s...
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.
« Last Edit: February 25, 2014, 10:25:59 am by peter-h »
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
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.
« Last Edit: February 25, 2014, 01:21:52 pm by Kremmen »
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
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.
Please 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 LinuxCNC http://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.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Frost

  • Regular Contributor
  • *
  • Posts: 170
  • Country: de
There are allegedly solutions for encoder feedback with steppers
but i have never seenm one and the reports are ambiguous as to the benefits.
They work extremely well, absolutely no step losses
even at higher speeds and changing loads.
I use the Closed Loop Stepper motors from Orientalmotor
on my CNC milling machine.
http://www.orientalmotor.com/products/stepper-motors/closed-loop-stepper-motor-overview.html
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
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?
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline FreddyVictor

  • Regular Contributor
  • *
  • Posts: 164
  • Country: gb
@OP

here's an interesting project someone did (arduino shiled) - uses std stepper driver modules from Pololu & others

the design is fairly simple and straightforward enuf to 'roll your own'

 

Offline Erwin Ried

  • Regular Contributor
  • *
  • Posts: 175
  • Country: no
Sure you can, in fact most of the early cnc and 3d printers used arduino :D I was trying to do one with old dvd drives: but is still not complete.
Are you sure the dvd drive motor&gearing is strong enough for that sort of thing?

Well 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.
My website: http://ried.cl
 

Offline mathsquid

  • Regular Contributor
  • *
  • Posts: 182
  • Country: us
  • I like math.
    • mathsquid blog
I built a control board for a small CNC machine.  You can see it on my blog at http://mathsquid.wordpress.com/.  If you're interested in it I could show you some rough circuit diagrams or share the code.

Offline kc9qvl

  • Regular Contributor
  • *
  • Posts: 146
  • Country: us
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-kit

For a micro controller already the mentioned arduino also A beaglebone black Running the linuxcnc os
http://blog.machinekit.io/p/machinekit_16.html

Mach 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 manual

Quote
4.10 Linear (Glass Scale) Encoders
Mach3 has four pairs of inputs to each of which an encoder with quadrature outputs can be connected.
Typically these might be “glass scale” encoders. Figure 4-15 shows an example. Mach3 will display
the position of each of these encoders on a dedicated DRO, shown in Figure 4-17. These values can be
loaded from and saved to the main axis DROs.
« Last Edit: February 27, 2014, 04:01:11 am by kc9qvl »
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
The larger the government, the smaller the citizen.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf