3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Standalone Arduino / ATMega chip on breadboard

Standalone Arduino / ATMega chip on breadboard
If you're like me, after I got my Arduino and performed a final programming on my first chip, I wanted to pull it off my Arduino Duemilanove and put it on my own circuit. This would also free up my Arduino for future projects. 

The problem was that I'm such an electronics newbie that I didn't know where to start. After reading through many web pages and forums, I was able to put together this Instructable. I wanted to have the information I learned all in one place, and easy to follow.

Comments and suggestions are welcome and appreciated as I'm still trying to learn all this stuff.

Edit:
Fellow Instructable member, Janw mentioned to me that it's always a good idea to add a capacitor or 2 near your power. He mentioned using a couple of 100nF capacitors should work. I'm very grateful he pointed this out to me, because my first production circuit that I'm building upon this circuit, was having a little bit of strange behavior. So I hooked up one 10uF capacitor near my power, and it started behaving correctly! I don't know why it didn't affect my 'blinking LED' test, but I do know that I'm grateful for Janw for pointing this out to me. Thanks Janw.

Edit2:
Building upon the previous edit, I wanted to mention that Instructable member, kz1o brought out some more information regarding the capacitors. Please see his comment below, dated February 14th, 2010 @ 10:52 am.

Update - This Instructable is on Hack a Day!

 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts needed

Parts needed
I bought my parts from Digikey and Sparkfun Electronics - they're 2 of my favorite places to buy components. Anyway, here's the list:

#1 - (Qty: 1) - ATMega328 chip with Arduino bootloader pre-installed ($5.50)
#2 - (Qty: 1) - 5VDC Switching power supply ($5.95)
(Note: If you don't use a switching power supply, you must add in a voltage regulator and a couple of capacitors...see below)
#3 - (Qty: 2) - 22 pF ceramic disc capacitors ($.24 / ea)
#4 - (Qty: 1) - 16MHz Crystal ($1.50)
#5 - (Qty: 1) - Power jack ($.38) (Optional)
#6 - (Qty: 1) - Breadboard (hopefully you have one laying around, but if not, here's one. ($8.73)
#7 - Small pieces of 22 awg solid wire. If you don't have any, you can probably pick some up at your favorite electronics store.

Total cost for above before tax/shipping: about $14 (not including breadboard).

Alternatives / options:

Option / Alternative #1:
If you want to use an existing power supply you have around the house, make sure it is between 5V - 16V. If you are not sure if it is a regulated switching power supply, then you must use the following components too:
#1 option - (Qty: 1) - 5V Voltage Regulator (or another similar 5V voltage regulator) ($.57)
and
#1 option - (Qty: 2) - 10 uF Aluminum Capacitor ($.15 / ea)
(See below reference links for how to hook them up)

Option / Alternative #2:
If you don't want to use standard items #3 and #4, you can replace those with:
#2 option - (Qty: 1) - 16 MHz Ceramic Resonator (w/cap) ($.54)
This part looks like a ceramic capacitor, and you hook the 2 outside pins up to where you would hook the crystal up (covered later in the Instructable), and the middle pin goes to ground. At least this is what I've read - I haven't tried it yet. But as you may note, it is a little cheaper to go this route. :)

Ok, let's start hooking stuff up!

« Previous StepDownload PDFView All StepsNext Step »
80 comments
1-40 of 80next »
Feb 16, 2010. 9:10 PMunixtippse says:
Great howto! Looks like a perfect way to cut much of the price for an arduino pro in a permanent installation by just using the bare-bones microcontroller. I didn't know that it's possible to buy the Atmega with pre-installed arduino bootloader. Sounds nice.
Mar 25, 2012. 11:16 PMCloudhail says:
If it says arduino compatible it will come to you with the arduino boot loader all ready on it.
Feb 17, 2011. 5:11 PMfotokid says:
This is exactly the tutorial I was looking but the ATmega chip is so large that I can't use it on smaller projects. Do you know if I can program a smaller chip using my arduino?
Feb 28, 2012. 10:04 PMscottinnh says:
You mean this?
http://hlt.media.mit.edu/?p=1229

It's a smaller avr chip, runs Arduino boot loader. Less capabilities of course..
Mar 7, 2011. 2:40 PMFoxtrot70 says:
This is what I have been looking for also. I have taken my setup Arduino 3 steps further. (It has not been with out a lot of difficulty, due to lack of feed back, as this has been an ongoing project for 3 months.) 1. Programming from the Serial I/O port of my desktop & laptop; 2 USB Programming via USBtinyISP Pocket Programmer from Adafruit from my desktop & laptop; 3. Interface board for the 8 pin dip chips ATtiny series using the USB Programmer from step 2. I hope to have my first instructable on these items posted shortly. I will answer questions as best I can until then.
Feb 21, 2012. 1:48 PMTxPilot says:
This is a fantastic Instructable! Very nicely put together! I do have one question though that is related to the capacitors for the power. You mentioned above "So I hooked up one 10uF capacitor near my power" . Could you elaborate on that a little bit? Was the 10uF capacitor placed across the VCC and GND (Physical Pins 7 and 8 on the ATMega328)? If not where exactly did you place this cap? Also, do you need a cap for the AVCC (Physical Pin 20 on the ATMega328) as well?
Feb 26, 2012. 10:47 AMTxPilot says:
Thank you for the reply. I did a little more research on this as well and thought I would post it here as well so anyone that runs across this would see the information. It sounds like two caps are recommended. These are being referred to as "Decoupling" or "Bypass" Caps. One across the VCC and GND (Pins 7 and 8) and another across the AVCC and GND (Pins 20 and 22) and it sounds like it is recommended that they be mounted as close to the pins on the ATMega328 as possible. (Make sure the the polarity is correct if you are using a polarized cap!) One of the explanations that I read about it says that this basically is was to pass any AC noise voltage to ground so that you are getting a clean DC voltage input. So getting the caps as close as possible to the pins makes sense in that you are basically cleaning up the noise at that point. .1uF caps are what is being used. A larger cap (10uF range) can also be used in the same way you did at the point where the voltage enters the breadboard or PC board. Hope this helps. :-) Cheers!

May 14, 2011. 2:47 PMcblizza1 says:
Could someone clarify this line:

"make sure you place it between the capacitors and the chip/microcontroller"

It was my understanding that each row of the bread board was a node in a circuit and it didn't matter what order (left to right) the leads are placed into it. Is this a correct understanding of nodes and rows on bread boards?

If so is there another reason the crystal needs to be between the capacitors and the chip?
May 31, 2011. 1:00 AMadam159 says:
I think he just means that you need to make sure that one cap is connected to each leg of the crystal rather than connecting both cpas to one leg
May 31, 2011. 1:05 AMadam159 says:
*caps
May 26, 2011. 7:56 PMJimmacle says:
Wonderful 'Ible. Easy to understand, and complete. I just recieved the parts from Sparkfun.com, and am about to try it out!
May 29, 2011. 7:37 AMJimmacle says:
It worked perfectly.
May 20, 2011. 5:39 AMmeyer_lanski says:
Awesome instructions, Thank you SO much for sharing! It hasn't been very long that I started playing with arduino and this definitely cleared up some questions I was having regarding multiple arduino projects with just one board.

I'd like to know, can this board be used with any chip or does it have to be an Atmega chip? Also, would you happen to know how to modify this board to so that batteries are used instead of power jack? I have a few projects in mind that require the use of batteries so it would help me a lot.

Thanks again for sharing!
Apr 27, 2011. 8:24 PMMahox says:
Does this also work with 20pF capacitors? Can't get 22pF over here...
Mar 27, 2011. 4:30 PMjohnpoole says:
1ST reply here.. this is the best i've seen, not because others miss points but you're just getting started. you had to learn and document the steps as you went.. the results are great.. if you want to read a little on that cap you added to the power side, google pie filter.. old school to take the ripple out of any dc power supply.. your hardware side build is clear and precise.. thanks, keep playing with this and one day bill gates will work for you.. lol
Oct 28, 2010. 3:50 PMpurpulhaze says:
Hey, what about the serial input? Where and how would you connect it?
Jan 22, 2011. 10:21 PMJohnBailey says:
At a guess.. You don't. This is for when you have done the programming, and built the project, and now you are ready to let it fly free with the smallest component count you can manage as a standalone boxed finished project.

All the pins are direct connections from the chip it's self anyway, so all you add are the external "non Arduino" components.
Sep 14, 2010. 9:24 AMbhunter736 says:
I could re-iterate the previous comments, I agree completely. I would like to add that your use of photos is fantastic. You have included enough quality visual information that someone could simply mimic what you have done and have success! Very nice. :)
Sep 13, 2010. 9:41 AMnoik says:
You made my day!, thanks, great information!
Sep 8, 2010. 3:24 PMZombieDUG says:
This is really great, and was exactly what I was looking for today! Opens up a LOT of possibilities for hobby micro-controllers and custom boards. Can't wait to play around with this! Keep up the great work!
Feb 16, 2010. 3:53 PMshad0w88 says:
Hey, i can't get the ATMega328 chip with Arduino bootloader preinstalled in my country. I can get the ATMega328 chip without the bootloader, what should i do?
Jul 27, 2010. 4:32 AMMuling says:
Hi, you could write your Arduino Bootloader with .. an Arduino :-D You just need to solder in a Header and connect a few cables. There you go: http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html I use that Method myself and it works great.
Jul 27, 2010. 6:24 AMshad0w88 says:
Thanks for the response, but i don't have an Arduino, others i would have used it to burn the bootloader.
Feb 16, 2010. 10:57 PMshad0w88 says:
Thanks, I'll probably have to go the parallel progammer way, cuz i don't have access to an FT232 Breakout Board, which is also probably not available. What should i do if i can't get a FT232 Breakout Board?
Feb 22, 2010. 8:12 PMCalcProgrammer1 says:
http://www.arduino.cc/en/Main/ParallelProgrammer

Build this, I built one because I didn't want to buy an expensive programmer for a small project, but I just keep on using it because it works great.  Follow that guide, it says how to build a cheap, easy to build programmer out of parts that you should easily be able to get a hold of.  You do need a parallel port on your PC, and I think you have to set it into a certain mode (in the BIOS), took a little while to get it working but I have used this to flash the Arduino bootloader on plenty of "plain" AVR chips.
May 25, 2010. 2:24 PMtoelle says:
I just did this following this instructable. This is the first time I've started an atmega outside of the arduino, and it worked 100%. It powered up, ran the blink sketch, and everything was successfull. Looking at this instructable first, it might seem like a lot of wiring, but it is actually incredibly easy to hook up. Thanks for this great instructable :)
Apr 3, 2010. 3:09 PMandrew101 says:
okay, i have some 15pf capacitors, and the datasheet for the microcontroller says they are within the correct range, but whenever they are in place, the arduino wont work..... I need this for a speedometer circuit, where it is measuring km/h from a slot sensor on a bike. its measuring time in miliseconds so i don't think accuracy will make a whole lot of difference. it works seemingly perfect when they are not in place.
May 21, 2010. 10:54 AMDerin says:
the caps are to make the quarts start oscillating every time you are fine without them but without them sometimes (very low chance) the quartz won't start oscillating
Feb 14, 2010. 12:48 PMbrunoxyz says:
you can also make your life easier by using this:
http://www.sparkfun.com/commerce/product_info.php?products_id=9420

instead of a crystal and two capacitors.

it worked great for me.
Mar 10, 2010. 2:35 AMRazorConcepts says:
Resonators like that are horribly inaccurate, I would not recommend using them unless what you are doing is not timing-critical. 
May 20, 2010. 9:04 PMSpitko says:
I'm interested to know what should be used for accurate resonators, and why this is (if you have time).  What kind of tolerances do poor ones exhibit, and what is considered accurate, or good, and by what standards?  Do you have a recommendation that is a "drop-in" solution for this circuit?
Apr 9, 2010. 2:45 AMsapc says:
can you put a 10mhz and a 6 mhz together somehow to create a 16mhz one, stupid local elctronics store doesnt sell them
Apr 16, 2010. 7:24 AMeshneto says:
 No, you can't add the frequencies. Get the highest you can below 20Mhz.

However, because the crystal generates the clock for the microcontroller, if you use a frequency other than 16Mhz you will get a wrong timing from the Arduino library.

Apr 9, 2010. 3:06 AMsapc says:
or could you use a 20mhz
Feb 14, 2010. 10:52 AMkz1o says:
I wanted to comment on the power supply and filter capacitor issues you mentioned early on.  Often you will see, and especially with power regulator chips, the need for two capacitors, such as a 100 uF capacitor and a 0.1 uF capacitor.  You may ask "why do I need 100.01 uF of capacitance?"  This is a reasonable question, but the answer requires more of an explanation.  The short version is that the 0.1 uF is good for bypassing the RF energy that you are trying to get rid of.  The 100 uF is good for bypassing the lower frequency energy that you are trying to get rid of.  Neither is good at doing both things, so you need both.

The moral of the story is that it's critically important to your success that you follow the data sheet's recommendations and also pay attention to what you see in the application notes.  Doing so will save you lots of headaches later on.

Keep this in mind: the power supply is usually the only element that can cause a complete systematic failure.  It is often the part that gets the least attention, with tragic results (depending on the project, of course).  Good luck! and remember to RTFM.
Feb 15, 2010. 7:35 AMdouglas.mauro says:

 >> and upload it to your chip

Could you describe this process/steps/etc.

Thanks!

 
1-40 of 80next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
11
Followers
1
Author:domiflichi