Monday, March 22, 2010


New Arduino Mega Shield for CNC interface!

So I have been working in Eagle for about 2 months now and have made a few designs here and there to support the Hydra-MMM project. I just made one in the past week that I thought might be useful to the community. The design is a snap on shield for the Arduino Mega that allows the Arduino to interface with diy CNC machines that are built upon a parallel port (DB25) interface. These machines use a printer parallel port along with computer software (Mach 3, EMC, etc) to control the movement of the axes. The processing is done on the computer CPU instead of being done on an Arduino or something of that nature. Here is a few pictures of the actual eagle PCB

2 sided PCB board layout with the big 25 pin parallel port interface in the middle

Schematic of the parallel port shield

The reason I wanted to make a parallel port interface is because we are hoping to use our machine for both CNC work and rapid prototyping. By using a common parallel port interface we can have a single electronics control box (ECB) that has all the stepper motor drivers, extruder controllers, spindle speed controllers, and everything of that nature inside. I'll have more information on our ECB over the next few weeks, but for now a screenshot of the setup is below. Note that most of the electronics have not been modeled in the CAD program yet, so they are not shown, but their placement should be obvious.

Electronics Control Box (ECB) with power supply, Arduino Mega, stepper motor outputs and endstop/encoder inputs

The ECB can than be connected by a parallel port cable to either a computer with a 25 pin printer port or to the Arduino Mega with the new parallel port shield. The Arduino Mega will be running the Hydra-MMM firmware, but any reprap firmware variation would work. The main concept is that once connected via the parallel port to the ECB, the Arduino would have access to all the stepper motor drivers and endstop sensors that it needs to print! The parallel port pinout is as follow:

1 Estop
2 Xstep
3 Xdir
4 Ystep
5 Ydir
6 Zstep
7 Zdir
8 Astep
9 Adir
10 Xlimit
11 Ylimit
12 Zlimit
13 Alimit
14 Spindle/extruder on
15 Aux Input
16 Spindle/extruder speed control (pwm)
17 Coolant/Fan on
18-25 Ground

Some readers out there may notice the fact that there are no temperature sensors on the parallel port pinout. There are 2 AD595 thermocouple IC circuits built into the shield for measuring the temperature of the nozzle heater and also an optional heated build table. The main reason I did this is that I noticed that the analog wires for temperature measurements pickup a lot of noise if you run them over long distances. By having them mounted directly on the shield that attaches to the Arduino, that noise is minimized. I have tested a prototype pcb using this technique and the improvement in noise suppression over the same breadboarded circuit is amazing! The shield also has an onboard LM7805 5V regulator so that it can be run off the same power supply you are using to power the stepper motors (in our case 30V). This may also help reduce noise as the regulated 5V output is filtered and likely suppresses some noise in the process.

Another reason people may want this shield is that diy CNC machines have been around for much longer than the Reprap project. Many people already have the electronics for a cnc machine that is based around a parallel port interface, however, they are now wanting to try out rapid prototyping using the Reprap Arduino firmware. This shield would let them do that pretty easily.

The eagle files for the shield can be downloaded here:

As I said, I have only been using Eagle for about 2 months so I would love some feedback on the design. Let me know what you think!

Labels: , , , , , ,

Ok, so I'm not sure why this is happening, but for some reason when I open up the board layout, none of the ground planes show up. However, with a quick click of the autorouter (12 mil traces, btw) everything shows up as it should be. Why are these planes not saving with the file? Any ideas?
@cpwebste, ground plane polygons won't draw until you hit "ratsnest"... sounds like the autorouter runs that at the end. I opened the files and got the polys, no problem, after hitting ratsnest.
Ah good to know! Well at least this way, any other novice Eagle users who see this will know why their PCB looks different than the one in the picture
This comment has been removed by the author.
Interesting. I think I know someone who may build something like that.

Do you think you'll do up a wiki page for that board and your stepper driver?
@Sebastien I already have a wiki page for the Hydra-MMM project ( and I have been putting some information on there, but my blog is going to be my main place for documentation as I find that much easier to deal with ( I will also be posting on the builders blog if it is something I think other builders in the community would want to see/use. And as far as the stepper drivers, there are eagle files for some cheap PIC and MOSFET drivers that I have designed that can be found on my sourceforge page. See this blog post:

Glad to hear others have a use for this! Let me know if there are other features or ideas you have for the shield
I was trying to hack one of these together. Can I buy one?
If there is enough demand I may start selling them after I finalize the design. Or maybe just get someone to stock the PCB or something along those lines. I need to actually build the thing myself first to verify all my traces are correct.
i maybe can help with some PCB´s
i do have acces to an CNC machine and can mill pcb´s
i think of building an 3d printer out of the mill. using your pcb design so probably this can help
Personally I would have used the Eagle Bus facility when laying out the schematic. In my opinion would make it clearer what was going on.
Post a Comment

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]