Main

Research & Learning

Class pages

Shop Admin

ITP Help Pages
Tom's pcomp site
DanO's pcomp site


Arduino Breadboard

Overview

This tutorial is about building an Arduino compatible breadboard with an ATMEL8 AVR microcontroller and FTDI FT232 breakout board from Spark-fun. The two skematics this is based on are here and here

created June 2, 2006 by Carlyn
last updated July 11, 2006 by Carlyn

To do this, you'll need:

the supplies
The Supplies

Basic Parts for wiring up Arduino

  • A breadboard
  • 22 AWG wire
  • 7805 Voltage regulator
  • 2 LED
  • 2 220 Ohm resistors
  • 1 10 k Ohm resistor
  • 1 10 uF capacitor
  • 1 (or 2) 1 uF capacitor
  • 16 MHz clock crystal
  • 2 22 pF capacitors
  • small momentary normally open ("off") button

Parts for wiring up USB communication with computer

Here you have 2 options, the slightly cheaper build your own breakout board and USB connector option, or a ready made adapter from Spark Fun. We don't have the ready-made adapter yet, but we will follow up with that when we get it

Option 1:

This is the option we are using in the below tutorial and it involves surface mounting the FTDI Chip on the the board yourself and making a little adapter for the USB connector because they are really annoying to hand solder directly on to wires...

  • 1 USB Female Type B Connector mounted on perf-board with some headers
  • FTDI 232RL USB to serial converter chip
  • SSOP to DIP Adapter 28-Pin SKU#: PCB-SSOP-28

Option 2:


Step 1: Power the board

If you've already worked with microcontrollers, it is likely that you already have a preferred way to wire up a power supply to your board, so go ahead and do it that way. In case you need some reminders, here are some pictures of one way to go about it. (We are going for a 5V regulated power supply)


wires
Power lines

Add the 7805 power regulator and the lines to power the board. The regulator is a TO-220 package where the in-line from the external power supply goes in on the left, ground is in the middle and the 5V out is on the right (when facing the front of the regulator). We're putting lines across the board to have a little more room for our power supply down the road. You should also add wires to both side-strips of the breadboard leading from the rows that are the "ground" and "out" of the power regulator.


the supplies
Add the 7805 (A)


the supplies
Add the 7805 (B)


the supplies
Add the capacitors

These capacitors and power regulator aren't strictly necessary if you're only ever going to power the board from the USB port. They are convenient to have in place just in case you need to wire up a motor or are running a program that doesn't need to be actively communicating with the computer, etc.


the supplies
LED

Here there is an LED to signal that the board is getting power on the bottom left. Some people like to power the led across the foot of the board so you can see that both sides are wired up correctly.

the supplies
Blank Canvas

Now that the power-basics are done we are ready to load on the chip!


Step 2: ATMEGA8 Basics

the supplies
Add the Chip

Like other microcontrollers, the AVR chips also need that trusty 10k Ohm resistor "up" (to power) on their master-clear / reset pin in order to prevent the chip from resetting itself during normal operation. The RESET pin reboots the chip when it is linked to ground. We are going to use that feature later, but for now we just want the chip to run steadily so we hook it up with a high-valued resistor to power.


the supplies
Power and Ground

Basic power and ground lines. You can get more information from the Summary Datasheet or the 300 page Long Version

  • Pin 7 - Vcc - Digital Supply Voltage
  • Pin 8 - GND
  • Pin 22 - GND
  • Pin 21 - AREF - Analog reference pin for ADC
  • Pin 20 - AVcc - Suppply voltage for the ADC converter. Needs to be connected to power if ADC isn't being used and to power via a low-pass filter if it is (a low pass filter is a circuit that cleans out noise from the power source, we aren't using one)


the supplies
Add the Clock

16 MHz external clock with two 22 pF capacitors running to ground.


the supplies
LED on pin "13"

The chip I'm using on this board is actually already programmed using the blink_led program that comes with the Arduino software. If you already have an Arduino printed circuit board running it is a good idea to go ahead and check the breadboard version you are building with a chip you know works. The blink_led program blinks pin 13. Pin 13 on the Arduino is NOT the AVR ATMEGA8-16PU pin 13. There is a nice little picture of the Pin Mapping on the Arduino site.


the supplies
Basic Board Done

At this point if you had already programmed your chip somewhere else and didn't need this breadboard circuit to reprogram the chip, you could stop here. But part of the fun is in-circuit programming so keep going to really make a full USB-Arduino-circuit on a breadboard!


Step 3: Arduino-Ready

the supplies
the RESET pin

This is where we take advantage of the RESET pin as the way to prepare the chip to recieve a new program from the Arduino sotware. In this step we add a little momentary button and hook it up so that when it's pressed the RESET pin gets exposed to ground. The chip then reboots and listens for any signal being sent to it via the USB port that might represent a new program.


the supplies
Add FTDI FT232

Here we've already gone ahead and mounted the surface mount chip on the spark-fun breakout board listed in the materials, stuck it into the breadboard and added the power and ground lines. You can look at the FT232R Datasheet. The pins down the left of the breakout board are conveniently the pins down the left of the chip as pictured in the datasheet.

  • Pin 4 - VCCIO - +1.8V to +5.25V supply to the UART Interface and CBUS group pins (1...3, 5, 6, 9...14, 22, 23)... UART stands for "Universal Asynchronous Receiver Transmitter" and basically this pin determines what voltage the USB port will transmit as "high"
  • Pin 7 - GND
  • Pin 26 - TEST (to GND) - Puts the device into I.C. test mode. Must be tied to GND for normal operation.
  • Pin 25 - AGND (to GND) - Device analog ground supply for internal clock multiplier
  • Pin 21 - GND
  • Pin 20 - VCC - 3.3V to 5.25V supply to the device core.
  • Pin 18 - GND


the supplies
Blue lines

Here we connect the AVR ATMEGA8 RX (pin 2) to the FT232 TXD (pin 1) and the ATMEGA8 TX (pin 3) to the FT232 RXD (pin 5)


the supplies
Add the USB socket

Now take your USB socket and put it on the board. You will definitely want to check the data sheet of any USB socket you buy to make sure you know how the pins line up because they are determined by industry standards. The USB cable is going to put power out where it puts power out, not where you decide to put the red wire! In the "Type B" kind we use it goes kinda like this.


the supplies
Connect USB socket

So once you get your USB port straightened out - you can connect it to the FTDI 232RL like this:

  • Pin 21 - Ground (black) The ground reference (coming from the computer) for the whole board
  • Pin 20 (VCC) - Power' (red) The power supply (coming from the computer) for the whole board

You may find that you have to run this breadboard version of things directly from the computer or a well powered hub.

  • Pin 16 - USBDM - USB Data Signal Minus, Yellow wire
  • Pin 15 - USBDP - USB Data Signal Plus, Blue wire


the supplies
Fin

And there you have it... ready to be plugged in, powered up and programmed!


  Edit | View | History | Print | Recent Changes | Search Page last modified on January 24, 2007, at 05:03 PM