Sunteți pe pagina 1din 15

A cheap & easy to build CNC Machine for drilling PCBs

After etching my first Printed Circuit Board (PCB), it immediately became clear that drilling the
holes was going to be a problem. Not only are there a lot of holes in most PCBs, but the drill
bits are so small that any horizontal movement results in the bit breaking. Although buying a
drill press would solve the bit-breaking problem, drilling all those holes will still take a
tremendous amount of time. The alternative is a CNC Machine.
Commercial CNC machines cost thousands of dollars, but with effort you can build your own
for much less. Thankfully, there are many well-documented hobby CNC projects on the internet
to help us through this process. A great source of inspiration for me was "Tom's Easy to build
Desktop CNC Mill:"

Instructable tutorial

Assembly (video)

Engraving (video)
And here are a few more CNC Machine designs that stood out:

lirtex.com's CNC

wardscorner.net's machine

Another instructable tutorial

Engadget's three part article: Part 1, Part 2, Part 3.


I have found from experience that starting without plans generally results in great tragedy (at
least when I build things). I therefore decided to design the machine in Autodesk Inventor, in
order to have detailed building plans to follow. A few pictures of my design are below:

I did not have any experience with Inventor, so I had to teach myself. I didn't go into extreme
detail with the Inventor design, like putting every nut and bolt into the assembly, but I was able
to see what the machine would end up looking like and also get dimensions of parts from it which was a great help when I started building it.
To make the seemingly overwhelming task of designing and building a CNC machine more
manageable, I broke the project up into sub-projects:
The CNC machine
Design the machine.

Sketch the basic design on paper.

Model the full machine in Inventor.


Purchase the necessary parts

Buy parts using dimensions from Inventor allowing for a margin of error.

Parts for the frame include 2x4's, bolts, nuts, washers, screws, skate bearings, and

acrylic (plexiglass).
Build the machine

Start by building the frame out of 2x4's.

Put the aluminum trim channels on.

Build the X & Y axis platforms out of plexiglass (bottom & top decks).

Attach bearings to acrylic platforms so they slide securely along trim channels.

Etc..
The stepper motor controller

This board provides power to the motors and, when told to do so buy the microcontroller,
turns the motors in either direction.

Read more about the stepper motor controller..


The microcontroller

My CNC control system is designed like this: User -> PC -> Microcontroller -> Stepper
Motor Controller -> Motors.

The PC program (below) sends the hole locations and system commands to the
microcontroller, which in turn sends the step signals to the stepper motor controller.

Details on the PIC18F4550 microcontroller board.


The software

The PC program parses an excellon drill file that the user loads for hole coordinates.

After calibration (including adjusting coordinates for board misalignment) the user can
start drilling.

The PC program is like the "host," controlling everything, sending commands to the
microcontroller.

More information about the PC program is available here.


Microcontroller firmware

The microcontroller is connected to the PC over USB and does only what the PC
program tells it to.

When hole coordinates are received, step signals are sent to the motors until the drill
location is reached, at which point the drill routine is started.

When the hole is drilled, the microcontroller lets the PC program know it's ready for the
next hole.

The PIC18F4550 CNC machine firmware can be downloaded here.


Here are some pictures of the finished machine:

And a video of a test run: (note that I've made a lot of improvements since this video was
made, including fixing the extremely annoying freezing problem).
http://www.youtube.com/watch?v=sHf4x8b3YKU
Unfortunately I've been having trouble with the accuracy of my machine. It's very precise, but it
seems to lose accuracy at certain places on boards. There could be several causes for this:

Software - PC software (calculating the hole coordinates), or firmware (the step routine).

Electronics - I made all of the electronics myself, including the microcontroller board and
stepper motor controllers. There could be a problem with electrical interference, bad
PCB design, or who knows what else.

Mechanical - I believe the problem is mechanical. I'm using super-cheap threaded rod
for my leadscrews and equally inexpensive coupling nuts. My linear rails (trim channel)
and ball bearings may also contribute to the problem. I'm planning on running a battery
of tests with the machine to try to determine if there's a pattern to the accuracy
problems, such as it being inaccurate around the same place every time, which would

mean the problem is mechanical.


Although the machine is having some accuracy problems, I feel that it's turned out pretty well.
It was extremely cheap to build, a wonderful learning experience, and hopefully with a little
tinkering I'll get the accuracy to where it should be so that I can use it to regularly drill PCBs!
The next challenge is to figure out a way to drill boards with different hole sizes and how to
change the drill bit on-the-fly!

outer CNC Casero


Ahora que ya probamos los motores y los drivers, ya estamos en condiciones de pensar
nuevamente en nuestro router CNC casero. Hicimos una prueba con ese router y era
DEMASIADO lento y sobraba fuerza. Los motores son de baja potencia y los drivers con L293d
son para poca corriente (600ma y 1200ma de pico).
Por ahora, rediseamos el router con los mismos engranajes pero quizas los cambiemos. Puede
desplazarse en los ejes x y z; 20, cm, 17cm y 4cm. Por ahora esta asi:

Y con el torno de mano ya montado queda as:

Con respecto a la electnica:


Por ahora tenemos esto:
placa pinguino o arduino, programador serial (si nos hacemos nuestra propia placa 18f4550 y
tenemos que flashear el chip, pero no es necesario para el arduino) , drivers para motores (en
este caso no son step y dir y nos sirven solamente para el proyecto txapuzas), relays (si
queremos prender apagar nuestro dremel) y , comunicacion ttl serial (no necesaria para este
proyecto), borneras para la placa pinguino o arduino y motores.
##############################################
Con respecto al software:
Analizaremos el Arduino uno con atmega328 usando "Txapuzas" desde Linux, o "grblcontroler" desde windows o desde linux, o el pic 18f4550 con "cncdudez" desde Windows.

Analizaremos tambin "CNCControl" que funciona con Arduino, y puede ser usado tanto con
Windows como con Linux
Mi parte electrnica por ahora es as:

Como puede verse en las fotos, puse unas guias de madera a fin de poder retirar cualquiera de
las placas simplemente desconectado las borneras y deslizando la placa por la guia. Tambim
pueden verse unos reguladores 7808 para reducir la tensin de la fuente de PC y alimentar los
motores con 8v (con 12 voltios recalentaban). Alimento todos los motores con 8 voltios a partir
de la salida de 3 reguladores 7808 puestos en paralelo (en el circuito hay solo 2 reguladores
pero yo puse 3 reguladores 7808) de acuerdo al siguiente esquema:

Puede verse adems que puse un ventilador enfriando todo.


En el arduino, en el init.d, luego de muchas pruebas pusimos:
#define FAST_XY_FEEDRATE 1500
#define FAST_Z_FEEDRATE 1500
Estos dos parametros definen la velocidad, cuando el gcode no lo tiene definido (por ej un
comando "G00 X0.00" movera el motor X a la coordenada 0 de X,a la velocida definida en
"#define FAST_XY_FEEDRATE 400".
Nota: Sigo perdiendo pasos en rutas complejas (o sea, cuando se envian muchisimas
instrucciones de muy poco avance, una detras de la otra, y es un tema que tengo que ver. He
puesto los motores directo a la varilla roscada, sin engranajes (las fotos en esta pagina y los
comentarios sobre engranajes an no esta actualizado, pero no los estoy utilizando). Los acoples
los hice de la siguiente forma:

Una vista de la parte electronica:

Y del router:

Dejo aca una foto de letras grabadas con una fresa diamantada (no es lo correcto pero funciona
no teniendo otra):

Y haciendo click sobre la siguiente imagen, un video del router haciendo las mismas:

###############################################
En lineas generales

Con una placas como estas (arduino o pinguino), puedes controlar dispositivos electricos como
ser, luces (prender-apagar), motores (hacer girar, invertir sentido), o recibir seales analogicas
(voltajes) y digitales (encendido-apagado), etc. (a traves de relays, dirvers de motores,
resistencias, etc. )
Y por ltimo, un consejo:
Cuando hagas pruebas con los drivers de motores (normalmente los vas probando de a uno a
medida que los vas armando), no uses la salida de 5 voltios del arduino. Es preferible, alimentar
los 5 voltios de los drivers, con una fuente externa. Un mal conexionado, puede hacer que por la
salida de 5 voltios del arduino "ingrese" un voltaje mayor proveniente de la alimentacin de los
motores (en mi caso, otra fuente de 12 voltios). Yo comet un error de conexionado y termin
quemando el arduino y un driver. O sea... los 12 voltios me ingresaron por la salida de 5 voltios
del arduino. Lgicamente, debers interconectar los gnd del arduino, de los drivers y de las
fuentes.

S-ar putea să vă placă și