DIY Arduino or "The DIY-Duino"

 by robonerd
Featured
THIS ENTIRE TUTORIAL IS ALSO AVAILABLE ON MY WEBSITE AT
http://www.theparsley.com/arduino/diy/

To quote the Arduino website:

"Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."

I got one a while ago and life has never been the same. Here is the official website for Arduino: http://www.arduino.cc/

There are a bunch of tutorials that show you how to build your own Arduino on a breadboard, called Hack-duinos or something similar. While these are handy, I prefer to use more solid electronic devices. So I build them with a home made PCB and solder all the components on there myself.

Some may say, "This task seems time consuming and a tad expensive... Why not just kerplunk the 30-some-odd bucks for an REAL Arduino?" Well, some of us enjoy the craziness of making something completely from scratch -- and in doing so, learning more about the device you are using.

This tutorial will take you through all the steps of making your own printed circuit board(PCB), building an Arduino or "DIY-Duino" and loading your own programs/sketches onto the board you have built.

Step 1: Materials List -- For All Steps

A04.JPG
COMPLETE MATERIALS LIST
You will find detail on these materials throughout the specific steps of this instructable.

// ------- PCB MATERIALS LIST ------- //
Copper Board: 12" x 12"
You can buy a smaller board, if you want.
I buy the 12x12 because I use it for a lot of projects.
http://www.parts-express.com/pe/showdetl.cfm?Partnumber=055-140 

DIY-Duino Pattern sheet
Click here to download the Pattern file
You must use this file to ensure the proper resolution and size of the image.

Photo Paper
High-quality photo paper with a glossy finish is the best to use.

Laser Printer
Or copies from a place like Kinkos or Staples.

Fine grain sandpaper
To rough up the board and make it able to absorb the pattern better.

Common, houshold tape
For securing the pattern to the copper board

Piece of scrap cardboard
This will be your makeshift ironing board.

Paper towels
To put over your board before ironing.

Clothes Iron
Use one you don't mind being ruined.
Chances are, it will get funky.

Plastic container
To bathe your board in warm water after ironing.

Tweezers
Not necessary, but can be helpfull for peeling off transfer remnants.

//------- ETCHING MATERIALS LIST -------//
Jug of Muriatic Acid
You can get this at the hardware store.

Container of Laquor Remover
Removes the toner once the pattern is etched.
Also useful if you make mistakes on transfering your pattern.
You can remove the toner and try again.
You can get this at the hardware store

Container of Hydrogen Peroxide
Any Grocery Store

Standard kitchen paper towels
Use for the ironing, agitating the acid solution, and removing the toner with the lacquer remover

(2) Plastic containers
(1 for the acid mixture, one to rinse, one to bathe the PCB in hot water)

Acid disposal container
Size this, depending on how much you're using.

Pair of plastic dishwashing gloves
You can often find a better, more durable pair of gloves at the hardware store -- right near the muriatic acid oddly enough.

Other Protection
Breathing and eye protection.

Package of photo paper
I if you have access to a laser printer or laser copier. Otherwise, skip this.

1/4 Cup Measuring Cup
Use one that you don't mind being destroyed. Once you use this to measure out the Muriatic Acid, It should only be used for this purpose. NEVER use it to measure food again.


//------- DIY-DUINO COMPONENTS LIST -------//
(3) Little bits of wire


DIP Sockets Solder Tail - 28-Pin 0.3"
http://www.sparkfun.com/products/7942
$1.50

ATmega328 with Arduino Bootloader
http://www.sparkfun.com/products/9217
$5.50

Basic LED - Green (or whatever color tussles your vessel)
http://www.sparkfun.com/products/9650
$0.35

Resistor 330 Ohm 1/6th Watt PTH
-- 220 Ohm will work fine too if you have one
http://www.sparkfun.com/products/8377
$0.25

Resistor 10k Ohm 1/6th Watt PTH
http://www.sparkfun.com/products/8374
$0.25

Mini Push Button Switch
http://www.sparkfun.com/products/97
$0.35

(2) Electrolytic Decoupling Capacitors - 10uF/25V
http://www.sparkfun.com/products/523
$0.45x2=$0.90

Voltage Regulator - 5V
http://www.sparkfun.com/products/107
$1.25

(2) Capacitor Ceramic 0.1uF Crystal 16MHz
http://www.sparkfun.com/products/536
$0.95

(2) Capacitor Ceramic 0.1uF
http://www.sparkfun.com/products/8375
$0.25x2=$0.50

(3) Female Headers
You'll need to cut them, and it's a little trickey...
http://www.sparkfun.com/products/115

(4) Standoffs
From Radio Shack or
From Sparkfun

//------- PROGRAMMING MATERIALS LIST -------//
FT232RL USB to Serial

http://www.sparkfun.com/products/718
$14.95

A breadboard
4 short wires
4 longer wires
An LED-- to test if your upload was a success


//------- TOOLS LIST-------//
Dremel or Hacksaw
I suggest buying a Dremel or other rotary tool for this instructable, you will probably need a Dremel to drill the holes.

1/32" Drill bit
I don't know of one of these for a normal drill, neither did the lady at Lowes -- again... Dremel

Metal-cutting disc for Dremel
To cut out the copperboard

Solder
Flux
Desoldering braid -- for errors!
Soldering Iron
Soldering Gripper

Step 2: About making PCBs

Just as there are several ways to build your own Arduino, there are likely just as many, if not more, ways to create your own printed circuit board or PCB. This tutorial opens with an in-depth lesson on how to make your own. I've tried several methods of making PCBs, and what follows is a procedure that has worked the best for me.

A little background first... People who are new to making their own PCBs often call this method "The Toner-Transfer Method".
When searching for how to make your own PCBs on the Net, this is the phrase that will often come up.
However, those who have been making these for a while will correctly call it the "Gootee Method" -- and the PCBs themselves are called "Gootee Boards". The reason is this -- the most in-depth documentation on how to etch your own PCB (at least that I know of) has been compiled and tested by Thomas Gootee.

See his website: http://fullnet.com/~tomg/gooteepc.htm

The PCB you will be making in this instructable is founded in Gootee's teachings, with a few differences/deviations.

Step 3: Transfering the Pattern - Materials

Copper Board: 12" x 12"
You can buy a smaller board, if you want. I buy the 12x12 because I use it for a lot of projects.
http://www.parts-express.com/pe/showdetl.cfm?Partnumber=055-140

Photo Paper
High-quality photo paper with a glossy finish is the best to use.

Clothes Iron
Use one you don't mind being ruined.
Chances are, it will get funky.

Piece of scrap cardboard
This will be your makeshift ironing board.

Arduino Pattern sheet
Download the Pattern file here
You must use this file to ensure the proper resolution and size of the image. You don't want to print and etch your board and have it be the wrong size.

Paper towels
To put over your board before ironing.

Plastic container
To bathe your board in warm water after ironing.

Common, houshold tape
For securing the pattern to the copper board

Tweezers
Not necessary, but can be helpfull for peeling off transfer remnants.

Fine grain sandpaper
To rough up the board and make it able to absorb the pattern better.

Step 4: Cut out the copperboard and sand it

Cut out the board
Protect your eyes.

Use your dremel or a hacksaw and cut out the shape for your board.

Give yourself some space around the edges. I usually give myself about a 1/4 inch extra margin. Mostly, because I often add in risers or spacers when I'm done at each of the corners.

Spacers are good to use, because they keep your soldered bits off of the table or ground or any other surface. They protect your board from getting fried if it happens to come to rest upon a metal surface.

Now sand the board
Sand the top of the copper with a fine sand paper. This gives it some more surface area for the toner to stick to.

Sand the edges too, because sometimes they can be sharp, and you don't want to cut yourself.

It's far easier to assemble a board when you don't have bandages on your fingers.

Step 5: Preparing the pattern

If you have access to a laser printer or a laser copier, fantastic. If not, no problem, you'll let Staples or Kinkos or another copy place do that for you.

If you HAVE access to a laser printer:
Put your photo paper in the printer and be sure that the glossy side is oriented correctly. You need the image to be printed on the glossy side. If possible, set the printer to print out with the maximum quality/toner thickness available. Print the Pattern file. Try not to touch the image area or get anything else on it. Any oils, abrasions or anything else will hamper the transfer.

If you DO NOT HAVE access to a laser printer:
Print the Pattern file. Try to get the best, darkest quality printout possible. Bring the printout to your local copy store and have them make laser copies of it on high-quality photo paper. Explain to them what you are attempting to do with these copies. Occasionally, there will be someone working there that knows or has heard of what you're doing. Try not to touch the image area or get anything else on it. Any oils, abrasions or anything else will hamper the transfer.

Prepare the pattern
Cut one of the patterns out. On 3 sides, trim close along the edge of the pattern. On one side, leave a little tab for you to hold on to. Again, you don't want anything to touch the image.

Step 6: The Transfer Procedure - Preparations

Transfer preparation/things to get ready
Heat up your clothes iron, put it on the hottest setting -- High/Linen. With no steam. We want this sucka HOT! It's good to start your iron heating up while you get the other stuff ready. Be careful not to burn yourself or anything else! Be carefull to turn the iron off when you're done!

Step 7: The Transfer Procedure

Get a plastic container, large enough so the PCB can lay flat, I use a sandwich container, and fill it with hot water. This will bathe your PCB after your transfer the pattern.

Step 8: The Transfer Procedure

Cut out a piece of scrap cardboard for your ironing board.

I use pieces of cardboard box, usually just cutting off one of the flaps.

Place your cut and sanded piece of copperboard in the middle of the cardboard with the copper side facing up.

Lay your pattern face down on the copperboard.

Take a couple pieces of tape and secure the pattern to the copperboard.

Place a papertowel over the top of the copperboard.

This should protect your iron from the gunk that is created when you heat up the paper -- but I'm not making any promises.

If you don't want to ruin your iron, don't use a good one. You can usually get one cheap at a yard sale or a new one for less than $25.

Step 9: The Transfer Procedure

Transfering the Image
When the iron is heated up, press down FIRMLY on the top of the papertowel, pattern and copperboard.

Hold it in place for one minute.

After a minute, remove the iron.

You should be able to make out the edges of the board through the paper towel.

Use the tip of the iron to go over the board bit-by-bit.

Take another minute to be sure you apply heat to each part of the board...

Go up and down, side to side and left to right.

Pay special attention to the edges.

In my experience, the edges are where the board/image gets the least ammount of heat.

Finally, for one more minute, hold the iron on the board again to finish up.

Caution, the board will be very hot!

Peel the paper towel off of the top.

If some papertowel sticks to the top, it's ok. This will loosten and be easy to remove in the water bath.


Step 10: The Transfer Procedure

Time for a bath!
Place the board, face up in the plastic container of warm water and let it bathe for 10 minutes.
After 10 minutes, peel the pattern paper off.

In my opinion, the ironing the trickiest part of the entire procedure... If you've done a good job at ironing, the entire paper will peel off and you will be looking at a shiny copperboard with the black laser toner transfered onto it.

However, this will not likely happen. Do not be discouraged! What will likely happen is one of two things:
1. You peel the paper back and some or all of the paper comes off, but the pattern was not totally transfered either.
2. You peel the paper back and only some of it comes off, leaving behind some paper and a thin plastic.

In case 1:
You haven't completely ironed the toner and it hasn't transfered to the board.

You are sadly out of luck -- only for the moment though. You will need to start again.

Hey, at least you have the copper cut out, right? And practice makes perfect... the best way to be an expert at something is to be a complete failure at it first.

The board on the left isn't totally messed up. In fact, I fixed it with a Sharpie... see below on how this works.

But you can see where the toner didn't completely transfer over to the board. On the left corner, the toner is faded -- thats because it's still stuck to the paper.

Now, the board below that one is a total mess. It's one of the first boards I ever tried to make. I'm not sure why I still have it, maybe just to show in this tutorial. You can see that its kind of corroded from sitting around. The main thing to look at is that the toner didn't transfer too well.

If this happens to your board, put it back into the water and let it soak over night. You'll easily be able to peel everything off in the morning.

After all the paper is removed, take some lacquor remover, dampen a papertowel with it, and wipe away all the toner.

Re-sand the copperboard, so that it looks clean and new and start again. Don't sweat it, you'll get it, trust me!

In case 2:
You're left with some paper still stuck to the board. You may notice that there is a thin plastic layer that is sticking to the copper. This is what the pattern image was originally transfered on to.

You may also notice that there is some "plain" paper that comes off easily. Take your thumbs and rub off what you can of the "plain" paper.

Soak the board in the warm water bath for a nother couple minutes. Return and try to rub off more of the "plain" paper.

Eventually you'll be able to get everything off.

The photo has only a little of the plastic stuck to it. You can use your fingernails to peel off the plastic, because the transfered toner resists being chipped by your nails fairly well.

I also find that using some tweezers to peel off the thin plastic works too. BE CAREFULL though with the tweezers, because it IS possible to chip the pattern with them.

Also, you need to get ALL OF THE PAPER AND PLASTIC off of the board for the etching to work thoroughly. Often, I just remove what I can of the "plain" paper and then set the board in the bath for a couple hours.

When you return, you'll find that the plastic does not stick so much to the board and you can peel it off easily. Again, you can use tweezers, but use them carefully.

Step 12: Etching - Materials

Jug of Muriatic Acid
You can get this at the hardware store.

Container of Laquor Remover
This is for if you make mistakes on transfering your pattern.
You can remove the toner and try again.
You can get this at the hardware store

Container of Hydrogen Peroxide
Any Grocery Store

Standard kitchen paper towels
Use for the ironing, agitating the acid solution, and removing the toner with the lacquer remover

(2) Plastic containers
(1 for the acid mixture, one to rinse, one to bathe the PCB in hot water)

Acid disposal container
Size this, depending on how much you're using. See below on disposal.

Pair of plastic dishwashing gloves
You can often find a better, more durable pair of gloves at the hardware store -- right near the muriatic acid oddly enough.

Other Protection
Breathing and eye protection are essential.

1/4 Cup Measuring Cup
Use one that you don't mind being destroyed. Once you use this to measure out the Muriatic Acid, It should only be used for this purpose. NEVER use it to measure food again.

Step 13: Etching - Precautions

First, some precautions
Muriatic Acid is very dangerous, both to breathe, and to get on any part of your body. It will also destroy most of what it comes into contact with, metal, clothing.

Most important, protect your skin and eyes. I ALWAYS wear goggles and it's not even an option to not use plastic gloves.

Put on your eye protection. Put on your protective gloves. Put on your breathing protection. Make sure you are not wearing clothes that you want to keep clean. Chances are they will be ruined. It is best to do the etching outside, in a garage or basement, or in a bathroom. Somewhere where if you spill a little acid, it won't hurt anything.

If you can't do your etching outside, do it in a well-ventilated room, and be sure to protect anything you don't want completely ruined from the acid.

Basically the only thing that won't be runied by the acid is plastic.

Step 14: Etching - Preparations

The containers
You will be using 3 containers. One container will hold your etching solution, the second will hold hydrogen peroxide only, and the third will be used to discard your solutions in a safe and proper manner.

The hydrogen peroxide container will be used to rinse off your board after it is finished etching.

Now, prepare your etching solution
The mixture is 1 part Muriatic Acid to 2 parts Hydrogen Peroxide.

Use the 1/4 cup measuring cup to portion out one 1/4 cup full of Muriatic Acid and two 1/4 cups full of hydrogen peroxide into one of your plastic containers.

Step 15: Etching - The Procedure

Check the copper board to be sure you have removed all traces of the photo paper.

You should have checked it over and made sure that all of the traces are completed, and there are no chips that would make an incomplete circuit.

If there are any chips or scratches, fix them with a Sharpie as described earlier.

Lets start etching!
Gently place the board into the etching solution.

You will notice that the etching solution begins to change color.

This is the acid reacting to the copper and starting to dissolve it.

Agitate the container gently, so that the etching solution mixes over the submerged board.
Use a paper towel to wipe the board while it's submerged.

This helps along the etching process.

After about 4 minutes, you will notice that the copper will begin to dissolve.
Continue to wipe areas where there is still copper.

After about 5 minutes, your board should be completely etched.

The etching solution will have changed to a green color after reachint with the copper.

Remove the board and rinse it in the second container, the one that has just hydrogen peroxide.

This will dilute the remaining acid.

Now, it's not the best thing in the world to do, but we've diluted any solution still clinging to our board and most of the copper that has dissolved into the solution is diluted as well. So... take your board and rinse it under some water.

Here is what you should have.

You will notice in the photo attached that there is still some copper in the top right corner.

This should be ok.

But if this happens on your board and you want to remove it, just gently sand it off. Be careful not to sand off anything you don't want to!

The final step is to use lacquer remover to get the toner off.

Put some lacquer remover on a paper towel and wipe off the toner.

Do your best to get all of the toner off.

Your board should look like the final photo attached.

Rinse this puppy off once more and get ready to drill the holes for the components.

Step 16: Drilling Holes for the Components

Up until now, you could get by without a Dremel or other rotary tool. It may have been trickier, but do-able.

However, I must say, I can't imagine getting past this part with a normal drill.

First, I don't think they even sell 1/32" drill bits for normal drills. Second normal drills are just too cumbersome to do this delicate work. One slip and you've ruined your precious PCB.

So, do yourself a favor and score a Dremel or rotary tool. They are usefull for many more things than just making PCBs!

Put on your eye protection and carefully drill your holes.

Be carefull with both the PCB and the drill bit itself.

A 1/32" bit is really not much larger than a sewing needle and easy to break.

It's a pain to get half way through drilling and snap a bit. Then you either have to go to the hardware store and get another, or order one online. The hardware store near me doesn't even sell individual bits, they're in a package of different sizes. So it's $10 for one bit and five that I already have like three sets of.

If you order them online, you can buy them in a small cannister of 4. I think I paid $5 for one cannister. It's good to have extras, eventually you will break one.

Anyhow, carefully drill out the holes for your components. Start by drilling through the copper side. Then turn the PCB over to the plastic side and drill through the holes you've made -- just to be sure you have it going through clean.

Hold your PCB up to the light and check that you've drilled everything.

On this board, I've drilled places to add risers in the corners. It's a good idea to have these, so your board isn't sitting on the table and resting on its solder points.

Pat yourself on your back, you're now ready to assemble the components.

Step 17: Putting It All Together - Materials/Components

DSCF2230.JPG
DSCF2233.JPG
(3) Little bits of wire

DIP Sockets Solder Tail - 28-Pin 0.3"
http://www.sparkfun.com/products/7942
$1.50

ATmega328 with Arduino Bootloader
http://www.sparkfun.com/products/9217
$5.50

Basic LED - Green
http://www.sparkfun.com/products/9650
$0.35

Resistor 330 Ohm 1/6th Watt PTH
-- 220 Ohm will work fine too if you have one
http://www.sparkfun.com/products/8377
$0.25

Resistor 10k Ohm 1/6th Watt PTH
http://www.sparkfun.com/products/8374
$0.25

Mini Push Button Switch
http://www.sparkfun.com/products/97
$0.35

(2) Electrolytic Decoupling Capacitors - 10uF/25V
http://www.sparkfun.com/products/523
$0.45x2=$0.90

Voltage Regulator - 5V
http://www.sparkfun.com/products/107
$1.25


Crystal 16MHz
http://www.sparkfun.com/products/536
$0.95

(2) Capacitor Ceramic 0.1uF
http://www.sparkfun.com/products/8375
$0.25x2=$0.50


(3) Break-Away Female Headers
These are not really break-away.
You'll need to cut them.
http://www.sparkfun.com/products/115

(4) Standoffs
I got the ones pictured at Radio Shack
Here's a link for some from Sparkfun


Solder

Flux

Desoldering braid -- for errors!

Soldering Iron and a second set of hands helps out in a major way!

Step 18: Putting it Together

I have drawn up a little diagram of where all the components are supposed to go. And I have also included photos of the board as the components are added.

Here is a simple diagram of the finished setup, complete with the pin locations. Follow the pictures coming up to put the board together correctly.

In this Instructible, I will hope that you are decent at soldering. It is not my goal here to teach you how to solder.

There are a bunch of tutorials an pointers out there on how to solder properly.

Here is one of my favorite pages:
http://www.ladyada.net/media/common/soldering.pdf

Step 19: Putting it together

First, you have the naked board.
It should be oriented with the copper facing away.
You will be soldering the components on the plastic side only, NOT the side with the copper.
Put the leads of the components through the board and solder them to the copper.
The places where there are squares should be where the ground/negative lead of the component are soldered.

Start by soldering the DIP Socket for the ATmega328.
DO NOT solder in the actual chip.
It is always a good idea to use these Sockets, because you can remove your chip if you want to use it in another board or project or whatever. And desoldering them is a royal pain.
Note the area where there is a little oval cut out.
This is to let you know how the chip should be oriented.
When you finally put your ATmega chip into the socket, you want to place it with the oval facing up.
The top left of the chip is the reset.
If you don't put the chip in right, nothing will work.

Add the capacitors and the voltage regulator.
Important: The capacitors have a little white bar on one side. This is to let you know where to attach it to the ground.
Attach the side with the white bar to where the square pad (ground) is and the other to the power.
Do this for both of the capacitors.
The voltage regulator needs to be soldered with the back of the "chair"/ the tall metal part facing out.
You may need to file a little of the legs off of the voltage regulator, as the leads are often squarish and flat.

Add the little wires.
You have three wires. It doesn't really matter what color they are, as I'm sure you know. Just as long as you know where they are supposed to go.
For this circuit, you'll solder wires to span and attach to two grounds and one voltage.
The white wires in the diagram are for ground and the red wire is for power.

Add the .1uf ceramic capacitors (2 of them) and the 16nHz crystal.
It does not matter how the ceramic capacitors or the crystal are oriented.
The crystal is a little wider than we need for this board, so you should bend the leads so that it will fit in snugly at the bottom. You don't want any components dangling.

Add the resistors.
The resistors are 10K Ohm and 220 Ohm.
The 10K Ohm resistor is banded brown, black, orange and gold and will provide resistance to the button.
The 220 Ohm resistor is banded red, red, brown and gold and will provide resistance to the LED.

Add the LED and button.
The LED will light up and tell us that the board is getting power.
The button will allow us to reset the board.
Some buttons have 4 leads, we only need two of them, so you can snip the extras off if you have four.
Be sure to insert the long leg of the LED into the power, and the short leg into the ground(the square pad).

Add the female headers.
It's not really necessary to have all these headers.
Personally, I like to have a voltage and a ground for every usable pin on the chip -- especially next to the analog pins.
But, I suppose as long as you have one extra voltage and one extra ground out, you are good.

Add the power supply.
And you're done.
There are a couple different ways to connect to a power supply.
I'll write a little about that in the next step.

Step 20: Getting power

Depending on your preference, you can create a bunch of different power supplies for your board. Check out the photos attached to see some options.

There are a bunch of wall plugs you can buy, but be careful of it's output, because you risk toasting your board.

You want a 9V DC 100-500mA power adapter, one with a 2.1mm barrel plug and positive tip. I don't have one, because I use mostly rechargable 9volt and AAA batteries.

There are many tutorials on how to wire a DC power jack, if you don't know how to do it.

Step 21: Programming - Materials

If you already have an Arduino, you can follow the details on how to use it as an In-System Programmer (ISP) here:
http://arduino.cc/en/Tutorial/ArduinoISP

However, you will need to modify your board to be able to accept a line from the Arduino's Reset to your boards Reset.

Personally, I like to use the FT232RL USB to Serial. I think it's easier and iIt's just become habit for me.

FT232RL USB to Serial
http://www.sparkfun.com/products/718
$14.95

I can't remember if mine came with the male headers, so you might want to get some of those too.

You will need:
The board you created above
Breakout Board for FT232RL USB to Serial
A breadboard
4 short wires
4 longer wires
An LED-- to test if your upload was a success

Step 23: Programming

02.JPG
Set up your FT232 on a breadboard like this photo.

The wire on the top left is TXD and will go to pin 0 (RX) on your board.

The wire on the bottom left is RXD and will go to 1 (TX) on your board.

The wire on the top right is ground and will be attached to a ground line on your board.

The wire on the bottom right is VCC and will be attached to a power line on your board.

Step 24: Programming

The first photo is how the connection looks.

The second is a close up of how the wires are plugged into your board.

The red wire is VCC -- power.

The Black wire is ground.

The yellow wire is TXD and is connected to pin 0 on your board.

The orange wire is RXD and is connected to pin 1 on your board.

Step 25: Programming

Open the Arduino Software.

If you do not have the Arduino software, download it here http://arduino.cc/en/Main/Software and follow the instructions for setup.

Go to File >> Examples >> Basics >> and open the Blink sketch...

Or any other sketch of yours.

If you are going to use the Blink Example, plug a LED into pin 13 on your board. The long leg goes to pin13 and the short one goes to ground.

Step 26: Programming

You need to be sure you are set to the right chip/board.

Otherwise you will get an error when trying to upload your sketch.

Go to Tools >> Board >> and click on the the chip you have in your board.

In this case, we have the ATmega328.

Step 28: Programming

When the software says "Binary sketch size: 1018 bytes (of a 30720 byte maximum)"press the reset button on your board.

You only have a couple seconds to do this, otherwise your upload will fail and you will get an error.

When the program is sending the sketch over, the RX and TX lights on the FT232 will go all blinkey for a couple seconds.

When they stop blinking, you will get a "Done Uploading" message and the LED will begin flashing.

Step 29: Programming

Success!

You have successfully created your own PCB, assembled your own DIY-duino, and programmed the board.

Awesome!

If you put one together, post a photo.

Also, if you encounter any problems, post a comment and I'll do the best I can to help you.

HAVE FUN!!!!!!!

Step 30:

Some Good Resources:

My DIY-Duino Page

Here is a link to my page where I also have this tutorial detailed
http://www.theparsley.com/arduino/diy/

The Official Arduino Page
http://www.arduino.cc/

Sparkfun
Good place to get supplies and learn
http://www.sparkfun.com/

Ladyada
Another great site with a wealth of information and products
http://www.ladyada.net/


PCB-123
A good program to design patterns for your own boards. Download the FREE program below:
http://www.sunstone.com/pcb-resources/downloads/ThankYou.aspx?ID=14
1-40 of 176Next »
bacho1313 says: Apr 4, 2013. 6:47 AM
hi!
great tutorial!
i have a question. i have other USB to Serial (232) not FT232. can i upload sketch with this?
sorry for my english.
robonerd (author) in reply to bacho1313Apr 5, 2013. 5:37 AM
Thank you, I'm glad you liked the tutorial. Sorry to say though, I'm not sure if this will work or not. I have only tried with FT232. I often just upload the final arduino sketch to an actual arduino then swap out the chip to the DIY board... just because I'm lazy these days and it's easier than wiring everything up! ;-) Sorry, I wish I could be more of a help to you. Maybe ask on the arduino forum? there are usually very friendly and helpful people there.
apburner says: Mar 21, 2013. 7:57 PM
Wow. that is a pretty board
ahmad2370 says: Jan 2, 2013. 5:22 AM
how to burn Arduino bootloader to a fresh ATMEGA328???
dankasolutions says: Oct 31, 2012. 8:54 AM
Hi,

Thanks to hard work of Robonerd, I've built successfully Duino board for myself. It works well with the chip ATMega 328P-PU which I get out from Arduino Uno ( I've tested Duino with Blink example).

However, I couldn't upload my sketch directly into my board Duino through FT232 breakboard which I get one from my local supplier (link for ref: http://www.tme.vn/Product.aspx?id=866#page=pro_info). I've followed their guide ( http://www.ftdichip.com/Support/Documents/InstallGuides.htm) to install driver for FT232 breakboard and it showed me as USB Serial Port (COM5).

I have tried many ways even I soldered wires directly to TXD and RXD on FT232 as well as I chose all the board types in Arduino (1.0.1) from menu Tool but it doesn't work. Please help me to answer some questions:

1/ Is there any way to know the FT232 breakboard has good operation or not?
2/ I see there is a soldering jumper on FT232 breakboard, so do I need to solder this jumper?
3/ Is there other way to upload sketch into Duino?

Thanks.
IMG_20121029_200423.jpgIMG_20121031_205919.jpgIMG_20121031_213933.jpgIMG_20121031_214037.jpgIMG_20121031_215213.jpg
dankasolutions in reply to dankasolutionsNov 1, 2012. 6:03 PM
Last night, I've tried many ways but it didn't work. Firstly, I've tried to push the reset button timely. Then I've followed the guide from here (http://arduino.cc/forum/index.php?topic=102984.0) by adding pullup 2 resistors 1K to pin 2 & 3.
Finally, as a last resort I used Arduino board for uploading sketch, it worked. (http://arduino.cc/en/Tutorial/ArduinoToBreadboard).

I think the problem for uploading error may be caused by my FT232 breakboard. I'm still finding another way to uploading sketch. I would highly appreciate any your solutions for my problem.

Thanks.
robonerd (author) in reply to dankasolutionsNov 2, 2012. 9:11 AM
It's difficult to say where the issue is. I have had some chips that actually seemed like they didn't want to be programmed by the FT232, and others that have had no problem. My solution is to just use the arduino to load the sketches. Not the best solution, I'm sure! I'm not sure if the jumper solder would be the answer. But it is possible.... On my FT232, I have soldered pins to it, and not jumper wires. Maybe another person could provide an answer in the arduino forums? I'm sorry I have nothing to help!!!!
Nequito says: Oct 24, 2012. 11:12 AM
I remake the Diy-Duino And i make it smaller, i call it "Babuino", It also includes a port for programing, and it use 5v a mini usb female jack.
Photos:


WP_000079.jpgWP_000083.jpgWP_000088.jpgWP_000089.jpg
robonerd (author) in reply to NequitoOct 25, 2012. 12:27 PM
WHOA!!!!! THATS SOOOO AWESOME!!!!! If I dare be so bold....... I need you to make an instructable for adding the programming port!!!!!!!!! I've been very unsuccessful in doing this! Cheers! VERY impressive!
Nequito in reply to robonerdOct 25, 2012. 5:40 PM
It is very easy to make the programming port, you only need an rs232, i´m going to make the instructable, but not now because i don´t have any rs232
robonerd (author) in reply to NequitoOct 26, 2012. 7:34 AM
I would love to try it, whenever you can do the instructable. If you would be so kind to post it in here. That would be GREAT!!!!
SubEclipse says: Oct 19, 2012. 11:36 AM
I put this together yesterday... I was able to burn the bootloader to the Atmega328 using my Arduino Uno on a breadboard... I then swapped chips with my Uno and uploaded the blink sketch.

When I put this chip into my diy-duino, I get nothing from pin 13, however it works properly in my Uno.

I'm officially stumped... if you have any ideas, I'd appreciate any help you can offer.

Thanks!
bottom.jpgtop.jpg
SubEclipse in reply to SubEclipseOct 19, 2012. 11:48 AM
P.S. I wired this all up on a breadboard as well and it doesn't seem to be working there, either. The problem must either be the way I've programmed the 328 using my Uno, or a faulty component.
robonerd (author) in reply to SubEclipseOct 20, 2012. 12:58 PM
that is indeed strange. i have always got the 328 chips with the bootloader already installed. but that should not be an issue. Nor should using arduino to upload sketches and then switch chips -- as far as I know. All the components look to be set up properly and your soldering looks clean. Most common problem is poor soldering or copper that got eaten away inadvertantly by the acid. Double check with a magnifying glass if you can, that none of the soldering crosses where it should not. Also, is it just pin 13 that doesn't work or is it ALL the pins? I know you probably have checked this, but also check to see if the LED is functional too? Let me know -- I'll do what I can to help! best of luck!
SubEclipse in reply to robonerdOct 20, 2012. 4:11 PM
Thanks for the quick reply... Yeah, I've tried all of the digital pins with no luck on any of them. I took the continuity tester to the board today and didn't find any shorts. I also tested continuity of all of the solder points on the board and it doesn't look like there's an issue with the copper getting eaten away (I couldn't see any visible signs of this, either.

Confirmed 5v to pin 7 on the 328 as well.

I don't have the tools to test the 16 MHz crystal.

I ruled out the microcontroller by plugging the chip that came with my Arduino Uno into the diy-duino and getting the same behavior. I suppose if the problem is I'm using an Uno to program the chips, this would still be an issue even using their mc.

I ordered a FT232 yesterday as well, so I'll get the answer to the above question soon enough.

Again, I appreciate the help, and please let me know if you can think of anything else I should check. I could put together a parts list from the company where I ordered everything if you want to take a look to see if anything stands out.
SubEclipse in reply to SubEclipseOct 21, 2012. 8:36 AM
PROBLEM SOLVED!  Swapped the 0.1uF capacitors for 22pF capacitors and the diy-duino came to life.  

This was the reference I used when deciding to give this solution a try:
http://www.arduino.cc/en/Main/Standalone
robonerd (author) in reply to SubEclipseOct 21, 2012. 2:31 PM
AWESOME! Glad to hear you got it going! cheers!
bobbokop says: Oct 1, 2012. 9:21 AM
Hi! Awseome work! I followed the instructions, and though the board powers on and I have 5V at Vcc and AREF, the blink sketch does not work. What could be the problem? Something involving the crystal?

Thank you!
robonerd (author) in reply to bobbokopOct 1, 2012. 10:36 AM
Hi there! Hard to say... do you have an arduino board you can load the blink sketch onto? and then swap the chip to see if it works? ... start there, if it works on the store arduino and not on your DIY board, there is likely either a cross somewhere components are not installed correctly.

another question, is the chip oriented correctly -- is the "grove" pointed the correct way?

If you want to email me through my website - www.theparsley.com/arduino/diy ------ its at the bottom of the page. I can contact you easier, maybe get some pics of how you have it set up if need be.
Sure98 says: Jul 2, 2012. 12:59 PM
I dont know if anybody is reading this right now, but what are the EXACT dimensions of the PCB you cut out? Not including the "margin" or whatever, just the dimensions of the prepared PCB
Sure98 in reply to Sure98Jul 4, 2012. 2:33 PM
I need an answer soon....
robonerd (author) in reply to Sure98Jul 6, 2012. 8:49 AM
open the pattern file, measure the pattern area, voila exact dimensions. i usually wing it cause i need to mount the final device inside an enclosure or something.
jsgraham says: Jul 3, 2012. 11:05 AM
Great instructable. Thanks for putting it together. For a beginner with microcontrollers, with a penchant for making his own components, this is a great find. Voted appropriately.

One thing though, The ATmega 328 you mentioned in your article has been retired by SparkFun, and replaced by the ATmega 328 with Arduino OptiBoot (Uno)... cost $5.50... http://www.sparkfun.com/products/10524
max1zzz says: Mar 24, 2012. 1:46 PM
Are the pin numberings on step 18 the same as on the actual arduino? (i don't have a arduino to compare it with)
also do you know if i could use a 168 chip rather than a 328? (i have seen a few design's using the 168 on the net, and it is easier for me to get)

This is by far the best design i have seen on the net, and with a few little tweaks it will be perfect for my needs :)

thanks
robonerd (author) in reply to max1zzzMar 26, 2012. 4:55 AM
Hi there! Yes the pin structure is the same as the actual arduino. Check out this image:

http://arduino.cc/hu/Hacking/PinMapping

The DIY board follows this diagram.

I'm not sure if it will work with a 168 or not. I have not tried that.

If you have one, test it out and see what happens.
You'll have to select the board from the arduino program's "tools" >> "boards" menu.

Thanks for the compliment, I hope this helps and hope it works for you.
max1zzz in reply to robonerdMar 27, 2012. 3:01 PM
ok, thanks ;)

i will try with a 168, if it doesn't work i can always get a 328 later
edz29 says: Mar 15, 2012. 1:11 PM
thanks sir for this nice tutorial.. i was now able to upload sketches..
my circuit is good the only wrong thing i've done is with the connection of tx,rx of usb to ttl and your DIY arduino when uploading.
MorE power!!
thanks
robonerd (author) in reply to edz29Mar 16, 2012. 6:25 AM
I'm glad it worked for you. share a photo if you feel like it.
devilinops says: Mar 12, 2012. 9:38 AM
am i able to use 10uf16v capacitor ? cuz im not finding any 10uf25v anywhere and last thing i wana do is order it online and pay shipping for 2 parts
edz29 says: Mar 2, 2012. 4:27 AM
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

i encounter this problem =( could you help me please
robonerd (author) in reply to edz29Mar 2, 2012. 5:59 AM
The program is not able to communicate with the chip...

Check this first:
Chips come with the "Blink" sketch loaded.
Wire an LED to pin 13.
Give power to your board.
If the LED doesn't flash theres something wrong with the setup of the board -- like crosses over lines of copper or bad solder.

next:
Do you have the correct chip selected in the arduino program?
Click "Tools" slect "board" and then make sure you have the proper chip you bought. I think sparkfun stopped selling the 328 and are now just selling the UNO.
edz29 in reply to robonerdMar 2, 2012. 6:26 AM
i haven't check if my program have Blink sketch. i'll check it first
i think i solder my board good enough and it has no pin short circuited.
i have follow the steps on your tutorial except with the breakout board i use PL-2302 usb to serial since ft232rl was not available here.. but still i follow the connection of rx,tx,vcc,gnd


i have selected the correct board like in your tutorial
thanks for your help
edz29 in reply to edz29Mar 2, 2012. 2:03 PM
Installing drivers for the Arduino Uno with Windows7, Vista, or XP:

Plug in your board and wait for Windows to begin it's driver installation process. After a few moments, the process will fail, despite its best efforts
Click on the Start Menu, and open up the Control Panel.
While in the Control Panel, navigate to System and Security. Next, click on System. Once the System window is up, open the Device Manager.
Look under Ports (COM & LPT). You should see an open port named "Arduino UNO (COMxx)"
Right click on the "Arduino UNO (COmxx)" port and choose the "Update Driver Software" option.
Next, choose the "Browse my computer for Driver software" option.
Finally, navigate to and select the Uno's driver file, named "ArduinoUNO.inf", located in the "Drivers" folder of the Arduino Software download (not the "FTDI USB Drivers" sub-directory).
Windows will finish up the driver installation from there.

-- i think i have a problem with installing my arduino application. when i connected my breakout board with the diy arduino it detects prolific chip usb to ttl and not the arduino \uno
robonerd (author) in reply to edz29Mar 5, 2012. 5:21 AM
oh boy, now this one is beyond my scope of knowledge. Sorry! maybe you can get some help in the arduino forum at www.arduino.cc Sorry, I wish I had an answer for you. I installed my arduino software using the store bought arduino.
edz29 in reply to edz29Mar 4, 2012. 4:15 AM
hello sir .. once again i have a question
i tried uploading the blink sketch
when i press the button the pin 13 led lighted for a second then the error from my ide was seen..

how long should i press the reset button??
robonerd (author) in reply to edz29Mar 5, 2012. 5:22 AM
i usually just press and release quickly.
edz29 says: Feb 27, 2012. 4:34 AM
i have read one of the comments here that step 18 has a short ceramic capacitor .. is you drawing already fixed? so i can start on making it
here's the link http://www.instructables.com/files/deriv/F3S/7PNI/GKS0SJIA/F3S7PNIGKS0SJIA.MEDIUM.jpg

thanks.. i'll be posting my board and project once i have made it
robonerd (author) in reply to edz29Feb 27, 2012. 6:18 AM
Yes I set them up wrong on the photo! they should go horizontal, instead of vertical. The graphic has the correct placement. I also replied to your previous question on my website.
edz29 in reply to robonerdFeb 27, 2012. 7:11 AM
thanks for your early response.. =)
your such a great help!
robonerd (author) in reply to edz29Feb 27, 2012. 8:23 AM
my pleasure. If you can, I would seriously suggest getting a regular arduino and tinkering around with that first. It's VERY easy to get something wrong on this board, and I'd hate for you to become discouraged because you cant get this to work on the first shot. It took me several attempts ((and several scrapped boards!)) before I got it right. And I had been working with arduino for a while... thats just my opinion, of course! The ardiono forum is also a good place to read up on arduino. Most of the people there are VERY friendly. Well, best of luck to you my friend. Please feel free to contact me anytime here or at my website if you have any questions and I'll do my best to help.
1-40 of 176Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!