The arduino’s great features like powering via the USB port, serial programming, and easy-to-access headers make it indispensable while developing your project. However, there are times when you may want to make your project more permanent without sacrificing your arduino.
It’s actually quite easy to create a somewhat-less-feature-rich version of an arduino on a prototyping board that you can safely leave embedded in your projects. You could also develop and etch your own PCB for this but due to the simple design, it is just as easy to create on a perf board or a prototyping board.
The diagram below shows the basic connections needed to get the Atmega328 operational. If you don’t need in-system programming capabilities, your project may be OK to just use these.
There are numerous great resources on the web for basic connections needed for a standalone arduino.
You may have noticed that on Arduino boards there is a 6 pin header labelled “ICSP”. This is the In-Circuit System Programming header. This is wired to the following pins on the Atmega328P:
It is not required, but it is suggested to create a 6 pin header to match the Arduino’s. This will make programming connections easier and universal between programmers.
The Arduino boot loader is described here fully, but it is essentially a small program that has been loaded on to the microcontroller. It allows you to upload code without using any additional hardware.
The Arduino IDE makes burning the boot loader easy. It’s as simple as selecting it in the Tools menu. This works in Linux as well as Windows. Prior to burning, you’ll want to make sure you have the correct board chosen. This is also in the tools menu (Tools -> Board).
One of the main purposes of the bootloader is to allow you to program your microcontroller via the serial port. This convenience is nice when you have a built-in serial chip like in the Arduino board. However, if space is at a premium in your project, you can still program the microcontroller in-circuit without having to add the hardware necessary for serial communication.
If you already have an AVR programmer like the AVR-ISP mkII, then burning the bootloader is as simple as connecting to the header on your project and selecting the following from the Arduino menu:
Tools -> Burn Bootloader
Once this is complete, you essentially have your embedded arduino ready for action! The next step is to upload a sketch. Again, if you have an AVR programmer, this is as simple as the following:
File -> Upload Using Programmer
If you don’t have a programmer, never fear…you can use your Arduino board as one! This excellent tutorial walks you through the steps. Note that the wiring is essentially the same as connecting the ISP headers between the arduino and the target (embedded) arduino.
Thanks and Happy Building!