loading
Picture of Quad Stepper Controller
This project started last year, there was an article Popular Science about a college professor that made a "3D printer." I remember thinking to myself "holy crap... I want one." Of course at that time $2300 was a lot of money for a high school student to shell out for a hobby. From then my goal has been to eventually have my own 3D printer.

After some research I came across the RepRap project and decided it would the most cost effective route. I like making my own electronics and I was expecting the MakerBot Store to start offering the motor controller PCB's again, but they never did. So I set out to create my own motor controller board. I wanted 4-axis stepper control, power regulation, parallel port connectivity (in case a CNC router became more important) and opto-isolated I/O's all one board.

This instructable follows the steps I used in order to create my Quad Stepper Controller.

Why a 3-D printer ?
- because they're awesome, they can create something from the ground up. This something can take almost any form that will fit inside of the printable area. All the 3-D printer requires is plastic filament and a design. Currently I am planning on building a RepRap Mendel, buying it piece by piece in order to avoid knowing the full price :)

What will I print ?
- everything; the ability to print almost anything your imagination comes up with is priceless. Some of the things I might print could be enclosures, mounting hardware, tool holders, prototyped parts and of course RepRap parts to name a few.
 
Remove these adsRemove these ads by Signing Up

Step 1: Schematic design

Picture of Schematic design
The RepRap design calls for 3-axis motor control in addition to a stepper motor to extrude molten plastic, so I require 4 stepper motor controllers. I decided to use a combination of the schematic from Sparkfun's EasyDriver and MakerBot's Stepper Motor Controller v2.2? (no longer available).

The driver design is based around Allegro's A3982 DMOS Stepper Motor Driver with Translator, unfortunately this is is surface mount so prototyping will be more difficult. The circuit also contains support components including voltage regulator, filtering capacitors and protection components. The A3982 is a constant current motor driver which means it can drive a variety of stepper motors.

The other half of the circuit contains opto-isolators. The goal of this half was to provide protected I/O's to the parallel port just in case I happened to loose interest in a 3D printer and decide to build a CNC router. 

Warning: If you decide to use the schematic provided, you may have to re-design the opto-isolator circuit. Two (possibly more) of the opto-couplers are stuck on. Have not been able to troubleshoot the issue yet.

Step 2: Ordering parts

Picture of Ordering parts
Why order parts before designing a PCB? Well I find it helps me make decisions about how the board should be designed if I have the parts in front of me. For example I would have had no idea what size board to make if I didn't have the enclosure to measure. Here are the parts I ordered, in addition I may have also used things that were laying around like a barrel power connector, fan, PTC fuse, scrap wire and misc hardware. (Digikey part numbers)

1 - HM891-ND - enclosure
1 - CR379-ND - finger gaurd
7 - 425-2177-5-ND - optocoupler
1 - ED90054-ND- 28 pin socket
10 - 455-2266-ND - male JST connector
10 - 455-2247-ND - female JST connector
10 - 455-2219-ND - male 3 pin JST connector
10 - 455-2250-ND - female R/A JST connector
100 - 455-2261-1-ND - JST pins
4 -WM1352-ND - female motor connector
4 - WM23701-ND - male motor connector
20- WM3112CT-ND - motor connector pins
4 - 620-1299-1-ND - allegro A3982 stepper drivers
1 - RJHSE-5385-ND - RJ45
20 - 399-1249-1-ND - 100nf cap (1206)
10 - 399-1221-1-ND - 1nf cap (1206)
10 - 399-1251-1-ND - .22uf (1206)
5 - PCE3754CT-ND - 100 uf cap
4 - 3362P-103LF-ND - 10K trimmer 1/4 inch
30 - P10KECT-ND - 10K resistor (1206)
30 - P1.0KECT-ND - 1K resistor (1206)
10 - CSRN20.25FICT-ND - .25 ohm resistor
10 - P2.7KECT-ND - 2.7K ohm resistor (1206)
10 - P470ECT-ND - 470 ohm resistor (1206)
10 - P150ECT-ND - 150 ohm resistor (1206)
1 - 497-7255-1-ND - 5v regulator
5 - MMBT3904FSCT-ND - NPN transistor sot 23
1 - L717SDB25P-ND - DB25 connector
20 - 160-1169-1-ND - green LEDs (1206)
1 -EG1526-ND - thin switch
 
 
Also solder paste

Step 3: Board layout

Picture of Board layout
The board layout was definitely the most time consuming part of this project, in all about a month of evenings. The majority of the setbacks had to do with cramming four stepper controllers and protection circuits onto a board smaller than 4" X 3".

- First, if you have an enclosure in mind measure the available board area inside. Unfortunately Eagle CAD limits the size of the board to 3.2" X 4" so if your enclosure is larger you will have wasted/empty space inside. In my case, the aluminum enclosure I chose was built with channels for the board to slide into; about 2.9" X 3.54"

- Second, this design is based on a two layer board, there can only be so many intersections in one area. I chose to space the Allegro stepper controllers evenly under the fan. The fan itself had to be mounted directly onto the PCB so it could all be slid into place.

- Finally, If you are designing your own board; be sure to triple and quadruple check your layout before sending out to a fabrication service. Eagle makes it easier but more time consuming with their DRC (design rule check) to check for design errors. I decided to use Sparkfun's Batch PCB, the directions are well documented on Sparkfun's website and countless instructables.

Step 4: Solder it

Picture of Solder it
IMAG0161.jpg
IMAG0160.jpg
In three to four weeks you will receive a beautiful custom PCB to which you will need to solder parts to. There are many different ways to go about doing so, but I chose the slower hot air rework method.

- First, test your solder paste; observe how it flows and how hot it must be to turn shiny. IC's take some practice too much paste and pins will be soldered together, too little and they wont make good contact.

- Second, paste, place and solder in small groups from smallest to largest components onto the PCB. If you are using another method such as skillet reflow or a heatgun all of the components can be soldered at one time.

- Finally, this is optional but you may want to test individual circuits before they get tied to other components. This can only be done during the soldering process.

Step 5: Board extras

Picture of Board extras
IMAG0173.jpg
IMAG0170.jpg
IMAG0174.jpg
IMAG0185.jpg
Because this is a two layer board there are some really crammed copper intersections, higher current carrying wires were made thin to accommodate all of the connections. To solve problems this may have caused; I designed exposed power source pads to solder reinforcing wires to. (seen in the first picture) The only negative effect is the aesthetics of the board design, this can be solved with a four of more layer board.

Step 6: Cutting holes

Picture of Cutting holes
IMAG0167.jpg
IMAG0191.jpg
IMAG0186.jpg
Holes are needed for the Fan, connections to the motors, sensors, power and computer.

- Fan, I used an adjustable fly cutter for the fan hole. Dangerous but effective, the hole was then covered with a finger guard.

- Motor connectors/sensors, luckily the end pannels are made of plastic and easy to file by hand.

- Computer/power/switch, these connections are also on a plastic end and can be filed by hand.

- Various screws, were drilled and tapped for the finger guard and PCB securing.

Step 7: Testing

Picture of Testing
IMAG0163.jpg
IMAG0222.jpg
IMAG0187.jpg
IMAG0181.jpg
IMAG0190.jpg
Its all put together
Heres the first computer test, unfortunately there is an issue with the opto-isolator circuit.


I cant wait to finish my 3-D printer, its gonna be awesome. Hopefully this instructable inspires you to build your own.

Nice project. can you please make a tutorial on how to configure db25 connector pin from a pc......thanks.

brcoenen2 years ago
so do the jp1 one and the con-1-4 get tied together in the db25, cause it looks like they are connected in your pics, but can't be sure, and if so, is that what the numbering refers to on the jp1?
Jason-B (author) 2 years ago
Check out http://www.mindspring.com/~pitt/EMC/basic_step.jpg that may answer your question, i don't remember exactly what setup i used but its all configure-able in EMC2
brcoenen2 years ago
But just 7 pins is not enough to run the 4 motors is it, so i assume the con1-4 connects to the db25 as well, so u guess thats what my question is, what pins do i connect those to?
brcoenen2 years ago
or is that what jp1 is?
brcoenen2 years ago
what pins did u use on the lpt. port?
codog0082 years ago
Out of curiosity did you ever get this pcb to work with 4 motors, controlled by a computer?
Jason-B (author)  codog0082 years ago
Not all 4 motors at the same time, I am limited by my test sortware. But individually they will spin a sparkfun bipolar stepper. If anyone knows a good program to toggle 8 io lines on the paralell port please let me know.
jstinson4 years ago
Thats one of the best designs I have seen. How much would you charge for one?
Jason-B (author)  jstinson4 years ago
The parts alone cost around $100, plus the board. Unfortunately the amount of time that goes into building a single controller would not be cost effective, I would have to mass produce these in order for it to make sense. If you want to build your own, I have the Eagle files and Gerbers for the board that I can send you.
Sowee Jason-B3 years ago
I know its been a long time, but, do you mind to share the pcb files? I think this one will do just fine for my printer :)
Jason-B (author)  Sowee3 years ago
Just uploaded, I didn't include the gerbers though.
suvinks Jason-B3 years ago
This looks awesome. Could you please send the eagle files for the board to suvinks@gmail.com?
pfred2 jstinson3 years ago
I think you should wait until you see it work before you put in any orders. It is awfully pretty but I've yet to see motors go round and round. With CNC it is motors plural too, one is easy, more than one it gets trickier. LOTS trickier!

When you can control more than one at a time then you're getting someplace.
skaar3 years ago
perhaps a link to a pcb making instructable.
skaar3 years ago
using eagle, my limits have been for how big a board the free version can work on, after that i may need to design a board stack. after i've figured the largest board, space for connectors poking into the side, then i grab a cardboard box to use as a case.
ajaydevb3 years ago
Very detailed post. I like it. All the best for your project. Please mail me when u completed the 3d Printer at ajaydevb@gmail.com
Nice design! what software are you using for control?
Jason-B (author)  smart_arse_1014 years ago
The software in the video was EMC2 (http://www.linuxcnc.org/), but if I continue building a 3D printer I will eventually wire this up to my Arduino for the RepRap firmware.