Now that I’ve worked-out the software side of the ATMEL microcontroller-powered prime number generator, it’s time to start working on the hardware. Mind you that this is a prototype and not the final project. This is far smaller and simpler than the final version. For starters, I’m only multiplexing 30 LEDs (the full version will have at least 80). Also, this is being run by an ATTiny2313 microcontroller, and the full version will be powered by an ATMEega8. I picked up an unfinished wooden box with a magnetic latch from Michaels. I think it’s balsa wood. It’s really delicate and tends to chip when you drill it.
I used InkScape to make the layout of the LEDs. I simply made an 8.5×11” document, measured the box lid, drew a square that size, then made some Xs on a grid. I printed it out, taped it to the top of my box, and used my uber-fancy dremel drill press to drill perfectly-aligned holes. I’m so impressed by how easy this was that I wished I used the hexagonal layout I proposed earlier! Here are some photos:
So you’re pretty close to being done with the prototype, right? Yes and no. Yes in the sense that I’ve made the enclosure, basic circuitry, and basic code. No in the sense that I still have to improve the enclosure, circuitry, and code. For starters, after I took these pictures I touched the microcontroller and burned my finger!! It was running hot. I’m surprised I didn’t fry it altogether! I quickly powered it down and started inspecting the circuitry. Apparently Mr. I-got-a-masters-degree-and-am-going-to-be-a-dentist-soon doesn’t pay attention to detail [I'm losing prospective dental patients by writing this right now] and managed to wire every single one of six transistors backwards [shriek!] I guess I was pumping current out one side of the microcontroller and into the other side. Live and learn I guess. I have to go home tonight, cut all of them out (they were “permanently ghettorigged” in such a way that simple desoldering techniques will not remove them safely), find another batch of NPN transistors and solder them all in correctly.
This is the circuit concept. The chip is an ATTiny2313, sourced with 5V, where the left pins control the columns (by providing current) and the right pins control the rows (by providing ground). The “holes” at the top of the circuit represent where I hook up my PC and external power for testing purposes.