Wednesday, February 16, 2011

TwinklePIC, part 3

Parts 1 and 2

So I had a program running on the microcontroller I was happy with. I had a circuit that worked well on a breadboard. The next step was to package up into a more permanent form - something a bit more durable, and a whole lot smaller.

The first real prototype I spun (completed in early summer 2010) was done in what is called perf board, meaning that it is perforated with a grid of holes spaced evenly apart. Most perf board is done with holes on 0.1" centers, which matches the pitch of a lot of thru-hole components. This is a good scale for hand-soldering, prototyping, and reworking, because it is a decent match for the unassisted abilities of human eyes and hands. Most circuits produced today are done with components that are fantastically small and really only workable by machine.

You can see that, when it comes down to it, there isn't a whole lot to the circuit. There's the chip running everything, a crystal to provide a clock signal, a resistor for each LED channel, a header for all the LED connections, and a button for mode-switching. Power comes in at either the male or female header above the chip. The big empty space to the left is there to let me zip-tie a holster of AA batteries for power.

The actual wiring isn't all that bad, either.

The connector really dwarfs everything else. There are lots of smaller connectors I could have used, but this one was handy, and it was easy to attach a bit of ribbon cable with the LEDs soldered at the end. Why even have a connector? Why not just solder the LED wire leads directly to the board? Well, this was still a prototype, and I liked the notion of being able to swap out one board for another, or make the cable longer or shorter, with resoldering everything. Modularity is good.


And it works! Hurray!

But while this bundle of LEDs looked nice when taped to my monitor at work, it still wasn't what I was aiming for. I still needed to assemble them into a constellation.

Plus, while this prototyped board worked pretty well, there were still things I wanted to do differently with it. Like the ability to power it from USB. Or cutting down the assembly time of the next unit (if there ever was one) to less than an hour. Or making it a bit tidier and compact overall. For this, I would need to get away from a hand-wired prototype and enshrine it in that most preferred of circuit media: the printed circuit board.

No comments: