Step 4: The ATMEGA chip IS a cheap microcontroller!

Picture of The ATMEGA chip IS a cheap microcontroller!

4. The ATMEGA chip IS a cheap microcontroller!

The ATMEGA168 chip, which does everything the Arduino can do, costs about $3.00.  (You can also use the equally cheap ATMEGA328 or ATMEGA328p -- but DONT use an ATMEGA168p -- the Arduino gods decided not to support it for some reason.)

Matjo1 year ago

What is the cheapest option for arduino + wifi? I want to add arduino devices to my cloud. :)

Timv1 Matjo9 months ago

The cheapest wifi I have found is the ESP8266: http://www.instructables.com/id/Using-the-ESP8266-module

koolaid1994 Matjo9 months ago

You probably don't want to go with wifi, its way expensive. I'd suggest getting an ethernet module, they go for $3 on eBay. Since the IC is so cheap, you could just grab a few transmitters and have them interface with the cloud through the one. It's what I plan on doing :)

LcysL1 year ago

You can find cheaply here:


Or at least for reasonable price. It's a Romanian site, but they might send in other countries as well. The cheapest orders have to be around 7 $ US

zootalaws1 year ago

While your $3 really cheap arduino was a great idea when you wrote it, I now buy Arduino Pro Mini's, headerless (but with included headers if I want to use them), for US$2.

So that's a complete Arduino, with LEDs, voltage regulators, etc. for just $2.

For another buck I can buy a USB-equipped Nano v.3.0.

za_tbr1 year ago
I cant seem to burn a bootloader onto the atmega168U-20PU
I seem to not have the correct boards.txt that support the version of the 168P-20PU
or is there a other reason for returning a wrong Device signature ? ( Using Leonardo as ISP )
fault description

avrdude: Device signature = 0x1e940b
avrdude: Expected signature for ATMEGA168 is 1E 94 06
dog digger3 years ago
Chip where I live cost $24!!!!!
Try ebay.com you can find 5 chips for about $12
misellers3 years ago
OR you could use Picaxe chips which start at £2 $3-$4 and all the work is done for you. Picaxe were even selling of their 28X2 module for £6ish.

Yay for Picaxe. I really feel it is under appreciated. It can do many of the things I see people using Arduinos for at a tenth of the price. The programming is easier to learn, and they come in lots of sizes. I encourage everyone to do at least one Picaxe project just to understand the difference.
joshnosh4 years ago
i use an uno for playing around and testing. then i use it to program the chip and put it in my project. all you have to do is use ic sockets so you can reprogram it. you should use sockets anyway.
$3? More like $4.40 if you buy in lots of 100. The atmega chip pictured isn't readily available anymore. The ATmega328 with Arduino Bootloader is the recomended replacement and it's $5. ATmega sells some 6 pin programmable chips that are pretty cheap. If I had a project that was simple and didn't need a lot of pins, I would go for one of those. But you might have to buy 1,000+ since the hobbiest sites don't carry them.
After some research I found some atmega168p chips for $3.30ea. However, the version of Arduino.exe that I have (which I think is current) won't burn a bootloader because the signature bits are off.

I followed the how to program an AVR with arduino instructable. The wiring diagram was wrong and my chips got real hot (but lived)! I fixed it by using the diagram from arduino.cc.

I had to modify the registry because AVRDUDE wouldn't go to com15. I set it to com4. Turns out there is an easier way: http://createforums.irobot.com/irobotcreate/board/message?board.id=Create_Support&message.id=415

Note: The blank chips come set with the internal oscilator and run at 1mhz.

Then I had some issues with the fuses. Below is the final cmd file that works for me. Sets the fuses, burns the bootloader and locks the flash memory.

Warning 1, once you run the last command, you may not be able to undo what you did without a high voltage programmer. (But if you don't do it, the first program you upload will overwrite the boot loader.)

Warning 2, this assumes you have hooked up a 16mhz oscilator and don't want to use the internal 8mhz (lower power) clock.

@echo off
REM Thanks to http://www.billy.gr/arduino-bootloader/
avrdude -p m168 -c avrisp -b 19200 -P com4
echo enter to continue, CTRL-C to exit. Hit enter if you see 0x1e940b

REM Unlock the bootloader
avrdude -p m168 -c avrisp -b 19200 -P com4 -F -U lock:w:0x3F:m
REM Program the fuses
avrdude -p m168 -c avrisp -b 19200 -P com4 -F -U lfuse:w:0xff:m -U hfuse:w:0xdd:m -U efuse:w:0x00:m
REM upload the bootloader
avrdude -p m168 -c avrisp -b 19200 -P com4 -F -U flash:w:ATmegaBOOT_168_diecimila.hex
REM Lock the bootloader
echo run
echo avrdude -p m168 -c avrisp -b 19200 -P com4 -F -U lock:w:0x0F:m
echo when you are sure you want to lock the bootloader. You might not be able to undo this.
jackzylkin (author)  dustinandrews5 years ago
You can get them for less than $3.00. Look here: http://www.mouser.com/ProductDetail/Atmel/ATmega168-20PU/?qs=sGAEpiMZZMvu0Nwh4cA1wUVlLgw9m2DPTt620necFl4%3d