Program a standalone arduino

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to Yahoo BuzzAdd to Newsvine

Occasionally I get this question from the arduino forum: “How do I program a stand-alone arduino? (atmega328 chip with arduino bootloader)”. I have a few ways to do this:

1) Buy a USB-TTL converter and make sure your standalone has headers on GND/5V/Tx/Rx/Reset. Use the adapter to program or communicate with the standalone. This will cost you anywhere between $6 and $20, depending on where you get your adapter and whether it automatically resets the arduino for programming. If it doesn’t, you need to hit upload, then once the bytes information is displayed in Arduino IDE, hit the reset on the standalone to receive programming. The following one is sold at sparkfun.com for $15.

2) This option is free. Use an arduino board, remove its atmega328 chip. Then also make sure your standalone has headers on GND/5V/Tx/Rx/Reset. Then use jumper wires to connect the arduino board to your standalone and you’re good to go. You will have to have an arduino board all the time.

3) If neither 1 or 2 apply to you, say you don’t have headers on GND/5V/Tx/Rx/Reset but your standalone is sitting inside a socket. Remove the standalone chip and insert it into an arduino board to program. This is ideal if you want to program a bunch of chips before you start. It will be benefitial to have a ZIF socket. You can effortlessly mount and unmount the chips.

How do you program your standalone arduino chip?

I have had this question as you did. Here’s two simple and cheap ways to program your standalone arduino chip:

1. You can program it with an arduino board: remove the ATMEGA328 processor from your arduino board, connect the TX, RX, 5V and GND to your homebrew/standalone, and upload as a regular arduino board. That’s what I’ve been doing for at least a good part of a month before I told my cheap self go get a USB TTL board.

Here is a picture. In the picture, the blue and green are TX and RX that I connect to the standalone. The black and red are GND and 5V from the arduino main board. Notice I didn’t connect the 5V because I already have a battery on the standalone so only GND is needed. Also notice that the ATMEGA chip on the arduino is removed (it’s in the greenish standalone now). Just go to arduino IDE and hit upload!

 

2. The second way: you can also remove the processor from the stand alone and plug into arduino to program it, pop it off and put it back into standalone. A zif (zero-insertion-force) DIP socket may help. Here’s where to get one:

Sparkfun

You may need to exert a lot of force to push this sucker into the arduino mainboard. Good thing is you have enough clearance to do so.

Here is a picture: