Introduction: How to Make an Arduino From Scratch

Picture of How to Make an Arduino From Scratch

Frugal Engineering is the best way forward for science.

If you're interested in making some arduino's from scratch , you've come to the right place.

You can see a video tutorial of this instructable : here

It will supplement any loopholes or doubts you may have.

Lets start with an introduction on what we'll do in the next step.

Step 1: How Well Could It Be...if I Got an Arduino for Free..

Picture of How Well Could It Be...if I Got an Arduino for Free..

INTRODUCTION : Question what to make,how to make,but make you must ...

After scrolling,searching,drooling over tons of Arduino tutorials..from making an led cube, to automating your home, giving life to a robot or making arduino powered drones... you, like me, must have felt that sudden urge as soon as you stumble upon an inspiring arduino tutorial,

"Gosh,Wish I had one of these" or better still "I want to make one of these, Right Now!" and as soon as that feeling hits your head, your eyes start scurrying the required parts list and you see that name :

ARDUINO : 25 Dollars and the cost of your project seems to skyrocket in many cases if other electronics are not as pricey( Yup, 25 dollars might be next to nothing for some, but yeah it is something!) and of course if the other parts are pricey,you need to burn a hole in your pocket anyway...Kachang!

And what's more heartbreaking(Believe me, its true!) is if you already own an Arduino, and its already the heart of your super Awesome robot(or Whatever) project.It's then when you start thinking - I don't want to dismantle my project apart.I don't want to invest my arduino in a project that i don't know will work or trying to make it work and that's when you decide ..well..yeah..I'll definitely make this new project ... but Later..not now...might as well bookmark it for now...WAIT! Stop ! No more will you have this for an excuse.We'll be minting an arduino right here,right now,so grab the parts in step 2 of this instructable,sit tight,grab your coffee and lets get to it .

Step 2: Get These Quick!

Picture of Get These Quick!

You require these starting materials:

Breadboard

AtMega 328 IC (you can use any variant like 328 PU or 328 P-PU )

Connecting wires,

Arduino(using an Duemilanove here),

1x 16 Mhz crystal,

3x 100 ohm resistors

1x 10K resistor

2x 22pF capacitors

3x LED's(A red ,yellow led and a green one)

1x 9v battery with connector snap,

1x usb cable,

1x 7805 Voltage Regulator

A computer or a laptop with arduino ide installed,

some free time and will to make things work

That's it..Lets begin tinkering...

Step 3: Beginning the Assembly

Picture of Beginning the Assembly

Grab your breadboard.It should look like the one in the picture perforated with lot of holes.

Put the AtMega chip (one that looks like a centipede) right down the middle of the board,

but keeping it closer to any one of the ends.

Step 4: Setting Up the Power Supply

Picture of Setting Up the Power Supply

Place the LM7805 voltage regular on the breadboard along with the ATMega 328 chip.

The pin placement of 7805 with the bulged side facing you is :Pin 1 - VCC, Pin 2 -Gnd, Pin 3 - Output.

Connect a black wire to pin 2 of the 7805 .Connect the other end of wire to the gnd rail on the breadboard.

Similarly connect a red wire to pin 3 of the 7805 whose other end will go to the vcc rail on the breadboard.

Connect a black wire to the ground rail which we'll connect with the ground of our Arduino(later).

To Connect the vcc and gnd rails along both the ends of the breadboard,connect 2 wires

as shown in the last few figures.

Step 5: Providing Power to the Chip

Picture of Providing Power to the Chip

Take a good look at the At-mega to Arduino pin mapping given .

We're going to wire the circuit following it, so taking a look at it before prototyping will come in handy.

Particularly see the Vcc(+5V) and ground pin locations.

Connect red wires to pins 7 and 20 of the chip to 5V rail on breadboard.

Connect black wires to pins 8 and 22 of the chip to Gnd rail on breadboard.

Step 6: Making the Clockwork..

Picture of Making the Clockwork..

Add a 22pF capacitor between the Ground and pin 9 on the Atmega328 IC.

Add another 22pF capacitor between pin 10 of Atmega328 IC and ground.

Finally add a 16 Mhz crystal between pins 9 and 10 on the Atmega328.

Add a 10k ohm resistor between the 5V and reset(pin1) of the 328 IC.

Your setup should now look similar to figure 4,5 of this step.

Step 7: Adding in the Status LED's

Picture of Adding in the Status LED's

Add a wire on any one side of breadboard.

Connect a 100 ohm resistor to one of the ends where you connected the wire.(See pics).

Add the longer lead(+ve) of yellow led to the other end of resistor.

Connect the shorter leg(-ve) of the led to ground.

Do the above steps for red and green led's.

Step 8: Connecting Everyting With the Arduino

Picture of Connecting Everyting With the Arduino

You're almost there!

Connect the yellow led wire to pin 9 of the arduino.

This functions as "Heartbeat". It shows the programmer is running.

Connect the red led wire to pin 8 of the arduino.

This functions as "Error indicator". It lights up if anything goes wrong.

Connect the green led wire to pin 7 of the arduino.

This functions as "Programming in Progress". It shows the programmer(Ardiuno) is in communication with the slave(ATMega 328 on breadboard).

Connect 4 wires(3yellow and a green one) to pins on the Atmega IC on the breadboard

according to the pictorial schematic above..and connect them to pins 10,11,12,13on the arduino.

Also don't forget to attach the +5V and ground wires between the Arduino board and the breadboard.

Step 9: Programming Your Arduino

Let me tell what were going to do here.We're going to make your arduino basically burn the bootloader

onto the new Atmega 328 chip on the breadboard.

How? You may Ask.

Well, we'll be burning a program into our arduino to make it behave like a programmer!

1) Start the Arduino IDE.

2) Go to File > Examples > Arduino ISP.

3) Compile the sketch and burn it into your Arduino.

After you've burned the sketch,you'll see that the yellow LED will start to pulsate.

If it doesn't,check your connections again.Don't proceed further until you get this to work.

Now add a 100 ohm resistance between the 5V and the reset pin on the Arduino.

This is to disable the auto-rest which occurs on the Arduino.

Step 10: Setting Up the Burning...and Rise of an Arduino

Picture of Setting Up the Burning...and Rise of an Arduino

In the Arduino IDE, select

Tools > Board > Arduino Duemilanove with AtMega328.

Programmer > Arduino as ISP.

Go to the tools menu and finally select the "Burn Bootloader" option.

Arduino IDE should now read : Burning bootloader, and if all went well the green led should come on.

The Tx and Rx pins on the Arduino should start flashing.

This process of burning the bootloader will take about a minute to complete.

Arduino IDE should now read : Done Burning bootloader

If it does,work done,Congrats,you now have a new Arduino chip.

If you had an Error, the RED led should come up.But don't fret.

Match your error type with the debugging guide in the coming steps.

Step 11: Troubleshooting Guide

Picture of Troubleshooting Guide

See the pics of this step and Eliminate your problem.

Remember that you may have multiple errors and after you solve one error ,you may tumble into the next one.

But just follow the solution corresponding to the error and you'll be up and running in no time.

If you liked this tutorial or are having problems,post comments below.

Cheers and Happy building.

Comments

subgenius13 made it! (author)2015-01-11

I used this guide to make a few of these for use in plastic model projects. Thanks so much for putting this together!

praneet9 (author)subgenius132015-02-07

Awesome...Looks super cool !

Turned out perfect. Before I uploaded the Blink sketch I changed the timing on pin 13 to 200 milliseconds for both the high and low voltage for a fast blink. And (as rarely happens) it worked the first time I powered it up. I think the high quality of your 'Ible may have had something to do with that. Thanks very much praneet9!

diyboi1235 (author)2017-01-11

I like this guy you no how you see the guy that makes all the instructable fun and not boring

Gunterman5 (author)2016-02-17

So Will it act like a Arduino without the Arduino attached once its been programmed?

Marethno made it! (author)2016-01-05

i Used uNO for flashing bootloader. Then i soldered evrything on pcb board. i soldered a 10 Pin ISP. and IT Works great with my USB asp. tested with khazamaa USB Programmer

Marethno made it! (author)2016-01-05

i Used uNO for flashing bootloader. Then i soldered evrything on pcb board. i soldered a 10 Pin ISP. and IT Works great with my USB asp. tested with khazamaa USB Programmer

WhiteRenard (author)2015-10-25

The Introduction and everything you described... is exactly me! Every single bit!

I'll definitely will be making some arduinos, thanks! :)

Venemot (author)2015-06-29

any specific arduino required to programme it?

LithStud (author)2015-04-30

Thanks for a comprehensive 'ible! It worked for me without external supply and without any problems the very first time :)

Arman5592 (author)2014-09-20

It's illegal to call it arduino , please check arduino.cc/en/Main/FAQ , 'what should I call my boards?' Question .

praneet9 (author)Arman55922014-09-20

Yeah,You're Right. How about "Mintduino" or "Hackduino" or "DIYuino" !

Gelfling6 (author)praneet92014-09-22

I think the 'duino' part of the name is the flexible naming, but you cannot use the full 'Arduino' name, as it is the property of the Arduino team.

Excerpt from the link Arman5592 gave above:

Which are the official Arduino boards?

The official Arduino boards are the ones listed on the hardware page.
These are boards whose manufacturers work with the Arduino team to
ensure a good user experience, compatibility with the Arduino software,
and a quality product. In return for their status as official boards,
the manufacturers pay a licensing fee to the Arduino team to support the
further development of the project.

In general, we restrict use of the name "Arduino" to the official
boards. If you find a product under a different name but described as
"Arduino compatible", it’s probably not an official board and doesn’t
fund continued work on the project.

Read about Clones, Derivatives and Counterfeits by Massimo Banzi (Blog)
Learn about how to spot a counterfeit (Website)

Gadget93 (author)Gelfling62015-03-29

Meh. If a counterfeit works good enough, I'll use it and I'll still call it an.Arduino. Hell, I'll post my project to FB and call it arduino and not give two f***s.

How about FAUXduino?

Definition of FAUX : imitation. Pronounced foe, like 'friend or foe'.

Gadget93 (author)Arman55922015-03-29

Who cares. I'm not going to sell the one I make. I'll call it Arduino all I want and I'll even post it on Facebook.

crispernakisan (author)Arman55922014-09-22

I think they mean if you develop your own board for a product you are going to sell. But, of course it's still fun to come up with your own name!

GhostScream1 (author)2014-12-24

what about usp connection ? canot get any information about this i also found ppl using this IC https://www.sparkfun.com/products/9716 and it is expensive more that arduino

amohamed16 (author)2014-10-25

great tutorial, it works (Y)

diy_bloke (author)2014-10-25

As I just programmed a chip again and got your 'Yikes' message, maybe just an addition to the solutions you gave:
I had a separate PSU, so that couldnt be the problem.
Though other sources attribute both 'device signature errors' to using a 328PU instead of a 328P-PU, I used the 328P-PU so that couldnt be the problem.
So I followed the advice that the 'Yikes' error message gives: check your connections. I did and behold: one wire was faulty.
So, tried again... this time for ease just tapping in the the Arduino's 5Volt and it worked right away. :-)
So.. if one gets the 'Yikes', might be wise to double check the connections as well

diy_bloke (author)2014-10-25

interesting to see the error messages.
I have always heard that people would put a 10k resistor between reset and 5 Volt and for me a 10uF capacitor between ground and reset has always worked (I think even worked with 33uF but not with 50), but maybe a 100 or 120 ohm resistor will also do the trick.
I think I have had the 'invalid signature' error once and have not been able to solve that, even with adapting the avrdude.conf file, but I am not sure anymore if i fed the +5Volt from the arduino or seperate. That might have been the only time then. Will try that again with that chip. Never realised that :-)

diy_bloke (author)2014-10-25

looks good. I have made a number of 'arduino like' boards and usually they work right away, even though the programming is always a bit nerve wrecking, hoping to get no errors.
Nevertheless... I have given up on building arduino's myself (apart from a few chips I still have laying around) because the cost of Arduino knock offs has dropped so much:
If i buy an unprogrammed atmega328 chip, that is about 4 euro's... but I can already get a UNO clone for about 7, a nano clone for about 2.80 euro, and the other day i bought 10 arduino pro mini's for 15.80 Euro: that is 1.58 euro a piece, ready made.
Now I know that is not a fair comparison: if I shop around for an Atmega328, I can get it for about 1 euro... (if i buy 5) but then i still need a crystal, a switch, headers, IC sockets, capacitors, a voltage regulator, a piece of PCB, which i am sure adds up to more than 58 cents :-)
Don't get me wrong, I love self-building. It gives a great sense of accomplishment... but more and more I get the feeling it is cheaper to buy ready made modules and to combine them and only if I cant find what I need, I make it myself.
Basically, adding say a relay for which one only needs a resistor, transistor, relay and diode, it is often at least as cheap to buy a relay module and stick that in. The only drawback... it is usually mail-order, so you may have to wait a while before receiving it, but as I am always busy with some project, that is not really a problem :-)

Again, i love basic DIY in electronics, but gosh it gets harder and harder to compete with dealextreme and aliexpress
Having said that... I am happy I built a few Arduino clones, because i am now very familiar with their workings, rather than it being a bit of a 'black box'

Well you got my vote. This is a really nice 'Ible. I have an Arduino
Duemilanove and I was building another Structer's project and I reached the point where I burned the bootloader to the new AtMega 328. To test it I put the new IC in my Arduino and uploaded a sketch and it worked fine. In fact I left that chip in my
Arduino and just kept the original I pulled out to use in my bread board Arduino. Your 'Ible is really complete and seems to pick where the other project left off. Anyway thanks for taking the time to post this. Oh by the way, sure you can buy cheap duinos etc on ebay but where's the fun in that!

Thanks Volthaus for your vote! Certainly making your own arduino as you said, makes for a lot more fun especially since the process is simple and engaging ! Glad to hear you found the instructable helpful. Cheers!!

safiullahtariq (author)2014-09-30

It might be a stupid question, but i still wana ask.

Will i be able to program this "New Arduino" just like i program the Arduino ?

im new to this, so please help me out...

Dyte (author)safiullahtariq2014-10-01

If I'm not mistaken, you need a "normal" arduino developer board for programming them, just switch the ATMega chip on the developer board with the one you want to write the program to. Then put the programmed ATMega in your custom arduino.

erik.m.brage (author)Dyte2014-10-05

It might be easier to use an arduino board without the processor and then some wiring to your custom board, you'd quickly get bored with flipping the chips back and forth while developing code.

Dyte (author)erik.m.brage2014-10-08

Well I guess in the developing phase you'd use the board, so only when deploying the project, you need to flip the chip.

safiullahtariq (author)Dyte2014-10-05

I got it.. thanx :)
Thanx for your answer.

einyaa (author)safiullahtariq2014-10-01

Yes you can, but with TTL-level (no USB). Either you can upload programs just by using this new chip on your Arduino board. Or you can use a dedicated USB-to-TTL adapter in the same way (the 2303HX-based chipsets are very cheap and works fine with Windows). Remember that you have to use an external 16MHz crystal and two capacitors (22pF) with the "new arduino" if you use it stand-alone outside the Arduino-board.

safiullahtariq (author)einyaa2014-10-05

Thanx for the detail answer :)

Appreciated :)

tankapotamus (author)2014-10-07

I had this error a lot when I was just beginning to learn arduino,

stk500_getsync() not in sync resp=0x00.

It was usally from rushing and not checking the com ports and board names

I ran into this other one when I started messing with unojoy!

avrdude yikes invalid device signature 0x000000

It was from an incorectly configured batch file used for megjoy, that Flashed the wrong firmware to the Atmega8u2. You have to use the Atmel's FLIP software (Windows) or the DFU programmer or avrdude. I used Atmel Flip.

The correct Atmega8u2 firmware files are on Arduino's Github.

Memphisartguy (author)2014-10-02

board in the picture can be made in to a ISP programmer. Did it with mine. You solder 4 pins to the strip bt the usb and then make a cable to jump them to the ISP headers at the front of the board. they use to leave these un-solder no idea why they started filling them in. Make this board even more useful if you add a ZIF socket.

erik.m.brage (author)2014-09-30

Can you (re)set the fuse bits with this setup also? avr's from the wilds of ebay can have different settings..

einyaa (author)erik.m.brage2014-10-01

I don' think so. You will probably have to use an ISP-programmer to do this. I know that e.g. "extreme burner - AVR" is a free software where you can play with the fuse settings.

gadgets_guy (author)2014-09-30

Nicely done.

bruno.duarte.54 (author)2014-09-30

Nice tutorial !

rpotts2 (author)2014-09-26

nicely done! I like that you have included the most common fixable errors at the end. saves a lot of time with debugging standalone builds!

praneet9 (author)rpotts22014-09-28

Yes, I ran into quite a few errors..with several of those scratching & pulling the hair out of your head moments.. but finally when you get the system running ,that's the best feeling of accomplishment (And of course sharing it with others is another one:-)

firatakandere (author)2014-09-28

There is something that I do not understand. You connected output pin(3) of the regulator to the vcc rail and gnd ping(2) to the gnd. But what happened to input pin(1) ? Nothing connected to it? Also, regulator is missing in the diagram. I'm beginner in electricity circuits, thanks for help.

praneet9 (author)firatakandere2014-09-28

Connect pin1 of 7805 to +9V(positive terminal) of a battery or 12 V battery pack.Connect gnd of the battery to pin(2) of 7805.

firatakandere (author)praneet92014-09-28

Thanks for the answer. I'm planning to make a bootloader burner shield by using this tutorial. Can I bypass the regulator by connecting vcc rail to 5V pin of the arduino?

praneet9 (author)firatakandere2014-09-28

Doing so may work but I've had partial success burning the bootloader without the external power supply.(Some chips just require additional juice..and I get an error.. though it worked for some without the external supply). Best to add it though as arduino can only supply close to 40-50mV per pin.

electronichamsters (author)2014-09-26

Useful Instructable. It's great for making 8MHz battery builds.

teledog (author)2014-09-26

They have the kits on eBay for ~6 bucks. Look up eBay anarduino.atmega328

Bought a bunch of them (bootloader installed)

Test your prototype on the arduino, if it works, pull the chip & plonk it in the anarduino & hardwire it.

rpujari (author)2014-09-25

thanx .. very helpful

BrunaM1 (author)2014-09-25

One of the best instructables.

Electrospark (author)2014-09-22

nice instructables!

but, you need an arduino to program it. right?

In this Instructable, you use an Arduino and the Arduino IDE to put the bootloader on the blank Atmel chip... then you can program that chip directly with the Arduino IDE. There are other ways, of course.

http://arduino.cc/en/Hacking/Bootloader

http://arduino.cc/en/Hacking/MiniBootloader

Yay!

About This Instructable

119,712views

1,169favorites

License:

Bio: If you love electronics, robotics,programming and micro controllers - You better hit that subscribe button.
More by praneet9:How to make an Arduino from scratchHow to make a robot
Add instructable to: