With the pcb design drawn out (check out that trace routing!) it’s time to have a go at making a circuit board. Each cube location (there are four in total) has five pins. Four of which are simple digital inputs and one a serial comms input pin.
Four lots of four digital inputs make 16 digital inputs – perfect for use with an 18F4550 PIC microcontroller. Ports PORTB and PORTD both have eight pins and internal pull-up resistors, making them perfect for these digital inputs. Another four pins will be used to read data over serial, one serial pin per location.
The only way to see if the design will work in practice is to get on and make the board! This design uses pin headers and some left over IDE cable to create just the cube location part of the tray. The processing side of the board can be designed later – for now, we’ll connect the tray reader part to a PIC microcontroller on a breadboard.
To actually make our pcb, we’re using the tried-and-tested “toner transfer” method to get our layout design onto some copper clad board.
print out the pcb design onto some press-n-peel blue paper using a laser printer. Inkjet printers won’t work! If you’ve not done this before, print the design onto regular paper first, then cut a smaller piece of press-n-peel and stick it over the design. Re-print the pcb layout onto the paper – that way you’re not using a large sheet of expensive transfer paper for a small circuit design!
If you don’t have access to a laminator, you can use a t-shirt transfer hot press, or even a domestic iron. Note that the more pressure you use (with a laminator/heat press) the less heat needed. If you’re using an iron, get ready to put plenty weight behind it, and try not to move it too much during the transfer process (else your press-n-peel will smudge around on the copper board and ruin the design!).
When the printed image shows through on the reverse of the press-n-peel, the image should be fully transferred. Note that the darker the black, the better the transfer. Four or five passes through a laminator is usually sufficient – too few and not all of the image will transfer resulting in broken traces, but too many and the toner will start to spread, resulting in fused or joined traces. With a hot iron on “cotton” or just before the steam option, you can expect to be ironing for about five minutes. Only experience will tell you when it’s done, so be prepared for a few trial runs to get the perfect transfer!
If any traces have fused together, run a small craft knife between them, to separate them completely. If any traces are broken (check the press-n-peel backing paper for bits of black to see where potential broken traces may be) touch them up with a thin-tipped permanent pen (a 0.5mm Sharpie pen should do it).
Use the backing sheet to help identify possible broken traces. If you see any black toner left on the backing sheet, look at the image on the copper board and you should see where it has come from. Touch up any broken traces as necessary. Scrape away (using the tip of a craft knife) any toner that has spread and cause traces to join – it’s easier to remove the etching mask now, than it is to cut through fused copper traces after etching.
Now the magic begins! Cut the copper board to size and place in a tub of Ferric Chloride etching solution. Use a plastic (ie non-metallic) container for the etchant and be very careful not to splash it about – this stuff stains like mad (and will make a real mess of your kitchen’s stainless sink)
Agitate the ferric chloride to speed up the etching process. If you’re in a rush, place the container in a hot water bath to increase the temperature. Where possible, etch your board with the copper side down. When all traces of copper have been removed from the board (ferric chloride etches from the edges of the board, towards the centre, so make sure all traces have etched fully) clean off the board and remove the toner (I use something like a sponge-sanding block for simplicity). You should be left with a shiny new copper-only PCB!
Replace the used etchant solution into a non-metallic container (I use a large glass coffee jar). It can be used again for future etching, and is good for up to six months. Do not dispose of this stuff down the sink: it will damage any steel surface (even stainless steel) permanently and can even damage your mains drains if there are any iron pipes still in your home!
One last check for fused and broken traces – hold the etched board up to a strong light source and you should be able to clearly see all traces. At this stage you can, if necessary, separate traces with careful use of a craft knife. Broken traces can be fixed with a fine-tipped soldering iron and really careful solder re-flowing, but it’s a tricky job and not for the faint-hearted!
Now drill any holes (using a Dremel or hand-operated PCB drill with a 1mm drill bit) and your board is ready for populating. Done!