Introduction: Quickie PCB Production (with Bonus NiCd Battery Charger)
There's a lot of very good resources on Instructables for doing laser printer toner transfer, and for complicated circuits or fine-pitch work it's probably the way to go.
But what if you're stranded on a desert island with no laser printer and you still want to work out a super-quick printed circuit? What then?
(OK, honestly, I just find it a bit of a hassle to fire up Eagle, etc just to make a quick and dirty battery-charger circuit.)
Here's a start-to-finish home-etching-with-Sharpies mini-tutorial. It's basically "draw the circuit with sharpies, then etch" but the gold is in the details.
Step 1: Stuff You'll Need
From blank copper-clad board to working prototype:
Copper clad board
Ruler and matte knife to cut it
Scrubby pad to shine it
Three (3!) Kinds of Sharpie: Ultra-Fine, Fine (Regular), Chisel-Tip (Wide)
An empty piece of protoboard (the secret ingredient)
Drill and bit
Pen and paper for working out the circuit layout
Step 2: Design the Circuit and Lay Out the Board
Here we're building a constant-current battery charger with almost no bells or whistles.
The circuit's straightforward enough. Put a resistor (or group of resistors in parallel) between two pins of a LM317T voltage regulator and it spits out current equal to 1.25 V / R ohms.
The only whistle this cicruit's got, in fact, is the addition of a bunch of sockets which'll enable variable charging currents, which is handy because I've got a bunch of different NiCd/NiMH batteries all with different capacities and want to charge them all.
So first I Googled around a bit, then sketched the circuit out on paper. Next I looked up the pinouts for the LM317 on the datasheet and did a quick mockup drawing on paper with actual-spacing pin-holes, just to see how much room I need on a board.
Step 3: Draw Out the Circuit in Mirror-image (optional)
It's nice to have a mirror-image version of the circuit layout to help you with the on-copper version you're about to make.
If your digital camera's around, photograph your drawing and view it mirror-image on your computer. If you're doing the mirroring by hand, remember to flip all the pins on ICs left-to-right. Double-check the orientation of your diodes and transistors.
For this circuit, I didn't do either. I got away with it because the LM317's only got 3 pins and so I could just stick it in upside-down on the topside, and it would be the same as the mirror-image. If you've got anything in a DIP package, this trick won't work -- upside-down is only equivalent to mirror-image if there's only one row of pins.
Step 4: Cut the PCB Down to Size
Using your to-scale drawing, figure out how big the board needs to be.
I left a little more room for the power cord to enter on one side.
Cut by scoring repeatedly (light pressure is fine) with a matte knife. Flip board, mark carefully, and repeat on the other side. Then you should be able to flex it a few times and it'll fatigue and snap.
(If you watch the video, I didn't really score it enough. Still made a fine edge anyway.)
Step 5: Clean Up the Copper and Lay Out the Parts
Scrub up your copper with the green pad -- it's time to get drawing.
Here comes the first "trick."
Using your perfboard section and the ultra-fine point sharpie, lay out the holes for all your components as you worked them out on paper, In the mirror-image if you made one.
Ultra-fine sharpie just barely fits through the perfboard holes. If it doesn't work on one side, try the other. Worst case -- widen some of the holes with a drill bit.
Putting down evenly-spaced 0.1" dots makes sure that the pads you're about to draw are nicely centered so that your components will fit.
Step 6: Draw Pads and Connect the Dots
Time for the fine (regular) sharpie and some fine-art freehanding.
Draw wider dots around each of the fine-point pin centers. These'll be what you solder your parts onto later.
Then draw the circuit out. Here the usual width rules apply -- make the traces as wide as you can without compromising your design. Thin, ultra-fine point traces may be necessary if you have to snake in between pins. Otherwise, regular sharpie is a good width for most traces.
If you've got any close trace-to-pin places, feel free to draw out the traces first and make asymmetrical pads to work around it. You know where the pin-centers need to be because you marked them with the perfboard.
Step 7: Fill in the Ground Plane
It's easier on your etchant (and sometimes has beneficial electrical properties) if you keep a fair amount of copper on the board to use as a very-low-impedance ground path.
And it gives you something to do with the Chisel-tip Sharpie.
If you feel like it, you can do split power/ground planes. For some circuits you may want bypassing capacitors between the two planes scattered liberally around.
Step 8: Let the Ink Dry, Inspect, Do Small Touch-ups
Sharpie ink holds up better in the etch bath if you let it dry for a while. Not sure how long "a while" is, but I tend to wait 5-10 min or so.
This gives you time to double-check the circuit, look out for accidental connections, and scratch some kinda design into the ground plane just for fun.
Here, I ended up scraping a little ink from between two pads -- not because they connected, but because they were a little close for pads which would be carrying high current.
Then, thinking about high current, I widened up some of the traces.
Finally, I scratched a transistor symbol into an open part of the ground plane. (It's hard to think up a good logo on the spot in the 5 min it takes Sharpie to dry.)
You can use a component lead, sewing pin, paper clip, or something similar to scrape off the ink. I used the non-business end of a small drill bit.
Step 9: Etch
Etch the board using the etchant of your choice.
Shameless plug: Use a cheaper, re-usable etchant instead of ferric chloride. (Either of which, BTW, you should not be throwing down the drain. Look in phone book for hazardous chemical disposal companies if you're not re-using etchant.)
Step 10: Drill Out the Holes
Another couple tricks here. Since you don't have drill-holes made for you, an easy way to get them in the right place is to use your perfboard template again.
For a long row, like the resistor socket header, I'll put a dot in the middle of the top pin, then one in the lowest pin, then line up the two dots in the perfboard and fill in the rest. That way the whole header is on exact 0.1" centers.
The ultra-fine tip sharpie goes right through perfboard holes.
Have a look to make sure it all looks ok, then once you've dotted up the whole board, get to drilling.
The perfboard again, except this time as a drilling jig. Line up all the holes so that you can see the dots in them, then drill out the top and bottom pins, just like when marking them. Now you can stick something in the holes to keep the jig and board aligned. I used some solder that was lying around. Thick component leads or hook-up wire work well too.
Once you've got the perfboard jig set, the other holes take only a few seconds. This trick is huge for multi-pin ICs.
I drilled 6 more holes in the board to accomodate the wires from the power-supply plug so that they can loop through the board as a measure of strain relief. (Think I learned that trick here somewhere. Can't remember where. It's a good one.)
Step 11: Populate the Board and Solder It Up
Nothing special to say here. They're all in a row because you used the perfboard jig. And the pads you drew give you a nice surface to solder to. This part is smooth sailing.
If you're not interested in the battery charger circuit, you're done.
To recap: Practice on paper first, use different widths of sharpie, mirror-image with camera if needed, and use the perfboard as template/jig whenever you can.
Otherwise, just draw the circuit.
Bonus points if you can make it look kinda modern-arty.
Step 12: Particulars of the Charger Circuit
Because this super-simple charger has no turn-off mechanism, be very careful and be sure to pull the batteries out when they're charged. I stop charging my batteries early. They'll last longer if you under-charge slightly anyway.
And don't use it for LiIon or LiPo batteries -- they need constant voltage instead of constant current.
The LM317 chip got very hot with a few hundred milliamps current, so I built a simple heatsink by taking a copper clad scrap, drilling a hole in it, and bolting it to the LM317. Now it's pretty hot all across the copper, which means it's working -- pulling heat from the LM317. Is it enough heatsinking? Not sure without doing some math. If it burns out, I'll redesign.
Note also that the resistors are high-wattage ones. Since only 1.25v is dropped across the resistors, you should be able to get away with regular (1/4 watt) resistors for most reasonable currents, as long as you're not using single-digit resistance values. Still, mine get kinda hot. Definitely use power resistors if you've got 'em.
Most of the connectors on my battery packs are standard 2-pin female sockets as far as possible. This makes it easy to hook them up to the charger, or make an adapter you need. For instance, I took the top off an old 9v battery, soldered a wire to it, and now I can use it for rechargeable "9-volts" (they're actually 7.2v). Modular plugs/headers are your friend. I think some of my robots are 1/2 connectors by weight.
And speaking of 9v. The datasheet for the LM317 shows it needing about 2-2.5v more input than output. That's ok for me, b/c my highest-voltage battery pack is 7.2v, which wants to charge up to around 9.6v. But I'm pushing it. It might be better to use an 18v supply. Or maybe it's a good idea to slow the current down when the battery's almost fully charged?
If you want to use this type of charger yourself, go give Battery University a look. They talk a lot about good charging currents, times, discharge cycles, etc.
Because you can regulate the current very easily with this design by swapping out resistors, one set of resistors can make it a trickle-charger for charging up overnight, while a different set of resistors can charge up your batteries in 1 hour for when you're impatient.
A smarter charger is a project for another day.