Build the Arduino board using ATMega8/168/328 chip

This post is for who want to learn Arduino but a thin pocket to buy a relatively expensive Arduino board. Or for those who really love the person who tinkers electronic hardware. Microcontroller ATmega 8, 168 and 328 have the same number of pin is 28 for DIP packaging, microcontrollers are selling a lot of this type are relatively cheap compared with other microcontroller. By having one of the microcontroller and coupled with a few components can actually function like the original Arduino board.

Build an Arduino board

To make the Arduino microcontroller there are many choices of which will be used. But in this post could use the ATmega 8, 168, 328. I use the ATmega 328 with larger program memory capacity is 32KB. this post could use the ATmega 8, 168, 328. I use the ATmega 328 with larger program memory capacity is 32KB.

Components are supposed to provide are:

  1. IC1: Microcontroler ATMega8/168/328, it’s up to you please choose one.
  2. Q1: Resonator Crystal about 8MHz or 16MHz.
  3. R1: pullup resistor for reset about 1K – 10K.
  4. C1 and C2 about 22pF.

 You can build on perforated veroboard or breadboard. By using the breadboard pins you can connect using a single wire diameter of 0.5mm. If using veroboard, to connect between the pin, use a single 0.5mm wire soldered directly.

Build on breadboard

Build on perforated board

VCC supply voltage is 5VDC, not to reverse the polarity, if it does then it will make the microcontroller burned.
To fill the bootloader program, usually using ICSP with 4 signal MISO, MOSI, SCK and RESET. I recommend using USBasp can be made using the ATmega8 microcontroller.
Supply voltage of 5V can disuply USBasp programmer, by taking power from the computer USB port. How to make USBasp programmer click here.

I built USBasp like the one on this link.

Burn bootloader

To upload program serially using the Arduino IDE, bootloader program should be flashed into chip ATmega328. Bootloader is used if you are uploading a program via the serial RS232 interface.  This uses pins of RX / TX’s  microcontroller, in addition to the RST pin is used to reset automatically when the upload program.

But if you do not use this method, there are other ways to use the pin MOSI, MISO, SCK, RST of microcontroller, by using a USBasp programmer or other. The Arduino IDE of 1.0.1 version capable to program this method via this pins. In this way the bootloader certainly not required.

To burn bootloader:

  1. Connect the USBasp programmer to MISO, MOSI, SCK, RST of microcontroller pins.
  2. You can use the 5V power supply of USB/programmer or use a separate power supply.
  3. Run the Arduino IDE.
  4. Select menu Tools->Board-> “Nano Arduino w / ATmega328″. Chip is recognized as a bord ATMega Nano with 16MHz crystal.
  5. Select menu Tools->Programmer->USBasp. If you are using another programmer choose accordingly.
  6. To burn bootloader. Select menu Tools->Burn Bootloader.

Equally important is to know the connection USBasp programming on the programming process to succeed. At USBasp There are two types of connectors and 10pin 6pin. I use the 10pin type USBasp homemade.

Programming pin on USBasp is MISO, MOSI and SCK are connected to the MISO, MOSI and SCK the target microcontroller. While RES is connected to the RESET to reset the target microcontroller into program mode. VTG is a voltage source while the +5 V from USB port of your computer. GND is the common channel. So the total that must be connected to the microcontroller board is 5 cable if you have a supply voltage of +5 V itself. If the board and do not have a +5 V supply and is obtained from a computer USB, VTG microcontroller is connected to VCC. Care should be taken not to both, to avoid damage to the computer because the voltage to be clashing.

YouTube Preview Image

Upload Program

To test whether the bootloader worked fine, tried to upload a program from existing examples on the arduino called “blink”. Connect your computer TX -> Arduino RX (pin 2), RX computer -> arduino TX (pin 3), DTR computer -> Arduino RESET (pin 1). Remember the three channels of serial computers must have a TTL logic level voltage 0 V or 5V. If you use a USB to serial in general, the output is still in its early stages RS232 voltage levels. To convert RS232 to TTL voltage levels using MAX232 IC.

YouTube Preview Image

Last updated by at .

Avatar of Bambang Siswoyo

About Bambang Siswoyo

I am a college lecturer since 1988 at UB (University of Brawijaya) in the electronics department. My experience: Applications of Microprocessor system, Applications of Control System, Applications of Field Programmable Gate Array, Computer Programming in computer instrumentations. My hobby: Music especially playing the saxophone, hiking and exploring the countryside.
This entry was posted in Arduino, Tutorial and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>