After having fun and experimenting with your Arduino, you will most likely think of various projects that could be self-contained, if only they didn’t rely on using a whole Arduino or compatible board. Or you may wish to experiment with the Arduino platform at a lower cost. In these and many other cases you can, in fact, build your own Arduino-compatible circuit using a solderless breadboard.
After looking at your full-sized Arduino you may think that the circuitry is quite complex, however, in reality, it is very simple… and by following the instructions detailed below you’ll have your own version operating in a short period of time.
Basic Parts for wiring up Arduino
- A breadboard
- 22 AWG wire
- 7805 Voltage regulator
- 2 LEDs
- 2 220 Ohm resistors
- 1 10k Ohm resistor
- 2 10 uF capacitors
- 16 MHz clock crystal
- 2 22 pF capacitors
- A tactile button
Furthermore, if you don’t have a regulated 5V DC power supply – you can make a simple one that fits right on the breadboard, using the following parts shown below:
Listed from left to right are:
- 7805 voltage regulator
- two 100 uF 25 V electrolytic capacitors
Using these parts allows you to use a power supply of between 7 and 12 V DC. You will also want a variety of jumper and connecting wires to use with your solderless breadboard
Adding circuitry for a power supply
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. (This version uses a 5V regulated power supply)
Add power and ground wires for where your voltage regulator will be.
Add power and ground wires at the bottom of your board connecting each rail.
Add the 7805 power regulator and the lines to power the board. The regulator is a TO-220 package where the Input from the external power supply goes input on the left, ground is in the middle and the 5V output is on the right (when facing the front of the regulator). Add power OUT and ground wires that connect to the right and left rails of the breadboard.
Also, add a 10uF capacitor between the IN of the regulator and the ground as well as a 10uF capacitor on the right rail between power and ground. The silver strip on the capacitor signifies the ground leg.
Add a LED and a 220-ohm resistor on the left side of your board across from the voltage regulator. A LED attached to power like this is a great troubleshooting trick. You’ll always know when your board is being powered as well as quickly know if your board is being shorted.
The red and black wires to the left of the voltage regulator is where your power supply will be plugged in. The red wire is the POWER and the black wire is the GROUND. Be sure to only attach a power supply that is between 7-16V. Any lower and you won’t get 5V out of your regulator. Any higher and your regulator may be damaged. A 9V battery, 9V DC power supply, or 12V DC power supply is suitable.
Now that the power-basics are done you are ready to load on the chip!
Before moving on, check out this image. It’s a great resource for learning what each of the pins on your Atmega chip does in relation to the Arduino’s functions. This will clarify a lot of confusion behind why you hook up certain pins the way you do. For even more detailed information, take a peek at the datasheet for the Atmega 168 (short version) (long version). Here’s the sheet for the atmega328 (short version) (long version)
Start by connecting a 10k ohm pullup resistor to +5V from the RESET pin in order to prevent the chip from resetting itself during normal operation. The RESET pin reboots the chip when pulled down to ground. In later steps, we will show you how to add a reset switch that takes advantage of this.
- Pin 7 – Vcc – Digital Supply Voltage
- Pin 8 – GND
- Pin 22 – GND
- Pin 21 – AREF – Analog reference pin for ADC
- Pin 20 – AVcc – Supply 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 reduces noise from the power source. This example isn’t using one)
Add a 16 MHz external clock between pin 9 and 10, and add two 22 pF capacitors running to ground from each of those pins.
Add the small tactile switch so that you can reset the Arduino whenever we’d like and prepare the chip for uploading a new program. A quick momentary press of this switch will reset the chip when needed. Add the switch just above the top of the Atmega chip crossing the gap in the breadboard. Then, add a wire from the bottom left leg of the switch to the RESET pin of the Atmega chip and a wire from the top left leg of the switch to ground.
The chip used 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. Pull the chip from your working Arduino and try it on this board. The blink_led program blinks pin 13. Pin 13 on the Arduino is NOT the AVR ATMEGA8-16PU/ATMEGA168-16PU pin 13. It is actually pin 19 on the Atmega chip.
Refer to the pin mapping above to be sure you are plugging it in correctly.
Finally, add the LED. The long leg or the anode connects to the red wire and the short leg or the cathode connects to the 220-ohm resistor going to ground.
The Next tutorial will cover How to load ‘The bottloader’ on theATMega328-PU chip( Available Now or Call +254716806025) and how to program the ‘Arduino-on-a-breadboard’ using an Arduino Uno or Mega.