There are many reasons to build your own Arduino circuit on a protoboard or a custom-designed printed circuit board. At the heart of the Arduino platform is an AVR microcontroller, in usual way you need a special hardware programmer and suitable hex files to program the Atmel AVR chip. Fortunately, Arduino is a beginner-friendly platform because a bootloader is included in the AVR chip which allows you to program the board over the serial port without any dedicated AVR programmer.
The bootloader is basically a small hex file that runs when you turn on the Arduino board. At first looks around to see if the computer (at the serial port) is trying to program it. If so, it absorbs the program code from the computer and transfers it into the AVR chip, in a specific location so as not to overwrite the bootloader. If the computer isn’t trying to upload any code, it instructs the microcontroller to run the code that’s already stored inside.
Now, have a look at our favorite Arduino UNO to find out the AVR chip inside. It is ATMega328P-PU, a low-power version of the traditional ATMega328-PU. The P indicates pico for pico-power which is a technology ATMEL has developed that allows the microcontroller to run with less power. This ATMega328 chip holds a pre-burned bootloader, allows you to upload code without using any additional hardware. So if you are in a plan to make your own open source microcontroller platform – Arduino, no doubt, you need an AVR chip with pre-charged bootloader!
This part of AVR tutorial will teach you how to make your own Arduino chip, ie Atmega328P with Arduino Bootloader. First we need one blank Atmega328P-PU microcontroller with a few supproting components:
If you go through the Arduino IDE you can see an example sketch called “Arduino as ISP”. If you upload this code to your Arduino, it will basically act as an AVR programmer. Next, set-up your Arduino as an ISP. Here is the procedure:
It is probably easier to just install the bootloader from the Arduino IDE. Arduino takes care of all the messy details for you when you burn bootloaders through it. Finally, prepare the hardware by following the wiring diagram shown here. Keep an eye on the pins MISO, MOSI, SCK, Power, Ground, and Reset. These are the pins you’ll need to flash the firmware on your chip.
As stated, the easy way to upload the bootloader involves using the Arduino IDE. Open your IDE select the board you want to program. Then select the programmer (since you are using the Arduino as ISP you will also need to select the COM port that the Arduino as ISP is connected to). Then select Burn Bootloader. This will take the board you selected and look up the associated bootloader in the board.txt file. Next, it will find the bootloader in the bootloader folder and install it.
Yes,now you have an Arduino Chip! You can use this for your next standalone Arduino Project, or to make your own little Arduino board. However, keep it in mind that this is not the one and only proven method for making an independent Arduino chip. You can find numerous ideas, tips and tricks everywhere in internet. Next is the complete schematic diagram of a little Arduino board for your everyday projects. Use the Atmega328P chip, with Arduino bootloader loaded by you, as the brain of this economical circuit.
There are many circuit diagrams available online for building an Arduino on a protoboard, but after an extensive research and after some little tweaks, I’ve come up with this tried and tested circuit. I hope this will help those who want to play in the Arduino world but can’t afford a full fledged, luxurious Arduino Uno board.
Where is the USB?
Yes, you are right! The USB port for interfacing Arduino with your PC is missed here. In Arduino Uno boards, there is an smd chip (IC) which works as a USB to serial converter, allows us to program the Arduino using our computer (Uno R3 uses an ATmega 16U2). Fortunately, this is not a serious problem for you because you can buy a ready-made USB to Serial Converter Module as a powerful and economical alternative resolution!