Introduction: Breadboard Arduino the Right Way


There are literally hundreds of Breadboard Arduinos out there, so what is different about this one? Well there are several things that most of them aren't doing right. Even Arduino dev boards themselves have somewhat limited flexibility and lack a breadboard area (though there are very good reasons for that). First of all, the analog supply is tied to the digital supply. There is a reason Atmel brought them out on separate pins. The digital section generates noise that can interfere with analog conversions. Atmel/Microchip recommends a 10µH inductor and separate capacitor for AVCC to filter this noise. I did not use this inductor or the ferrite bead recommended for VCC, but if you're going to do serious analog stuff, it's a good idea to use them. The stray inductances of the breadboard and jumpers do help some.

Another improvement concerns the RESET line. In order to allow HVPP mode, AVRs have no ESD protection on the RESET pin. So if you aren't high voltage programming, it is recommended to use a diode to help protect against ESD. All of this is covered in the AVR042: AVR Hardware Design Considerations application note from Atmel/Microchip. There is an apparent limited awareness of this document.

Another common practice is to place a capacitor directly across the switch on the RESET line. This can generate high voltage spikes according to AVR042. This is not done so much with AVRs, (probably because it kills them outright) but is often seen with many other micros and even on manufacturer's dev boards. Relying on the internal ESD protection of the Atmega in this way is just bad design in my opinion.

Step 1: Gather Materials

BOM for this project:

  • (1) 630 (830) hole solderless breadboard
  • (1) Assorted breadboard jumper wires kit or 24AWG solid core wire silver or tin coated
  • (1) USBtinyISP, Arduino ISP, etc.
  • (1) 6-pin ISP breakout or male to male DuPont wires
  • (1) Atmel ATmega328P-PU AVR Microcontroller (28-pin DIP)
  • (1) Green 3-5mm LED indicator
  • (1) 1N914/1N4148 fast diode
  • (1) 9mm shaft tactile pushbutton switch
  • (1) 16MHz quartz crystal oscillator, 15-20pF
  • (1) Ferrite bead (optional)
  • (1) 10µH inductor (optional)
  • (1) 10µF multilayer ceramic
  • (4) 100nF monolithic ceramic
  • (2) 22pF ceramic disc
  • (1) 4.7k 1/4W resistor
  • (1) 680Ω 1/4W resistor
  • (1) 330Ω 1/4W resistor

For the switch, pay a little extra and get something decent. The commonly available square tactile switches have reliability issues that are well known to experienced engineers.

Step 2: Begin the Assemblages

Mount all low height components and jumpers first. Cut component leads down to 8mm below the lowest point on the component body after bending whenever possible. However DO NOT CUT the leads of the 3 components used in the next step except as following. Only cut the leads of each component even with the shortest lead on that component to make them even in length and as long as possible.

Be extra careful with disc capacitors. The dip encapsulation coating is fragile where it covers the leads near the component body and breaks off easily if they are flexed in this area. This can be a vector for moisture ingress and cause unwanted capacitance drift.

Pin 1 of the ATmega should go into row 11 to make it easier to find pins. Pin 5 is row 15, pin 10 is row 20, etc.

One 100nF capacitor goes from A11 to GND, it's hard to see it in the photos. The 330Ω resistor is in holes D10 and D11. The Fritzing diagram makes it easier to see what goes where.

The other 100nF caps go in D17, D18, another in G17, G19, and another in H17, H18.

The jumper going to AVCC may optionally replaced with a 10µH inductor. If your analog measurements require it, it will help with noise.

The optional ferrite bead goes to VCC. It's important to include one if you plan to use noise generating components, such as 7400 series logic chips. Remove the VCC jumper and replace it with the ferrite bead.

Don't forget the jumpers carrying + and - across to the opposite side of the breadboard. Otherwise only one side will be powered! There are no internal connections made between them in breadboards. You probably already know this unless this is your first time prototyping on a breadboard.

Step 3: ISP and the High Stuff

The taller components come next. These are the diode, the 4.7k resistor, and the quartz crystal. Be sure to observe the polarity on the diode. The cathode band end goes to the + supply. Yes it is supposed to be reverse biased.

When everything is connected as shown and you are sure nothing is shorting out, it's time for the ISP squid wires. Pins 17, 18, and 19 on the ATmega are MOSI MISO and SCK respectively. RESET can go to J10 with this type of switch. VCC and GND are + and - of course.

Step 4: The Optional Bootloader

It is necessary to flash a serial bootloader into the ATmega microcontroller to facilitate "uploading" of sketches from Arduino IDE. Otherwise it will only be possible to upload them using ISP. Serial is much faster, but the bootloader takes up a little bit of the flash memory space that would otherwise go to your sketch and slows the boot process. Optiboot is recommended if you go this route and is very small. Personally, I forego the bootloader and just use ISP.

Another consideration is weather to power over ISP. For instance, the USBtinyISP has a jumper inside to power the target. Old phone chargers also make an excellent power source. USB breakout boards are available or just cut off the connector and strip and tin the wires if you're brave. I had an Android charger that caught on my leg and busted, so the choice was very easy. With squid wires leave out the VTG/VCC pin on the ISP when powering externally or leave it connected and take off the jumper.

Just BE CAREFUL with power connections. It is very very easy to reverse the polarity and it's one of the few things that the ATmega has no protection for. It will instantly kill a micro and you may not have many of them on hand to replace it. There is no solution to this problem except to check again and again before applying power. When you think you have checked 2 or 3 times, check again. A beginner will not see this coming and when it happens the frustration and humiliation is enough to make one quit. But you should not quit! During the design process sometimes things just get broken. When you build something and nothing goes wrong it feels weird. It should feel weird because all who walk this Earth are error prone.

Step 5: Conclusion

You're all done now. Upload the blink example sketch as a test and the LED should begin to flash. I wrote a simple interrupt driven blink sketch. It's somewhere on the web.