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.
Remove these ads by
Signing UpStep 1: Gather Components and Tools
• 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


















































Visit Our Store »
Go Pro Today »



How can I hookup female header pins on the board to hook my projects too???
Thank You
here is a pic of one does that mean i should connect a header pin to all of them???
Thank You,
Mike
If you don't need shield compatibility, use a ATMegaXX8 target board for $3. They also sell the Atmega chips with the bootloader installed for $5.
Just a happy customer.
with *very* small leads. It's much easier to install a 6-pin
programming header, connected to Rx, Tx, +5v, Gnd,
and reset. That way you could use an FTDI breakout
board or cable.
I'm wondering if you happen to have a way to upload sketches to these chips without having a duemilanove to pull and place chips in.
FTDI TX to Atmega RX
FTDI RX to Atmega TX
The power and other lines can remain disconnected.
Thanks!!
The Sparkfun link you provided leads to an earlier model they are no longer producing and there is a link to a more recent product. I tried to find the more recent product on Mouser, but their ATMega chip listings do not mention the Arduino bootloader. How do I know which chips on Mouser will work to build an Arduino compatible board?
Forgive me if this has been asked or answered already. I glanced through the comments and did not see it.
Am I reading correctly?
Thanks
From my research it looks like the electrolytic cap should go input to ground and the ceramic cap should go output to ground
http://www.instructables.com/id/DIY-Arduino-or-The-DIY-Duino/step18/Putting-it-Together/
The linked project seems to have a cap bridging the input and ground in front of the 7805 and then the ground and output after the 7805. Your schematic doesn't seem to follow the same pattern. Your cap (the 103) comes after the regulator and then there is another cap after the ATmega. I'm confused.
I'm a total noob at this so I'm just trying to learn the different options and understand how it works. Can you explain the difference and maybe the pros and cons of one way vs. the other?
I moved the voltage regulator to connect directly to the center voltage rails. This way I hook the power input to the left side of the regulator and place the negative power connection directly on the negative voltage rail. Saves me from placing those two extra wires looping around the regulator and frees up a large bit of real estate to add more components. I also connected pin 7 to the positive voltage rail on the underside to clean up the top a little bit. Power is distributed to the reset resistor from this connection.
I have built this Hackduino using the exact materials and wiring as described but on a protoboard. I burned my ATMEGA328, uploaded the SOS code and verified it worked with my original UNO. All fine. However when I plug the chip into the protoboard and power it up... nothing. So I checked and rechecked my wiring; all fine. It wasn't until I pulled both GNDs from the 22uF caps and crystal that the damn thing started blinking!
So without any GND to the caps and crystal it works absolutely fine. Weird?
So I have two questions: Do you think the crystal might have gone bad?
And
Do i even need the damned thing?
also, i believe you're using the wrong capacitors. it's 22pF (picofarad), not 22uF (microfarad).
hope it helps
With a resistor, if you need 50 ohms of resistance but didn't have a 50 ohm resistor, you could use two 25 ohm resistors in series (they'd pull the exact same amount of resistance - 25ohms x 2 = 50 ohms). Using two 10uf caps gives you 20uf of capacitance, and 2uf of difference between that and a 22uf cap isn't really anything to worry about.
C sum = (C1xC2) / (C1+C2)
if you have more than two capacitors, the formula is:
C sum = 1 / ( 1 / C1) + (1 / C2) + (1 / C3) ..................
C sum = The serial capacitance
C1 = one capacitor
C2 = another capacitor
C3 = the third capacitor
Just so i get this right if i have an arduino uno i can do all programming and bootloading on that one and then just build my projects using the Hackduino when im done with my codeing.
And for next project i just go buy a chip and plug into my arduino and then build another costum Hackduino?
And so on.
Or is there anyting more i need?
can anyone help a frist timer out with some more specifics about using the Parallel Programmer for the Atmel chip flashing?
Or is that ONLY for uploading the sketch portion to the chip? and NOT for flashing the bootloader portion?
Do you need more than this set-up and the parallel programmer? Such as any other breakout boards..?? or headers..? ISP FTDI any of that stuff I saw mentioned (which is bit over my head)??
I have this set-up as outlined above (in a breadboard though..not a proto board)
but still only have blank chips so I can not even attaempt to upload a sketch/program to the chip for testing.. PLEASE (anyone) throw me bone her and help a first timer out with the bootloader aspect of all this!)
I have made the parallel programmer witht he correct resistors as outlined in the Arduino page/diagram linked from here..
Thanks
So, how do I solve the bootloader "chicken and egg" problem? If you have a blank Atmel ATMega328P chip, you can use an existing arduino to install the bootloader on a blank chip. This means you can use a USB to FTDI serial cable to send the bootloader through an arduino to a target chip. The arduino site has more information: http://arduino.cc/en/Tutorial/ArduinoISP
SparkFun has a great series of tutorials under "Beginning Embedded Electronics" The first four are a great complement to this instrucable: http://www.sparkfun.com/tutorials
http://www.uchobby.com/index.php/2009/10/04/diy-serial-to-usb-for-3/
and
http://www.arduino.cc/cgi-bin/yabb2/Yabb.pl?num=1261313468/
And for your question on if the programmer has to be connected after the sketch is programmed, you don't need to connect it once the sketch is uploaded.
and got this:
avrdude: can't open device "giveio"
avrdude: failed to open parallel port "lpt1"
as my response from the Arduino IDE..
(geez if its this hard to get the bootloader on..I cant image what it going to be like to upload sketches all the time!.)
Trying to do this the most budget/economical way possible (household items..and hacks..etc)
thanks
Programming a sketch on to the chip will require an FTDI device whether it be a USB FTDI cable or an FTDI breakout board. Which is an additional purchase for you.
You can save the trouble of buying any of that stuff and just purchasing 1 (one) Arduino board and use it to both bootload and program sketches.
killing two birds with one stone.
both for bootloading & sketch uploading.
now would I just be 'popping' in/out new chips in this approach?
one last question I guess...since I have your ear (eye) for the moment..
on the link: http://arduino.cc/en/Tutorial/ArduinoISP
Im assuming I would be following the breadboard version/diagram..
does that set-up differ in any way to the set-up you displayed (we created) above? (reset switch and power added)
is the pinout the same for flashing the bootloader and uploading a sketch?
and I would just use those 4 pins (1, 17, 18, 19) to make a 'header' for quick programming?
In your step #4 (power) we add a capacitor to the the GND and ++ lines
Is this to protect in case the battery is plugged in the wrong way?
"I" appreciate this tutorial, this will be my first step into Arduino and Im excited!
Thanks for making it easier.
Those cables can be had for $2 on Amazon, I may have to use this.