Perfboard Hackduino ($8 Arduino-compatible circuit)
Never again will you have to dismantle a finished project just to reuse an Arduino board!
This tutorial will go through the steps involved in fabricating your own Arduino-compatible circuit using just ~$8 of parts (this includes the ATMega chip!). This is perfect for installing and embedding in permanent pieces, as you don’t need to waste a full $30 Arduino board in a project you will never need to reprogram or touch ever again. It is also great because you can solder any custom circuits (LEDs, other ICs, any external analog circuit) on the same board, and customize in terms of shape and size.
I assume you have a regular Arduino board already, so pulling out the chip to reprogram it shouldn’t be a big deal, since we’re going for minimal parts here. You could even go simpler by leaving out the reset button! To better illustrate the process, I did all the wiring on top of the board for tutorial purposes, but feel free to save yourself some space and make some of the connections on the copper-clad side of the board, as seen on hackduino.org or similar.
Step 1: Gather Components and Tools
• 16MHz crystal – $0.55 – buy mouser
• momentary push-button switch – $0.15 – buy mouser
• 1k ohm resistor – $0.05 – buy mouser
• LM7805 5v voltage regulator – $0.35 – buy mouser
• 2 x 22pF capacitors – $0.12 – buy mouser
• 10nF capacitor (ceramic disc code ‘103’) – $0.10 – buy mouser
• 22uF capacitor – $0.02 – buy mouser
• ATMega168 or 328 microcontroller chip w/Arduino bootloader (you can use the one on your Arduino for now!) – $4.00-$5.50 – buy unbootloaded mouser(cheaper) / buy bootloaded sparkfun(expensive)
• breadboard style perf board – $1.45 from electronix express (elexp), or $1.99 – from radioshack
Total cost of components: $7.39 (!!!) *22AWG wire is not included
I have created a Mouser project that includes everything you will need, except for the perfboard itself (Mouser doesn’t carry a good one at a good price). Also, this is the blank ATMega328 – so you will need to bootload the chip yourself. Also keep in mind that ordering in multiples makes everything cheaper! Here is the Mouser project.
• IC Extraction Tool (you can use a min-flat head screwdriver to pop out chips as well) – buy
• Wire strippers
• Soldering Iron + solder
Step 2: IC Socket
Go ahead and solder all 28 pins in, making sure the pins are sticking out of the copper side of the board.
Step 3: Voltage Regulator
Step 4: Finishing the Power
Lastly, install the 22uF capacitor across your power lines somewhere after the ATMega chip. In this case I am putting it at the end of my power rails. Be aware of polarity when using electrolytic capacitors – match the ground of the cap to the ground rail. This is important!
**if you haven’t noticed by now, I ran out of red wire and am using blue for positive and the standard black for ground.
Step 5: Installing the 16MHz Crystal Oscillator
Step 6: AREF, +5Vs, and GNDs
– VCC (+5v) needs to go to 7, 20, and 21 (the analog reference voltage).
Go ahead and connect these pins to the outer terminal pairs directly across from them, using the appropriately colored wire.
Step 7: Resistor to Reset pin
This 1k ohm resistor connecting pin 1 to +5v will guarantee that the ATMega chip will never get accidentally reset.
By using a resistor and not wire, we have the option to add a button for resetting to this pin later.
For more detail: Perfboard Hackduino ($8 Arduino-compatible circuit)