(this post is automatically translated from the original Italian version for your convenience. Sorry in advance for errors)

A CNC milling machine (CNC)

I've always been fascinated by the technologies that use electronics and computers to monitor or control mechanical devices.

The CNC milling machine is the object that best represents this idea: knowing how to use properly and successfully involves good knowledge of all these technologies.

The router "classical" is operated manually: the axes that move the spindle (which is mounted on the cutter that rotates at a speed appropriate) than the piece are coupled to the manually operated knobs.

CNC axes in hand work are coupled to a motor controlled by a computer, usually it is a stepper motor.

The stepper motor is basically driven by a suitable controller which exhibits two signals, step and dir.
A transition to the first indicates that the engine must take a step in the direction specified by saying which can be clockwise or counterclockwise.
The magnitude of the step is measured in degrees, 1.8 degrees / step means that the signal 200 transitions will step so that the axis of the engine makes a complete revolution.

Some controllers including the one I used also allow half step, I'm not here to explain what is the technique used to obtain the half step (if you want depth, look for "stepper motor tutorial" on google), however with the medium step will double the number of steps to make a turn and the motor therefore will move with more fluidity.

The computer takes the place of the operator's hands, planning appropriately moving the axles may carry many high-precision machining, virtually impossible to do manually.
Making mechanical pieces, cut from a sheet of balsa a rib of a 'wing of an aircraft, affecting writing on wood, everything is a program that performs CNC milling machine.


Rejected the idea of buying a ready-made CNC milling, high cost for the first, second, because the fun for me is building something to learn, I opted to buy a traditional mill to be transformed later into cnc.
I took a Proxxon MF70, German-made.

Then I designed the control electronics and mechanical parts to match the stepper motor axes milling machine.
The end result is this:
Proxxon transformed
As for the mechanical part, I simply paired with original knobs stepper motors, using the bushes.
I made integral with the engine of aluminum plates.
Here is a picture showing the engine coupled to the axis X.
Particular coupling axis - stepping motor
... Y-axis
Y axis
Z axis ...
Z axis
Not a perfect job .. I have promised myself to do it with the CNC!
To move the axes I have used these stepper motors to control them I used the IC L6208 from STMicroelectronics (DMOS driver for bipolar stepper motor), designed precisely to do this job. And it does it well!
The schematic used is simply suggested in datasheet, here however the sketch from which I started ...
schematic sketch of the driver
... And the end result is mounted on a plastic spacers: the chip is under the aluminum heatsink that I added to make them better dissipate the heat produced during operation.
L6208 Controller mounted on spacers .
Here's a video I made during the test card

So I installed three of these cards, one per axle.

Since I wanted to have the ability to control the axes in hand, I designed a circuitino able to drive yourself, as an alternative to the computer, the three axes of the cutter.
Here's the schematic ...
A channel controller and power supply
The power supply provides 30 volts for heavy motor drivers, the first voltage is then reduced to about 8 volts from a DC / DC step-down based on 78S40 , then again from 8 to 5 volts with the classic 7805 .
The power supply in common: the bottom is for a channel.
... The finished result on spacers
Stepper drive controller card and PC interface with opto-couplers .
Tab you can see the interface to the parallel port with optocouplers (white ones on top).
For each channel there are two switches, one is used to enable the driver, the other to determine if the engine is controlled by a PC via the parallel interface or manually by two buttons: one it will turn clockwise, the other in counterclockwise.
The potentiometer adjusts the speed in manual mode.

Some photos of the object under construction:
Cards with L6208
Inside the front panel without

... And finished object:
Power supply and adapters in the box
Front Panel
Wiring the front panel

Proxxon on a tour of the screws command moves set the table where the workpiece of 1mm.
With 400 steps available then has a resolution of 1 / 400 mm or 0.0025 mm (2.5 microns).
In practice it is possible to drive the cutter on the workpiece in steps of 2.5 microns on three axes.
You can 'feel!

With regard to the pilot via a PC, usually this kind of hobby milling say (but this may also apply to professional milling) are controlled through the parallel port.

The output pin parallel port signals are connected to step motors and controllers say that act on different axes, even if you can directly connect the pins to the inputs of the controller is a good idea to do this using the optocouplers to electrically separate the machine from PC.

The legs of the parallel input may instead be connected to the microswitch.
Typical use is to connect the micro to run the axes: the program control will stop the movement of the cutter if it detects the condition of limit: if, as in my case, not mounted, it is good to control the machine during The processing phase of the piece so that, going all the way, it can be damaged.

There are several programs for controlling hobby cnc milling on Windows / DOS, Linux and EMC2 program par excellence.
EMC2 has a modular architecture, the functions that control the hardware using a modified kernel with realtime capabilities, this ensures the perfect execution of the program gcode.
EMC2 is undoubtedly the best choice for such applications.

Speaking of "gcode" to program the tool movement and generally to control this type of machines used precisely this language in practice is a file that contains commands that are given to the cutter, with the possibility of defining "subroutine" a bit 'like the old Basic.

Through Gcode we say the machine tool to follow the path that includes lines and arcs.
It 's like a pen drive which is said to make a path with a certain speed, but instead there is the pen mill running at 20,000 rpm and "trite" whatever it finds in its path.
Should be paid close attention, the program should be done keeping in mind the material and the cutter used.
Speed and size of the groove depends on the type of tool and material: you should not make the drill work outside of specifications.
Force may mean breaking the cutter, the milling damage, break the workpiece.
Decrease the speed or make more passes!

To give an idea of what I did get the video: here's one

The writing was developed using EMC2, gcode file was created with Inkscape installing a patched version of this plugin.
The files are patched gcode.py and gcode.inx , the problem that the original is that it produces the command to lift the cutter on the individual characters of a text (as it would print without ever lifting the pen), plus (dated 6/12/2008), I made sure that the plugin works with the metric system, and that take into account the transformation matrix associated with a path, so now work scaling and translation operations which take place Mount with inkscape).

As for EMC2, configure it to work with my hardware was really easy: just use the script "stepconf", specifying the relationship between the pins of parallel port signals and step / dir engines on different axes, set the speed and maximum acceleration .. et voila!

I owe thanks to all who have shared their experiences on the net.

Here are some useful links:

Ah, the disclaimer :-D
The implementation of a numerically controlled milling machine, though small, requires a deep knowledge of mechanics and electronics is not a walk.
Written is the result of 'personal experience of the author on the subject:
if the author does not assume any liability.

Similar Items