Perfboard Hackduino (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.
PDFHackduino3_schem.pdf(595×842) 219 KB
file.TINY
Remove these ads by Signing Up

Step 1: Gather Components and Tools

Parts list and buy links: • 28-pin DIP IC Socket – $0.30 – buy mouser • 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. Tools: • IC Extraction Tool (you can use a min-flat head screwdriver to pop out chips as well) – buy • Wire strippers • Snips • Multimeter • Soldering Iron + solder

Step 2: IC Socket

First step is to figure out what exactly what you are putting into this circuit.  For this tutorial all we will build, other than the ATMega necessities, is a voltage regulator, so I am leaving space at the top of the board for this.  I also recommend leaving some space towards the bottom for a capacitor.  However, if you know this will include much more than just the ATMega circuit, you should plan this out on your board now, and install the IC socket appropriately. Most IC’s (Integrated Circuits), and consequently their corresponding sockets, have a notch on one end.  In this photo, you’ll see the notch is towards the top of the board.  This is extremely important to pay attention to both while building the circuit and when inserting the chip during the last step. 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

LM7805 circuit goes next.  The 7805 allows you to power the circuit with a 9v battery or even 12v DC power supply, and ouputs 5v which is what our chip wants.  With the “chair” facing you, solder the 10nF capacitor connecting the right two legs of the 7805.  In this position, from left to right, the pins are input voltagegroundoutput voltage (5v). 10nF cap (labeled 103) bridges the GND and OUTPUT voltage.

Perfboard Hackduino schematic

Step 4: Finishing the Power

I would never do this when actually building this circuit, but for tutorial purposes I felt it to be the clearest way to show you how I am taking power from the 7805 and sharing it with the board.  In fact i recommend that you do not put any wires on top of the 7805 as it can heat up quite a bit, particularly if you are inputting more than 9v. Go around the 7805 on either side. Down the center of the perfboard you can see two rails that go down the center of board, which I am using as power rails (similar to the outer rails of a breadboard). I have chosen one to be ground, the other to be power  (+5v). From behind the ‘chair’ (7805) you can see I have taken the input voltage pin and ground to two terminals which is where our battery will plug in. 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

Now we begin building the ATMega circuit. I am attaching a diagram of every pin out of the ATMega8 series (also includes 168 and 328).  You can see how important that notch is in terms of knowing what is what in a situation like this. Pins 9 and 10 are labeled “crystal” – referring to our 16MHz oscillator.  Polarity here doesn’t matter go ahead and bridge the two pins with the crystal.  With the board I am using, you can see each pin of the IC socket has 2 terminals bridged already.  This is perfect here because we then need to add the 22pF capacitors and take those to what will be GND.  For now just take them to the empty terminal slot, we will add GND here later.   For more detail: Perfboard Hackduino (Arduino-compatible circuit)


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top