Perfduino: Build Your Own Arduino Microcontroller!

This how-to takes you through all the steps of making your own arduino on a perfboard or perfduino! Arduino microcontrollers are great for learning about physical computing and are very useful for rapid prototyping. Arduino’s simple programming language makes it a favorite of hobbyists and diy-ers around the world. Because arduino boards range in price from 30 to 70 dollars, it can be very cost effective to make your own. This lets you customize the layout of the board and brings down the cost so you can embed your perfduino in a final iteration project without losing your precious professionally made arduino board you had to wait so long for by the mailbox. The perfduino in this tutorial is designed to closely mimic the original arduino functionality without any specific project layout in mind.

Step 1: Materials!

These are the materials you will need to make your perfduino:

1. perfboard

2. green LED

3. 100 – 500 ohm resistor

4. Atmega 328 with arduino bootloader preloaded onto the chip

5. 22 gauge solid core wire

6. ftdi serial to usb break out board

7. 16 MHz crystal

8. (2) 22 pF (that’s picofarad not microfarad) capacitors

9. .47 uF capacitor

10. 10k resistor

11. female pin headers

12. male pin headers

13. also, breadboards never hurt

Check out the supply section of our Knowledge page for component suppliers.

We will not use all of the pins on the right, but it is a good idea to have a variety of options to fit the needs of your board.

Step 2: Breadboard Your Circuit First!

As with every electronics project you undertake, you should test your circuit on a breadboard before soldering anything. Desoldering components is a slow and painful process that is to be avoided whenever possible. For the breadboard circuit you will need the breadboard, the Atmega 328 chip, the 10k resistor, the green LED, the LED resistor (I used a 100 ohm resistor here), some bits of wire, and the ftdi breakout board (you can also use an official arduino board’s ftdi chip if you remove the atmega chip from the official arduino board first).

Connect up the atmega chip on the breadboard as shown in the schematic below. The gray component is the 16 MHz crystal. The two orange components are the 22pF capacitors. The striped component is the 10K resistor. Make sure you connect the 10K resistor to the power rail and not to the ground rail. In this image from the arduino website, an arduino board (WITH THE ATMEGA CHIP REMOVED!) is used as the ftdi interface. The ftdi breakout board acts in the same manner. Connect the power and ground from the breakout board to the power and ground rails running along the side of the breadboard. If you are using an arduino without the chip, connect RX and TX as shown in the picture. If you are using the breakout board, connect RX to the third pin (where the yellow wire connects in the picture) and TX to the second pin (where the green wire connects in the picture) of the atmega chip. Connect the DTR pin on the breakout board to an empty column on the breadboard. Then connect that column to the reset pin on the chip ( the same pin the 10k resistor is connected to) with the .47uF capacitor. If using the arduino board, instead connect the reset pin on the arduino board to the reset pin on the chip. No capacitor is necessary here. (note: this wire is not shown in the image below for some reason, but it it very necessary!)

After double checking your breadboard against the image, add a green LED to the pin directly to the right of the power pin on the upper part of the chip as shown in the photo below. Remember to connect the positive side of the led to the pin and the negative to our led resistor, then connect the remaining side of the resistor to ground.

If all the connections are correct, you should be able to plug the breakout board or chipless arduino board into your computer’s usb port, open the arduino software, and upload the blink program found in the example library. Is your LED blinking once a second? YAY! If not, check all your connections. Make sure your LED is oriented so that the positive end connects to the chip and the negative end connects to ground through the resistor. Check that your .47 uF capacitor connects the DTR pin on the breakout board to the reset pin on the chip if you are not using an empty arduino board as the interface.

Step 3: Setting Up The Perfboard

This drawing explains how the raw pins of the atmega chip correspond to the final input and output pins of the arduino. Wherever the directions refer to a specific pin number on the chip itself they are referring to the pins labeled in black lettering.

Get out your perfboard and set the atmega chip into the center of the board at whichever end pleases you. Make sure the side with the copper pads is facing down. Set the crystal and 22pF capacitors on an empty section of the board in the same relation to each other as on the breadboard. Set the 10k resistor into the board connecting pin 1 on the chip to an empty section of the board. This resistor will later connect to 5 volts.

Next cut and strip some of the 22 gauge solid core wire. Attach the crystal/ capacitor leads to pins 9 and 10 of the chip just like you did on the breadboard (as shown in the two topmost yellow wires). The third yellow wire and the blue wire connect to pins 2 and 3 on the chip (where the rx and tx connected in the breadboard layout). The area the wires are being brought out to on the right is the area where the breakout board will connect with male headers. Decide how you will want to orient the ftdi breakout board and arrange the order of the RX, TX, DTR, Power, and Ground  wires accordingly. Remember that the RX of the chip connects to the TX of the breakout board and the TX of the chip connects to the RX of the breakout board. Double check the above pin map if you are unsure. Also remember the DTR pin on the breakout board will connect to the reset pin, or pin 1 of the chip through the .47 uF capacitor. The first power and ground wires in the bottom of the image below connect to pins 20 and 22 respectively.

Next add a resistor on pin 19 as shown below. Connect the positive end of the LED to the resistor and the negative end to an empty section of the board. The store bought arduino has an LED already embedded in it that allows for swift debugging. This LED will serve the same function. Now connect your power and ground wires on pins 20 and 22 to the power and ground pins ( pins 8 and 7) on the opposite side of the chip. both sides of the chip need to be connected to power and ground.

This is what the other side of the perfboard looks like at this point. Yours does not need to mirror this one exactly but it should at least resemble the image below.

Solder up the connections we have so far and clip the leads.

Step 4: USB And Power Rails

In the image below we have added a couple of components. On the bottom left you will notice a line of six male header pins (one is missing because we don’t need that connection on the breakout board). These pins are where we plug the breakout board into the perfduino in order to program it. Ground and power are brought from pins 7 and 8 to the appropriate male headers. RX and TX are also brought to the headers as shown at the start of step 3. The reset pin is brought out to a .47uF capacitor at the extreme bottom left of the board. The other end of this capacitor is the connection to the DTR pin all the way on the left of the male headers. Without this capacitor the computer will not be able to program the microcontroller.

In this picture we have also added two rows of female headers that will act as extra power and ground connections when we use the perfduino for prototyping. Power and ground are brought from pins 20 and 22. As long as the two rails are not electrically connected, you can situate them however you like.

Below you can see that the female headers we used for the power rails have very long leads. Take one lead at each end and bend it flat toward the center of the rail. These will give you a nice solid connection between all the pins. Make sure you then solder the ground or power wire to the soldered header.

Below both soldered power rails can be seen on the bottom left of the perfboard.

(Note: In the above image the extra leads of the 22pF capacitors are soldered to one of the main rails along the center of the board. This is connected to ground. The 10k resistor is soldered to the base of the 5 volt power rail you just connected)

At this point you should be able to plug in your perfduino to the computer via the ftdi breakout board. From the menu at the top of the arduino environment select tools, board, and duemilanove or nano with atmega 328. Try loading an example blink program onto it. Make sure you have the correct com port selected.

Step 5: Connect The Analog And Digital Pins

All that is left to do is to connect the analog and digital pins to female headers to provide all that adruino functionality that will make prototyping with your perfduino a breeze. Check the pin map and this time take note of the red-lettered labels. In this perfduino digital pins 2 through 13 have been brought out to female headers. You may also bring out digital pins 0 and 1 but I did not include them here because they also serve as the RX and TX pins for the breakout board interface. In the image below, red-lettered digital pins 2 through 8 are connected to the female headers at the bottom of the board.

Below, digital pins 9 through 13 are brought to the same row of female headers. It is important to note that digital pin 13 is not connected directly to the female header. Instead, the junction where the resistor meets the LED is brought out to the header. This will allow you to connect an LED to pin 13 without a resistor just like in a real arduino board!

Next connect analog pins 0 through 5 to a row of female headers on the other side of the board as shown at the top of the image below.

Finally, connect the black-lettered “AREF” pin to the last pin on the row of digital pins. This will be used for setting analog voltage levels when you are prototyping.

Step 6: Label The Headers

It is important to label your headers. This makes it easier to prototype and ensures your friends won’t get totally lost using your mysterious microcontroller. For labels I simply cut up some white stickers and applied them to the sides of the headers. Pen works fine for labeling the pins if you have a steady hand. You can also print out labels if you want a neater-looking board.

Step 7: Make Stuff!

That’s it! You are done! You now have a fully functional arduino microcontroller! Marvel at the fruits of your labor!

Here is a video of the perfduino loading a program to turn a servo and a program to blink the embedded LED.

The Perfduino made it onto the MAKE site in this video!



69 responses to “Perfduino: Build Your Own Arduino Microcontroller!

  1. Good work and thanks for sharing! Keep them coming.

  2. someguy

    Thats some tight wire-work. Nicely done. I’ve got you bookmarked for when I find the time to finally pick up an atmega. 🙂 Thanks for such a detailed walkthrough!

  3. Jerry

    Can you put clean B/W[Black/White] pic of perfboard here.
    Or where to get this kind of perfboard.[Haven’t seen in store.]
    Every thing is on hands except board.

  4. JC

    Awesome work dude, im an absolute novice to electronics but i feel like i could almost achieve this. Would enjoying seeing how the male pins connect to the ftdi in more detail.

    Keep up the good work!

  5. Andrew

    What’s the link for the usb to serial breakout board? or to make it easier… What is th voltage rating on the usb to serial breakout board?

  6. Dodge

    Great work!

    To reduce the overall cost even more, you can use a Nokia data cable instead of the FTDI USB/Serial breakout board.
    $4.44 shipping included.

    • What kind of connector would you put on the board to work with that cable?

      • Dodge

        Inside the USB side of the cable there is a small board with the FTDI circuit. The chip may be in the normal style, or the epoxy ‘blob’ like the one pictured below. It’s labeled ‘vcc, rx, dtr, tx, and gnd’.

        See Jonathan Thomson’s tutorial for guidelines on using this type of cable. His instructions walk you through it even if your USB board isn’t labeled.
        Good stuff.

      • Dodge

        Whoops… Image didn’t show.

  7. Dodge,
    Very cool! Thanks so much for the explanatory link!

  8. Dodge

    You’re very welcome! I look forward to more of your projects.
    What’s the total cost of parts for this setup?

    As a bonus, I (as do most electronic hobbyists) already have most of the items on your parts list.
    Thank you for posting this tutorial.

    *orders perfboards, Atmega328s and Nokia cables…*

    • Mine ended up at 14 bucks for the board plus the 15 bucks for the reusable ftdi board. If you plan on making a lot of clones for future projects, I’m sure you could get the price per board down by buying in larger quantities.

  9. Zaf

    On my project boards I fit the ATMega in a socket, so for a few extra pennies, it can be removed if necessary.

  10. LuisSz

    Easy solution to save some bucks! Thanks for the effort guys, keep up the good work!

  11. hei dude,

    thanks a lot lot lot lot for this article. i have followed lots of article in building your own arduino but i cant program it with ftdi basic, i was stuck the wholeeee day and very frustrated until i came across yours that said the DTR pin to reset pin with caps….once again thank you, you dont know how relieved i was, anyway i would like to appreciate your help buy giving you a lil token like 10 bucks if you accept…then gimme your paypal address to my email….cheers.

    oya, i m building cool project involving rc car and IMU to detect its rollover tendency, with processing interface, let me know if your keen , i ll show you once its done

    • I’d love to see your project once its done! If you have projects or articles to submit for the blog, you can email them to revoltlaboratory at gmail.

      Ya I was becoming homicidal trying to figure out that DTR pin capacitor fix, especially because you can’t know it’s a problem until you have finished the entire project!

      To donate, use the paypal button on the right of the homepage just under the subscription button. Thank you very much!

  12. What is the Voltage on your 0.47uF cap?

  13. Every thing else is ether HIGH VOLTAGE live 100 and above or expensive 0.47uF 6.3V Surface Mount Ceramic Capacitors.

  14. CamDax, As long as the capacitor is a low value it should smooth out the signal from the computer to the reset pin. I just used .47uF because I had one on hand.

  15. Hello again

    I have every thing i need two make two arduinos. I’m using Sparkfun’s FTDI Basic Breakout and my windows 7 computer doesn’t recognize it I have the drivers for the Duemilanove installed and work properly. I already have a Duemilanove as well.

    • I tried and connected it to the Duemilanove board and i get
      Binary sketch size: 1018 bytes (of a 30720 byte maximum)
      avrdude: stk500_getsync(): not in sync: resp=0x00
      avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

      • I don’t know how but i connected it to the Duemilanove board and i got it two work. Now just need to get the FTDI thing to work.

  16. CamDAX, are you getting the same error with the FTDI board/perfduino that you were getting with the duemilanove? oH, or have you just not tested it yet =P I cannot tell from the comment.

    • I used the Duemilanove board insted of the FTDI board and got it to work. The jumper wires weren’t making good contact so i got the error
      Binary sketch size: 1018 bytes (of a 30720 byte maximum)
      avrdude: stk500_getsync(): not in sync: resp=0×00
      avrdude: stk500_disable(): protocol error, expect=0×14, resp=0×51
      It’s really hard to get the Duemilanove board to work!

      But when i plug in the FTDI board my computer keeps saying “USB Device Not Recognized”.

  17. I have mOre than triple checked the circuit but it’s a problem with the FTDI board or my computer because it keeps saying unknown device.

  18. The Guys at Spark Fun say the IC may be defective so there sending me a new one.

    • Sparkfun is great at replacing faulty products quickly! We just got a new breadboard b/c the original one had misaligned sockets. All it took was one email!

      In other news I amm currently making an arduino clone board for Clover’s Greenhouse. It’s going to have the voltage dividers for analog inputs already built in. It will also have a barrel jack and voltage regulator unlike the perfduino.

  19. I have a Question do you have to have an “Arduino” to make the “Perfduino”?

    • No. As long as you have an atmega 168 or atmega 328 chip with the arduino bootloader software already on it, you do not need an arduino. You will need the ftdi breakout board for programming. If you don’t have the ftdi board but you have an arduino, you can use the usb interface on the arduino to program the perfduino as shown in the breadboard diagram.

  20. Faudzee

    Hi awesome project, can I get it pde (sketch) file?

    • Thanks!
      You can use any sketch you would normally use with an arduino. If you want to turn a servo and blink an LED like in the video, there are examples built into the arduino development environment under File>Examples.

  21. Jason

    How necessary is the 0.47uF cap? I’m ordering as much as I can from the sparkfun website and that is one of the only stand-alone items they don’t have. If I substituted it for a higher rated one, would it make a large difference? Thanks

    • It is absolutely necessary to have that cap there. If you cannot get one, get as close as you possibly can. Let me know if a different value works for you! I am curious myself.

  22. goebish

    Nice, but I would use a cp2102 usb to serial bridge instead of the ftdi, it’s a lot cheaper and works great.

  23. Pingback: La semana en links (25/04/2012) | Automatismos Mar del Plata

  24. gilles

    Great tutorial. Would be very nice if you could provide the fritzing file you’ve been using.

  25. aakash

    thankyou so much for ur gr8 efforts….. i appreciate your detailed instruction for the perfduino… keep posting such tutorials to the complicated circuits, its really very difficult to find on the internet… hats of to you..!! 🙂

  26. Hi, If I set up all the components like the instruction above ( using the ftdi breakout), When programming, is there any difference b/w the ftdi breakout and usb interface of arduino?
    I want to use the usb interface of the arduino ( still connect ftdi breakout)…how come?

    • Hi. The arduino Duemilanove uses the ftdi usb interface chip. The arduino Uno and newer use an additional atmega microcontroller to handle communication. If you already have an official arduino, you can take out the chip and use the empty board to program your perfduino.

  27. Hey man, thanks for this great project, with all the photos and the great explanation.

    Just one question. Is there any way, to make one of this, and make the communication with the PC via USB, or Parallel, or Serial, without needing one “ftdi serial to usb break out board” or similar.

    I mean, building our own communication circuit.

    Thanks again!!!

    • It is definitely possible. The limitation for me is the FTDI chip only comes in surface mount packaging, so it is too small for me to solder without a reflow oven. I have heard of people sing an additional atmega chip to handle communication as well.

  28. warning noob here!

    I want to make my own arduino for a project similar to the plandruino one, im just wondering about how you would power this clone. to me it seems the only way to power it is through the usb device. is this true? can you clarify if its not true.

  29. Pingback: How to Design Your Own Custom Arduino Board Microcontroller - Science & Tech | Tech wikiHow

  30. Pingback: Behind the Scenes at Mad Science Laboratories: How I Capture My Experiments - Science & Tech | Tech wikiHow

  31. muzcategui

    How much current does this microcontroller draw? Is it less than a regular Arduino Uno

  32. anubhav singh

    I need it’s circuit diagram …???
    can anyone help me

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s