There are numerous motivations to assemble your own Arduino circuit on a breadboard or PCB. It consumes less space in the breadboard, cheaper than Arduino boards or perhaps you won't be utilizing a shield, yet despite everything you need an Arduino as the heart of your Project.
The following steps will outline how to assemble the circuit on a breadboard.
This tutorial demonstrates to you how to construct an Arduino in a breadboard with an Atmel Atmega8/168/328 AVR microcontroller and USB to TTL converter breakout board.
Step 1: Components required:
7805 Voltage regulator
Two 220 Ohm resistors
10k Ohm resistor
Two 10 UF capacitors
16 MHz clock crystal
Two 22 PF capacitors
Small momentary normally open (“off”) button.
You will also need a USB to TTL logic converter for programming.
Step 2: Add Power Supply Components:
The Power Socket in the Arduino can accept the voltage range input of 7 to 16 volts. Mostly 9v battery or an adapter is used. As most of the Sensors and chips works on 5V we need to cut down the input voltage to 5V using 7805 voltage regulators.
Fig. 2: Adding Power Supply On Breadboard for Arduino Cloning
The 7805 voltage regulator is a TO-220 package. Holding the printed side of 7805 IC facing you. Connect the positive input from the external power source to the first pin (left side). Negative to the middle pin and the third pin will give the output of 5V. Add wires to connect the output side of the regulator to the power and the ground to the ground rail.
Use 10µF capacitors for the decoupling purpose between the input and the ground. And another capacitor in the output side i.e 5V and the ground. Note: These capacitors are polarized, a negative side to the ground and the positive side to the 5V.
You can place the power LED to the input source and at the top of the breadboard.
Fig. 3: Power Led At Top Of Breadboard
Step 3: Installing Board Components
Install the ATmega328/168/8 chip, so the notched side of the IC is at the top. Add the 10KΩ pull-up resistor to the +5V and connect the other end to the RESET pin on the ATmega (pin 1). Add jumpers for power and ground for the following pins.
Pin 7 – VCC (+5V)
Pin 8 – GND
Pin 22 – GND
Pin 21 – AREF, analog reference pin for ADC (+5V)
Pin 20 – AVcc, the supply voltage for the ADC (+5V)
Pin 20 needs to be connected to power if ADC isn’t being used, and if it is, it needs to be connected to power via a low-pass filter which is a circuit to reduce noise from the power source).
Fig. 4: Installing ATmega328/168/8 chip On Breadboard
Add the 16MHz external crystal between Pin 9 and Pin 10 of the ATmega. Then add one 22pF capacitor from Pin 9 to the ground, and the other 22pF capacitor from Pin 10 to the ground.
Fig. 5: Installing 16MHz External Crystal & 22pF Capacitor On Breadboard
Add the momentary button as a reset switch so it spans the gap on the breadboard the same way the IC does. Add a small jumper wire from Pin 1 of the ATmega to the bottom leg of the pushbutton (pin closest to the IC). And add another jumper wire from the top left leg of the pushbutton over to ground. Add the Arduino Pin 13 LED. Connect a jumper wire from Pin 19 of the microcontroller to the LED anode (longer lead). Use the remaining 180Ω resistor to connect the LED cathode (short lead) to the ground rail.
Fig. 6: Installing Momentary Button On Breadboard
Note: Pin 13 on the Arduino is not the same Pin 13 on the ATmega328 IC. Pin 19 on the IC is actually the pin for Digital Pin 13 on the Arduino. If you just unsure or want to see the point for the ATmega8 IC, refer to the diagram below.
Fig. 7: Pin Configuration Of ATmega8 IC For Arduino
Fig. 8: Arduino Pin Mapping Of ATmega8 Ic
Furthermore, there you have it… prepared to be connected to, Power up and program
Burning the Bootloader:
Preparing the hardware:
Connect as shown in the below diagram.
Fig. 9: Hardware Circuit Diagram Of Cloning Arduino
Preparing the software:
Well, you just need to follow the instructions carefully. I’ve added 2 files, that you need to replace. Follow the instructions to replace.
0. Download the IDE.
1. Make a copy of the complete folder where your IDE is. (I named mine arduino-1.0.1 – Copy)
2. Open the new folder.
3. Navigate to … arduino-1.0.1 – Copy hardwaretoolsavretc
4. Find a file called avrdude.conf
5. Replace it with the file I attached. 6. Navigate to … arduino-1.0.1 – Copy hardwarearduino
7. Find a file called boards.txt
8. Replace it with the file I attached.
9. Close everything.
Excellent, now we only have to burn the bootloader and our cheapy micro will work just like a normal one.
Setting your Arduino as ISP:
First, we have to make our Arduino as ISP, In other words, we are making our Arduino as an ISP programmer.
1. Plug in your Arduino UNO through USB to your computer. (WITH ONLY USB)
2. Open IDE
3. Open > Examples > ArduinoISP
4. Select Arduino UNO from Tools > Board
5. Select your serial port from Tools > Board (Mine is usually COM3, but it may change.)
6. Upload sketch.
Fig. 10: Setting Arduino As ISP
With everything connected open IDE from the folder you just created (the copy).
1. Select Arduino328 from Tools > Board
2. Select your serial port.
3. Select Arduino as ISP from Tools > Programmer
4. Select Burn Bootloader
It will take some time, You can now use your cheap ATMega8/168/328 as a normal Arduino. For detailed information watch video.