In this second post about my small CNC machine I walk through the process of etching a PCB and building up the controller circuit.
The board layout I came up with is shown above - there are more jumper wires than I would have liked and it is not exactly a compact design. Some of these issues are hard to avoid on a single sided board and, truth be told, I didn't spend a lot of time trying to opimise it. My main goal was to fit it on a 75mm x 150mm panel which is the normal size PCB panel I buy.
The next step is to make sure the components fit and I haven't made any alignment errors. The image above shows the placement of the various modules. The Arduino shield is the ITEAD Dual Stepper I mentioned in the previous article. I'm also using an FTDI module I got from eBay to provide the USB interface to the board.
The remaining larger components include the LM317 regulator (with heatsink) to provide the power for the steppers and set of screw terminals to connect the power and the limit switches as well as an RJ12 socket to provide data and power lines to the tool head.
Etching the Board
I use the toner transfer method to prepare the PCB. There are a number of tutorials online which give step by step instructions - in this post I will just run through the general process and point out some of the things that you need to watch out for.
The first step is to print out a mirror image of the PCB layout on glossy paper with a laser printer. Don't use photo paper for this - I tend to use the cheap advertising material that comes in your letter box and cut it into A4 size to feed through the printer. Some people recommend using pages from glossy magazines but I didn't have a lot of luck with that - the thicker paper is harder to remove after the soaking process and can lead to breaks in the toner transfer.
Once you have the layout printed and trimmed to the size of the board you need to iron it on to the PCB. Before doing this you need to clean the copper surface of the PCB - I wipe it down with acetone to remove any grease on the surface, scrub it with a brillo pad to remove the thin layer of corrosion that forms when a PCB is stored and then a final wipe down with acetone to remove left over copper dust. Once you have done this avoid touching the board with your fingers again.
The transfer process is much the same as applying an iron-on T-shirt decal. You need to make sure you evenly apply heat to the entire board so the transfer is consistent, pay special attention to the edges as the paper will contract as it heats and this can cause the edges to curl up resulting in poor bonding of the toner.
For this size board I just use a normal clothes iron at maximum heat and keep applying heat for around 5 minutes. Don't slide the iron around as if you were ironing clothes - keep it stationary and pick it up and place it down again to apply heat evenly across the board. If you slide the iron around you can smudge the tracks during the transfer.
When you finish the ironing process the paper should be well adhered to the board. Place them in a shallow container of water and let it soak for 30 minutes so the paper gets soft.
After it has soaked for a while the paper should be soft - you can remove it simply by rubbing your fingers over it. You don't need to be too delicate while rubbing the paper away but don't use any tools that may scratch away the toner as well. If the paper gets difficult to remove simple soak it in water again for a few minutes and try again.
At the end of all this you should have something like the image above. The paper is all removed and the toner from the printer has bonded to the copper during the heating process. The toner will act as an etch resistant - any copper covered by it will remain after the etching process is done.
No transfer is perfect so you will need to do some touching up before etching. Two things to look out for are smudged toner which leads to pads or tracks being joined together and thin toner which leads to broken tracks or incomplete pads.
For the former you can use a small jewellers screwdriver or other sharp tool to scratch away the extra toner. For the latter a fine tipped sharpie can be used to fill in the gaps or widen tracks.
When touching up keep a print out of the PCB layout to compare against. Once you get a good match it's time to soak the board in the etchant.
I use Ammonium Persulfate as the etching material - it's not as strong as other alternatives and results in relatively long etching times but it is a lot safer to handle and store. Whatever etchant you use be sure to follow the instructions to mix or dilute it into the correct solution for etching.
Unfortunately, in this case I used an etchant solution that I had already used a few times before. Because of the large amount of copper that needed to be removed the process did not act consistantly resulting in a lot of errors in the final board. The image above shows the result - broken tracks because of over etching in certain areas and left over copper in others because the solution wasn't strong enough.
The first board was too damaged to repair by hand so I had to run through the process again - this time with a fresh etchant solution. The results (shown above) were much nicer.
Finally you need to drill the holes. I use a small Dremel like tool with a 1mm drill bit fitted. This requires some patience and care to ensure the holes are aligned and spaced correctly so don't rush the process.
I do the drilling before cleaning off the toner - I find this helps stop the drill bit from skidding on the copper surface and makes things a bit easier. While drilling you can take the opportunity to check for shorted tracks or pads - use a sharp tool to break the copper where needed.
Now that you have an etched and drilled board you are ready to solder. There are likely to still be some broken tracks and open connections but you can ignore them for now.
Solder components on in order of height - starting with the lowest profile components first. I always start off with jumper wires, followed by resistors and then IC sockets. Capacitors, transistors and connectors are added torwards the end.
And here is the final result - I've populated the board with the modules to make but haven't added the two CPU chips yet. The alignment isn't perfect (as you can see by the connectors at the back) but it will be good enough to use.
The final step is to deal with any broken tracks or bad solder joints. This is simply a matter of sitting down with a multimeter and testing continuity on all tracks. You really need to do this before applying power to the circuit - eliminate any shorts and touch up broken tracks with jumper wire. I haven't finished this task yet, having to do a second etching delayed my schedule a bit.
As I mentioned there will be some final repair work on the PCB and I need to check that all the connections are correct. The trim pot on the LM317 regulator will need to be adjusted so I get a steady 6V output for the motors and then finally I can program the AVR chips and mount them. That's a job for the coming weekend.