Introduction: Standalone Arduino / ATMega Chip on Breadboard

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

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.

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!

Step 1: Parts Needed

Picture of 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)
#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!

Step 2: Hooking Up Power

Picture of Hooking Up Power

Go ahead and connect your power jack as shown in the first photo if you are using a power jack. Next, hookup a couple of wires as shown in the photo connecting the respective power (+ and -) rails together.

Step 3: Chip (microcontroller) Placement

Picture of Chip (microcontroller) Placement

Now we want to put the microcontroller on your breadboard as shown in the photo. If this is a brand new chip, you have to bend both rows of pins in a little bit. What I do, is I hold the chip from both sides, and press the chip a little bit against a flat surface like a desk, and do this on both sides so that both sides are bent in equailly.

You most likely won't have to do this if you're pulling your chip from your Arduino - they're already bent from being in the socket.

Please note the orientation of the chip - in the photos and for this Instructable, please place the chip so that the little half-round 'notch' is on the left.

Step 4: Bringing Power to the Chip

Picture of Bringing Power to the Chip

First hook up 3 wires as shown in the photo. One is going to be ground/negative (the black wire shown), and 2 will be to the positive.

If you can't tell which pins are being connected on the chip, look at the 5th image in this step which is a pin mapping that I pulled from Arduino's website to reference. Going by that, you can see that our ground/negative (black) wire is going to pin 22, and the 2 positives (the red wires) are going to pins 20 and 21.

Next hook up 1 more positive (red) wire and 1 more negative (black) wire as shown in the 3rd/4th photos (they're the same thing...just one is zoomed in more).

Again, if you can't tell, look at the Arduino mapping, and you can see that we're connecting our ground/negative (black) wire to pin 8, and the positive (red) wire to pin 7.

Step 5: Hooking Up the Crystal to the Chip

Picture of Hooking Up the Crystal to the Chip

Actually before we hook up the crystal, let's hook up those capacitors. Hook up those 2 22 pF ceramic disc capacitors to the chip as shown in the photo. They go right next to the negative/ground (black) wire. One leg (you don't need to worry about polarity) of the capacitor goes to the negative/ground rail, and the other to one of the pins on the chip. One capacitor hooks up to pin 9, and one to pin 10 on the chip.

Now for the crystal. Place one leg of the crystal at pin 9, and the other leg at pin 10...but make sure you place it between the capacitors and the chip/microcontroller. Refer to the photos.

That's it! You're actually done. The next 2 steps are optional. Now you can replicate what you had connected to your actual Arduino board to this standalone circuit. You'll want to reference the Arduino pin mapping from Step 4 to know what to hook up and where.

You can continue on to the next couple of steps for a little extra, and a test, or proof-of-concept for lack of better term.

Here's a quick video of the completed breadboard:

Step 6: (Optional) Power Indicating LED

Picture of (Optional) Power Indicating LED

This is a little 'trick' used by people, I understand, for troubleshooting purposes. You add an LED (and resistor of course) to the power part of the circuit, so that if your project isn't working, you can quickly identify if the circuit is getting power or not.

Just hook up your resistor (the one I used on mine, in the picture is a 510 OHM resistor) as shown in the photos. Remember with LEDs that they do have polarity - the short leg is the negative one, and the long one is the positive one. So make sure the short one is the one connected to the ground (black) rail.

One of the pictures shows the circuit plugged in, and the LED on.

There you go. Again, I'm not an expert, but it seems very logical that you would want to do this, and I'm going to do this step on the final version of my first Arduino project.

Read on to the next step if you want to see a real simple way of seeing if you've got everything on your breadboard right.

Step 7: (Optional) Quick and Easy Test

Picture of (Optional) Quick and Easy Test

Ok, you've got everything wired up, you know you've got power, but the question is, did you wire everything up correctly? Let's check.

For this you'll need a resistor, and LED and some code.

Wire up a resistor and an LED as shown in the photos. For this one, I used a 330 OHM resistor, and a red LED. Take note of how you plug in the LED - they have polarity - the short leg goes into the negative/ground rail, and the longer, positive lead goes to the ATMega 19. As before, if you're not sure what pin this is, refer to the Arduino mapping image in Step 4.

Now, you need to download the Arduino Sketch I've attached, open it in the Arduino software, and upload it to your chip. This will make Arduino pin 13 (but it's ATMega pin 19 as I mentioned in the previous paragraph) blink every second. It's from this great Getting Started with Arduino book I have.

Once you've hooked up your LED and resistor, programmed your chip, put it back on your breadboard, then you can connect up your power. You should get a blinking LED, which means you've hooked up everything correctly!

Below is a brief video of the circuit we just built with this blinking LED:

Step 8: Credits and Links

I hope you liked my Instructable and I hope it helps you. I know I wish I had something like this when I was first trying to figure this all out. I must say though I can't take all the credit - I must thank the Arduino product and website for making a great product. The Arduino website is a great source of information and is actually where I got a lot of information about the minimum required components to get a chip to work away from an Arduino board.

The other great source was at: ITP Physical Computing ... particularly the Arduino-specific web page.

And I can't forget the Getting Started with Arduino book that I mentioned in Step 7 - it was a great resource for getting me started with my Arduino.

And last but not least, if you've got this far, thank you for reading!


johanneschillan (author)2018-01-20

Hi, I've got a standalone board working. But I've run into a problem accepting external 5V digital signals. When I loop an output signal from the ATMEGA chip itself, the ATMEGA can detect the signal on an input pin. But when I use an external 5V signal from say a regulator through a switch, it is not detecting the signal. Does anyone know something I can try or if additional circuitry is needed for accepting external digital signals?

RyanKranz (author)2018-01-04

Hi, how do you upload code to the MCU? The breadboard has no input, and does the microcontroller support code straight from the arduino IDE? I have made what you decribed, but don't know how to make it do anything! Please be specific.

domiflichi (author)RyanKranz2018-01-06

Hi RyanKranz,

This circuit isn't to (re)program the MCU. It is meant to allow your MCU to run it's program *after* uploading your code from the Arduino IDE...without an entire Arduino board such as the Duemilanove/Uno/etc. You need to add extra hardware to this circuit to be able to upload code to it. Or you can pull the chip and pop it in a Duemilanove/Uno/etc to upload your code then put it back on this circuit.

AbduA6 (author)2017-12-09

How can I install the Circuit healt band

domiflichi (author)AbduA62018-01-06

I'm not sure about what your question is...

domiflichi (author)AbduA62017-12-09

I'm sorry AbduA6, but I'm not sure what you're asking...

jatinbatra (author)2013-12-21

How do you program the board ?

rajarshi (author)jatinbatra2018-01-03

i use original uno as isp programmer and dip socket with a lever to extract

domiflichi (author)jatinbatra2013-12-22

Hello. This is Instructable is meant to show you how to build a minimal Arduino circuit that you can use after you've programmed the chip. In order for you to program the chip on this breadboard, you would have to add some more components. Maybe someone else may want to chime in...

jatinbatra (author)domiflichi2013-12-23

What if I want to use Serial communication on breadboard, do I need a breakout board ?

ArifSae (author)jatinbatra2016-09-11

FTDI cable

Clapoti (author)jatinbatra2014-09-08

Late answer... but you can use an Arduino Uno to program the chip... just put the chip on the Arduino board, upload the sketch to your chip and remove it from the Arduino board to use it on your board... you need to buy a chip that has the boot loader on already though.

ArifSae (author)2016-09-11

using single chip as you are using arduino board

AllenPan3 (author)2014-11-19

everything worked out perfectly.

But how can I use the serial communication?

I am building a turbidity meter and need to calibrate it. I was trying to use the method described in , but I don't have an Arduino Duemilanove, only Arduino Uno.

ArifSae (author)AllenPan32016-09-11

Not preferable answer, but 2 ways to display info, either use lcd or use FTDI cable (if you are going to do lot of experimentation on bare arduinos)

Massimo Ciscato made it! (author)2014-11-19

I made it on a mini breadboard. It works perfectly. Thanks!

Actually, I was wrong using the 9v battery. The operating voltage for the ATMega is 1.8 - 5.5V. The range 5-16V indicated in step 1 refers to the Arduino board, not to the standalone ATMega.

ArifSae (author)Massimo Ciscato2016-09-11

so, you saved the chip or witnessed magic smoke ?

Dee Aye Why (author)2015-12-10

Shudnt the reset pin be pulled up to +5V?

DavidK166 (author)Dee Aye Why2015-12-21

I know that in TTL when you float a pin, it is high, so that's what I am assuming is happening here

Dee Aye Why (author)DavidK1662015-12-21

ah..that explains it..yea I went ahead and left floating and it worked..but now I know why..thanks!

DavidK166 (author)Dee Aye Why2015-12-22

Yeah, for stuff like this, just fooling around with the Arduino, you can leave it floating, but it can be unstable at times. So for mass production, they just pull it up.

ArifSae (author)DavidK1662016-09-11

Thank you for info, was just looking for this

domiflichi (author)Dee Aye Why2015-12-12

I haven't had to so far...

Thanks for reading!

J_mccrory made it! (author)2015-03-28

I made this using both the voltage regulator and the ceramic resonator. Works perfectly! Thanks!!

myddraall (author)2014-11-04

I would like to use your power option #1, but I don't see the instructions. It says they are under the reference links. Any help would be greatly appreciated.

domiflichi (author)myddraall2014-11-09

Hi, thanks for reading. It looks like the link I was referring to is dead. I apologize...I will remove the link. Check out the 'Adding circuitry for a power supply' section in the following link:
That's what I was referring to for 'Option #1' basically.

myddraall (author)domiflichi2014-11-10

Thank you very much

C0UTZ (author)2014-02-27

Just wanted to say you've made an excellent Instructable here! I do have one question though; my script randomly resets partway through and I was wondering if this behaviour could be a result of using differently valued ceramic capacitors at the crystal. I am currently using 33pf, since this is just what I had available at home. It makes sense to me that this would be causing it, but just wanted a second opinion before I make the 1hr trip into town. Thanks, and once again, nice work!

smurfi1989 (author)C0UTZ2014-03-10

The 22pf capacitors are actual recommended by the datasheet of the 16Mhz crystal so this is actually a standard..

domiflichi (author)C0UTZ2014-03-02

Thank you for the kind comments. To be honest, I am no Arduino/electronic expert. What you could do is post your question to the Arduino forums -

They're really great and knowledgeable over there.

jeffrey_stjean (author)2013-10-24

First of all: Great instructable! Very clear and precise instructions!

Second of all: I've ordered all the parts and I want to begin making this project to replace my Arduino in a project that I'm currently working on. Only problem is, the project uses the Adafruit WiFi Shield (CC3000). How would I go about adding this onto the ATMega 328 chip?

Thank you for the kind words. I'm sorry but I've never worked with the WiFi shield before. However, if you look at this page:
It looks like it tells you what connects to what. So you can just use jumper wires from the WiFi shield to your breadboarded Arduino (connecting them to the appropriate ATMega328 chip's pins on the breadboard). Check out Step 4 of my Instructable - the bottom right picture (pulled from Arduino's website) in particular - it shows you which physical ATMega328 pin correspond to the 'Arduino' pin name. Hope this helps.

Okay thanks a lot. That's what I was going to try doing but I wasn't sure if, in this project, all the pins that are on the arduino are also available when you re-create the arduino with the chip. What I mean is, since the wifi shield plugs into every port on the arduino, is there still every port when I make it using your instructable?

Yes all the same pins are still available (except for the ones that the wi-fi shield uses to talk to the Arduino/chip, although there may be exceptions to that) to you when you have the ATMega on the breadboard.

Okay thanks a lot :)

tiggman93 (author)2010-02-15

I believe that pin 13 has a built in resistor, but that may be on the p.c.b. itself.

TakashiMoto (author)tiggman932012-12-22

Correct, it's on the PCB next to the onboard LED.

TxPilot (author)2012-02-21

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?

KingCups (author)TxPilot2012-11-02

A polarized capacitor is commonly used on any power source, often an Electrolytic such as the 10uf. On a positive supply such as Vcc place the negative lead to ground and the positive to Vcc. This dampens ring and other fluctuations in the voltage which can cause instability in the function of the device. Also a smaller one such as a .1uf or .01uf ceramic may be added as they tend to act to dampen higher frequency spikes "noise" on the supply voltage. A clean power supply always has good filtering.

domiflichi (author)TxPilot2012-02-22

Sure, I'm not even sure if I hooked this up properly, but what I did was place the negative lead of the cap right after the negative lead of the jack so it's basically 'between' the jack and the power rail of the breadboard that's connecting to the ATMega328. And the same goes for the positive lead of the cap - it's lead goes between the jack and the power rail.
If this isn't clear enough, I could probably take a photo and post it here.
And if I have this hooked up wrong, I would greatly appreciate it if someone with more knowledge would point it out and guide us to the proper way of hooking it up.
Thank you everyone for looking at my Instructable and thank you for leaving comments. I apologize for not really answering questions here. I feel that I am not qualified to do so, so I've been standing back and leaving it to the experts. ;)

TxPilot (author)domiflichi2012-02-26

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!

Redgerr (author)2012-10-15

I don't know if it's been said but this is the new link for the arduino chip... the ATmega328 with Arduino Optiboot (Uno)

Great guide, am going to use it as soon as some more chips arrive!

fotokid (author)2011-02-17

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?

OCPik4chu (author)fotokid2012-10-15

There are plenty of different arduino compatible chips with varying amounts of outputs and features (and thus, size) You can get several of the common types with the bootloader preloaded from sparkfun's website or similar

scottinnh (author)fotokid2012-02-28

You mean this?

It's a smaller avr chip, runs Arduino boot loader. Less capabilities of course..

Foxtrot70 (author)fotokid2011-03-07

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.

cinciredsfan10 (author)2012-09-19

Thanks!! set it up today and worked perfectly. Had to add the capacitor across the power otherwise it freaked out. well done

elzurdo86 (author)2012-07-04

You could also set up the internal clock and eliminate the crystal from the setup :D . I have recently programmed an Atmega48 using Arduino as an ISP. I will make an instructable about it.

unixtippse (author)2010-02-16

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.

About This Instructable




More by domiflichi:Standalone Arduino / ATMega chip on breadboard
Add instructable to: