Let's Make Robots!

How hard would it be to build an Arduino?

I recently assembled the Really Bare Bones Board, pictured below.  It's an Arduino clone in a smaller and more affordable package.


The board is $12, which is a great deal.  But I want to lower my costs as much as possible.  During a 3-hour car trip today my mind was racing with ideas for potential robots, and I began realizing that for the projects I want to do I'm going to need multiple embedded microcontrollers.  What's more, each microcontroller board will need different appendages ... some with their own voltage regulation, others with motor controllers, some won't need analog input, and some will need LED's while others won't.  I like the idea of having each board with its own specific functions and abilities, rather than wasting money on an all-around package with some things I don't need and lacking something I might need.

Anyway ... the point is that it might make more sense for me to buy ATMega168's with the Arduino bootlegger and make my own microcontrollers.  Problem is ... I'm not entirely sure how to do that ... so maybe you guys can help me out? 

Ok so here's what I know I need: The ATMega168 needs a steady supply of 5 volts.  That's easy enough to pull off with a voltage regulator and a couple of capacitors. Next up is the resonator ... which I have a fairly good understanding of.  I know what pins to connect to, anyway, which I guess is all that matters.  Next up is a test LED, which of course is super easy.  And lastly the reset button, which I'm sure I can figure out.

Other than that, though, I don't know what the microcontroller needs to do its thing.  Looking at the RBBB, I don't know what all that stuff does.  What are the two capacitors for, for example?  There are two 47uF capacitors and I don't know what they do.  Does it allow for analog input via a resistor-capacitor circuit?  What about that diode there?  Is that for blowback voltage?  How about those resistors?  And lastly ... I'm very embarrassed to say I don't even know what the blue thingies are.  I'm assuming they're capacitors, but I could be wrong.

Thanks for helping out a beginner!  Sorry for the big blocks of text ... there's just so much I still don't know!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I ran across this ...


So ... this Arduino has no capacitors.  If it can function without them, then what the heck are they for? 

Also, this is the RBBB schematic.  It kinda ... sorta ... helped me.  Well really it just confused me further.


The Arduino has small (22pf) capacitors near the crystal, which are required to guarantee that the oscillator starts up.  But if you're using a ceramic resonator, as shown in the photo, that device includes the capacitors so that you don't need to add them.  But, a ceramic resonator is not as accurate a frequency source as a crystal, which may or may not matter according to your application.  Resonators are also a little bit cheaper than crystals.

There are also some capacitors for decoupling (not quite the same thing as smoothing), connected from Vcc to Ground close to the chip.  The circuit shown in the photo omits these capacitors, which is a bad idea.  The circuit will appear to work, at least at first, but may be subject to random crashes.  The thing is, when a microcontroller crashes, how do you know whether your program had a bug or your hardware had a glitch?  It's best to include the decoupling capacitors and make a reliable controller for your robot.

Ok so voodoobot pretty much answered all my questions in the shoutbox, but I'll leave this topic here in case anyone else has something to add.

Meanwhile, I (and voodoo) am seeking out a way to make an absolute bare minimum Arduino for under 5 dollars.  Not sure if it can be done, but I've started researching ATMega168-20PU prices, since it's the most expensive component.  I'll post my findings here as I continue to search.

$3.30 - http://www.onlinecomponents.com/product/3588566/ - A great deal.  Free ground shipping, too.  Unfortunately ... $35 minimum, so only worth it if you order a bunch of other stuff from them (or 12 ATMega's).  Maybe worth a one-time investment to have a whole bunch of chips on hand?

$3.35 - http://www.sureelectronics.net/goods.php?id=717 - Shipping to California calculated at $4.18.

$3.68 - http://store.fundamentallogic.com/ecom/index.php?main_page=product_info&cPath=4_7&products_id=16&zenid=94c85636ee14e7f5cf827a12183e7458 - Calculated shipping to California was $2.27. 

$3.90 - http://www.seeedstudio.com/depot/atmega16820pu-28pin-dip-w-arduino-bootloader-p-55.html - My shipping (to California) was calculated at $2.58 for one chip.  

$4.11 - http://parts.digikey.com/1/parts/552130-ic-avr-mcu-16k-20mhz-28dip-atmega168-20pu.html - Couldn't see shipping costs without entering my payment info. 

$4.95 - http://www.sparkfun.com/commerce/product_info.php?products_id=8846 - If you're already ordering from SparkFun, it'll be more cost effective to throw this in your basket and pay a bit more for the product itself.  Plus, you don't have to worry about burning the Arduino bootlegger.  Not to mention ... who doesn't love SparkFun? 

$3.23 - https://emwcs.avnet.com/webapp/wcs/stores/servlet/Product_-1_500201_500201_part_0_3591975 - Don't be fooled by the low price ... shipping is $8.00. 

Probably just smoothing capacitors of some kind.

All you really need is the chip and bootloader, resonator or crystal, and a steady 5v. A reset switch and pullup resistor are good too.

Heres an arduino on a breadboard.


There is a website around where they show you how to use an arduino to write the bootloader to other atmega168s so you don`t even need a programmer.

I have had good luck with Fundamental Logic. Their prices and delivery are excellent.
Thanks ... looks like that's the most affordable option with shipping.  Added to the list.

Here is another writeup about making a standalone Arduino. 




Ok so then the most affordable option is probably to just focus on the resonator and a steady +5v, and then program the Mega168 in a real Arduino.

I'm wondering if the resonator would work more easily than the crystal. I tried buildng the setup mentioned, though with caps instead of without, and wasn't able to get things to work when usng a crystal. once soldered though, the crystal worked fine. I tried this on two different breadboards with two different ardys and 2 different crystals...(plus the 22pf caps).


Because the conductors are relatively close on a solderless breadboard, they tend to act a little like capacitors. Higher frequency (MHz) stuff tends to stop working on these, but can do better on a soldered breadboard.