«

»

Print this Post

Prime Prototype Construction

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:

Dremel Drill Press

I used my dremel drill press to drill nice holes in the lid of the box

The template I designed in InkScape was taped onto the lid of the box so that I'd have a guide to drill the holes - it worked beautifully!

The template I designed in InkScape was taped onto the lid of the box so that I'd have a guide to drill the holes - it worked beautifully!

Holes were enlarged by a hand drill with a bit the size of the cylindrical LEDs

Holes were enlarged by a hand drill with a bit the size of the cylindrical LEDs

After LEDs were inserted I added some little support posts with screw holes in them to the base so I'd have a place to screw-on my perfboard/circuitry down the road

After LEDs were inserted I added some little support posts with screw holes in them to the base so I'd have a place to screw-on my perfboard/circuitry down the road

You can get an idea for how the finished project will look by falsely-illuminating the lEDs (they're tinted plastic after all!)

You can get an idea for how the finished project will look by falsely-illuminating the lEDs (they're tinted plastic after all!)

The circuitry controlling the display involved an ATTiny2313 microcontroller (clocked at 10.2MHz with an oscillator and two capacitors for consistancy) and some transistors controlling grounding

The circuitry controlling the display involved an ATTiny2313 microcontroller (clocked at 10.2MHz with an oscillator and two capacitors for consistancy) and some transistors controlling grounding

I included some extra wires for prototyping/debugging/programming that will be later discarded.  The chip in the breadboard (ATMega8) does nothing.

I included some extra wires for prototyping/debugging/programming that will be later discarded. The chip in the breadboard (ATMega8) does nothing.

This is what it looks like in the light...

This is what it looks like in the light...

... and in the dark

... and in the dark

my incomplete code didn't illuminate the entire display

my incomplete code didn't illuminate the entire display

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.
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.

About the author

Scott W Harden

Scott Harden has had a lifelong passion for computer programming and electrical engineering, and recently has become interested in its relationship with biomolecular sciences. He has run a personal website since he was 15, which has changed names from HardenTechnologies.com, to KnightHacker.com, to ScottIsHot.com, to its current SWHarden.com. Scott has been in college for 10 years, with 3 more years to go. He has an AA in Biology (Valencia College), BS in Cell Biology (Union University), MS in Molecular Biology and Microbiology (University of Central Florida), and is currently in a combined DMD (doctor of dental medicine) / PhD (neuroscience) program through the collaboration of the College of Dentistry and College of Medicine (Interdisciplinary Program in Biomedical Science, IDP) at the University of Florida in Gainesville, Florida. In his spare time Scott builds small electrical devices (with an emphasis on radio frequency) and enjoys writing cross-platform open-source software.

Permanent link to this article: http://www.SWHarden.com/blog/2009-06-04-prime-prototype-construction/

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>