You are on page 1of 8

Food

Living

Outside

Play

Technology

Workshop

ArduinoISP Bootloader/Programmer Combination Shield


by Superbender on December 4, 2012

Table of Contents
ArduinoISP Bootloader/Programmer Combination Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Intro: ArduinoISP Bootloader/Programmer Combination Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 1: What you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 2: Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 3: Creating The Strip Board Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 4: Populating the Stripboard (no main connectors yet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 5: Soldering the Main Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 6: Using the Shield to Upload the Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 7: Using the Shield to Upload a Sketch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Intro: ArduinoISP Bootloader/Programmer Combination Shield


I started recently to get interested in building Arduino based robots. Since it is a traumatizing process to take any creation apart, I am opting to keep mine alive and
kicking. To lower the cost of this strategy it seems obvious to switch from the arduino development board to selfbuilt arduinos - DIYduinos if you like - and keep the
original arduino for what it is meant for... development. See for DIYduino examples the stripduino , the paperduino , the self-etched-arduino , the paperduino perfboard ,
the palm arduino , and the breadboarduino . There are more out there, I am sure. Just start looking. However, making the cheapest DIYduino requires buying ATMEGAs
without bootloader. With those you need to load the bootloader and subsequently you can upload a sketch. This process can be done with a regular Arduino board and is
described in a number of tutorials such as the ArduinoToBreadboard tutorial .
Here in this instructable, my first by the way, I am introducing you to a strip board arduino shield that allows you to load either (i) a bootloader or (ii) a sketch onto an
ATMEGA using an Arduino board as the In-System Programmer (ISP) or as the USB to Serial interface, respectively. With this board all you need to do is set a few
jumpers and temporarily remove the ATMEGAx28 from your original Arduino to switch from one to the other.

Step 1: What you need


The first picture shows all the parts that are needed for building the bootloader/programming shield:
1) Stripboard, 0.1" hole distance
2) Quick connect IC socket
3) 10kOhm resistor
4 ) 5x2 & 1x3 Pin male/male connector with short/long legs, 0.1" hole distance
5) 1x8 & 1x10 Pin male/male connector with long/long legs, 0.1" hole distance (this may differ with the type of original arduino you are using)
6) 2 Cables with female/female connector
7) 2x 22pF Ceramic capacitor
8) 1x 16MHz oscillating quartz
9) 4x Jumper from for example an old motherboard
10) Jumper wires of various lengths
11) 1x ATMEGA328 or 168 to be programmed
The second picture shows the hardware that I used to put it all together.
1) Solder iron & solder
2) Carpet knife
3) Hand saw with skinny blade
4) File - not too coarse
5) Wire cutters
6) Fine tipped pliers
7) Sharpie Markers of different colors and pencil
8) Third Hand (made by following instructable by rstraugh ...thanks)
9) Track Cutter (made by following instructable by scraptopower ...much obliged)
10) Voltmeter with test leads
11) Paper printout of strip board pattern
12) Arduino with USB to serial chip (e.g. Arduino Uno ) for uploading the bootloader or DIYduino and for subbing in as a USBtoSerial programmer for uploading a sketch

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Image Notes
1. ATMEGA328 to program
2. jumper wires, based on 0.1" hole distance
3. strip board, 0.1" hole distance
4. male/male long/short connector
5. male/male long/long connector
6. female/female wire
7. 10k resistor
8. 22 pF ceramic Capacitors
9. jumper switches taken from old mother board
10. 16MHz Quartz
11. fast connect IC socket

Image Notes
1. solder iron and solder
2. carpet knife
3. small hand saw
4. third hand
5. voltmeter with test lines
6. markers & pencil
7. file
8. clippers
9. 4mm drill with handle
10. Arduino
11. paper with strip board design printed on it
12. fine tipped pliers

Step 2: Schematic
To create the strip board layout I first determined the schematic I wanted to create. You can essentially do a strip board design with any schematic no matter if you
invented it, downloaded it, or re-engineered it. In my case I took the connection layout given in the ArduinoToBreadboard tutorial for both uploading the bootloader as well
as uploading a sketch and combined them into one schematic adding a few switches. The result is shown in the figure. Note that the switches were realized using typical
motherboard jumpers.
Bootloader configuration (as shown in figure):
S1 is closed (i.e. Pins 11, 12, and 13 are connected to the Atmega)
S2 is switched to Pin10
S3 is open (i.e. Rx and Tx are not connected to the ATMEGA).
Sketch upload configuration:
S1 is open(i.e. Pins 11, 12, and 13 are not connected)
S2 is switched to Reset
S3 is connecting Rx and Tx to the ATMEGA328
The schematic further shows the connections of +5V and ground (GND), the 16 MHz oscillating quartz (Q) and its 22pF ceramic capacitors (C1), the 10kOhm pull-up
resistor (R), and of course the ATMEGA328.

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Step 3: Creating The Strip Board Layout


I took a paper copy of my empty strip board, which I am showing here only as a convenient download opportunity, and started to transfer the schematic onto the paper. I
prefer old school paper, but there are programs such as VeeCAD that you can use to create your strip board layout as well.
In the layout figure the ovals represent connectors or "jumper switches", the lines represent jumper wires, the dotted line represents the IC socket, and the red X and lines
represent track interruptions. I also drew the electronic components into the figure, the orange thing is the oscillating quartz.
To create this layout, I started with the connectors that connect the strip board to the Arduino, i.e. the long oval shapes on the lower left and right. These connectors
determined the maximum width I wanted to use.
I made a point in verifying if the holes of the strip board would line up with the connectors of my Arduino Uno R3. And guess what? They didn't. At least not all of them.
The connection section that contains Arduino pins 0 - 7, i.e. the Rx and Tx pins, was offset downwards with respect to the shown drawing orientation by 0.05". This made
it impossible to directly connect the strip board (0.1" hole pattern) to all Arduino connectors using a shield type approach. As an easy and actually convenient workaround
I decided to connect to Rx and Tx using cables as you'll see further below.
After fixing the connector locations, I placed the quick connect IC socket, then the wire jumpers and the other parts first on paper, then, to test things out, in reality. I tried
to make good use of the traces that were already on the strip board. That's the whole point of using a strip board in the first place.
Last I decided where to put the trace interruptions. In the layout figure an interruption is represented by the red X or the red/black line that divides switch S1. These are
drawn from the top, but are implemented from the bottom. Watch out to put them in the correct locations.
Note that there is one wire jumper placed below the IC socket. This wire jumper was shortened to not penetrate the board. It is only present at the track side of the board.
Also note that the figure of layout is correct, but the photographs may have an error or two, that I tried to highlight with pop-up notes. I had for example an extra track
interruption in my actual board. Easy to fix, but avoidable if you check everything carefully.

Image Notes
1. This is the oscillator quartz, the leads are located in two adjacent holes.

Step 4: Populating the Stripboard (no main connectors yet)


I double checked everything, although triple checking seems the way to go since I still had a few mistakes that squeezed by. However, I marked the locations of all parts
(red dots), the track interruptions (red crosses), and the outline of the board on the top of the strip board. In the figure the black marks are either old markings or errors
that I "blacked out" so that I could ignore them for what they were. Not too pretty but the marking did serve it's purpose. To recreate this layout, use the paper version
from step 3 and not the figures shown here, to avoid duplication of the errors that I had to fix.
I took my handsaw and cut out the outline of the shield strip board. With the file I deburred the edges and subsequently inspected all edges to ensure that no traces were
shorted.
Next I took my fantastic DIY track cutter and put all the track interruptions into the board. To not get confused, every now and then I stuck a wire through a marked hole
from the top to easily keep track of the correct locations.
To create switch S1 with old fashioned jumpers, I determined the location of the switch contacts and with the carpet knife carefully cut away the 3 traces between each of
the two connector holes. The 2 part connector was subsequently soldered on the board so that the jumper could bridge the interruption. I confirmed that the track was
fully interrupted by testing it with the voltmeter.
When all interruptions were completed, I moved on to put the jumper wires and the resistor on the board and soldered them to the tracks. I chose to populate the board
using the parts with the lowest height first. This allowed me to lay the board on its back for soldering. I gradually moved on to higher and higher components using the
same strategy until I was done.

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Image Notes
1. error: no track interruption here
2. black line: old = other project
3. black over red: corrections of error or on-the-fly changes in layout
4. red cross: track interruption on track side
5. red dot: one leg of something is placed here

Image Notes
1. error: no track interruption should be here

Step 5: Soldering the Main Connectors


I chose to use male/male connector pins with long pins on both sides (long/long) for the plug in connections to the Arduino. This created a little bit more offset to the
Arduino's USB cable jack and reduced the danger of shorts.
I inserted and soldered the connectors from the bottom of the board. First, I fastened regular scotch tape on top of the board at both connector locations as shown in the
figure for one connector. Then I placed the actual connectors in the Arduino and rested my shield on top held up only by the tape.
From below I tacked on the connectors at two pins with some solder. This allowed me to remove the shield from the Arduino and properly solder all connector contacts.

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Image Notes
1. scotch tape

Image Notes
1. Arduino used as holder for connector

Step 6: Using the Shield to Upload the Bootloader


The figure shows the shield in the bootloader configuration. Before using this configuration and upload the bootloader, however, you need to upload the ArduinoISP
sketch to your regular Arduino board without the shield attached. I used an Arduino Uno R3, which, according to some tutorials, may not be straightforward for uploading
a bootloader and may require some workarounds. You can find general information at this tutorial .
Summarizing the tutorials that are out there seemed to suggest that with an Arduino Uno you should use Arduino software version 0023 or earlier. You can get the
software from this link . You can also try to perform some simple software changes to make it work. If this is the case for you, check out the instructions in this link , or
these.
The general steps for uploading the bootloader are:
1. Connect Arduino only and start Arduino software.
2. Ensure in Tools/Boards that your Arduino board is selected.
3. Go to File/Examples/ArduinoISP to load the ISP sketch to your Arduino
4. Plug in the shield, make sure the jumpers are set correctly
5. If required, make the software changes that are necessary for your Arduino/Arduino software configuration. Try without first though. It might just work.
6. Go to Tools/Boards and for loading the bootloader to a
ATMEGA168 pick "Arduino Duemilanove w/ ATmega168"
ATMEGA328 pick "Arduino Duemilanove w/ ATmega328"
7. Go to Tools/Programmer and select Arduino as ISP
8. Go to Tools/Burn Bootloader
9. Wait
10.You'll see the message "Done loading bootloader" as an indicator for success.
I got it to work on my Ubuntu box with Arduino-1.0.1 software. I also got it to work on my MacBookPro with Arduino0023. I was quite happy with these results and left it at
that.
Good luck with your projects and hopefully this write up is of some use for you.

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Image Notes
1. bootloader configuration: S1 closed
2. bootloader configuration: S2 set to Pin10
3. bootloader configuration: S3 not connected to anything
4. bootloader configuration: ATMEGA328 plugged in and locked
5. bootloader configuration: shield connected to Arduino and Arduino's ATMEGA plugged in

Step 7: Using the Shield to Upload a Sketch


The figure shows the shield in the programmer configuration which is explained by the pop up notes. Before using this configuration and uploading a sketch to the
ATMEGA, however, you need to remove the ATMEGA that is connected to your Arduino. I agree that this is a little inconvenient. Why use a shield at all, when you can
just plug the ATMEGA that you want to program into the Arduino and program it there? A couple of reasons: 1) Standard IC sockets are not made for frequently plugging
and removing ICs. They are designed for the occasional swap of a broken IC. The more you plug and remove, the more likely you wear and tear your Arduino. 2) When I
kill my piggy bank I'll go ahead and buy a USB to Serial programmer. With such a device the shield allows me to upload a bootloader and program a sketch using the
same slick quick connect IC socket. That's the ultimate goal, but right now I use what I have.
The general steps for programming a sketch are:
1. Remove ATMEGA from Arduino board.
2. Plug in the shield, make sure the jumpers are set correctly and the cable is connected.
3. Go to Tools/Boards and for
ATMEGA168 pick "Arduino Duemilanove w/ ATmega168"
ATMEGA328 pick "Arduino Duemilanove w/ ATmega328"
4. Open your sketch in the Arduino software.
5. Hit the upload button.
6. Wait and see if it worked.
Good luck with your projects and I hope this instructable was of some value for you.

Image Notes
1. Programmer Configuration: All contacts of S1 open
2. Programmer Configuration: S2 set to Reset
3. Programmer Configuration: S3 connected to Tx (left) and Rx (right) using cable
4. Programmer Configuration: Shield connected to Arduino with removed
ATMEGA
5. Programmer Configuration: ATMEGA that you want to get programmed

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Related Instructables

Stripboard
Arduino shield
for
programming
ATtiny45 and
ATtiny85 by
nikkipugh

How to use
Arduino ISP
Shield 2.0
(video) by
mantaspats

Turn Your
Arduino Into an
ISP by mr_mac3

Compact 3-in-1
Stripboard
DIYduino with
Integrated
Sensor and
L298N Motor
Shield by
Superbender

Boot Bot
Arduino
Bootload Shield
by Revolt Lab

How to use
Arduino Mega
2560 as Arduino
isp by tsillen

Advertisements

Comments
3 comments

Add Comment

pfred2 says:

Feb 21, 2013. 3:43 PM REPLY


I see this it takes an Arduino to make an Arduino method a lot. It kind of makes me wonder how they made the first Arduino? Which came first, the Arduino,
or the clone? Why did the Arduino cross the road? See you on the other side!

Superbender says:

Dec 9, 2012. 7:54 PM REPLY


Hi Unmitigatedaudacity,
I meant the statement as written. It is referring to the content of a thread that discussed difficulties with using an ArduinoUno as ArduinoISP. Thinking about it
I assume that at the time of the thread Arduino1.0 may have been the latest software so they could only roll back. The authors there used Arduino0022 and
Arduino0023.
I got it to work with Arduino0023 and Arduino1.0.1 so maybe just Arduino1.0 didn't work. Also the platform you use seems to be a factor, because my Mac
and at least one person in another thread with a Mac did not run into these software problems.

unmitigatedaudacity says:
" use Arduino software version 0023 or earlier"
I assume you mean later, right?

http://www.instructables.com/id/ArduinoISP-BootloaderProgrammer-Combination-Shiel/

Dec 9, 2012. 1:32 AM REPLY

You might also like