Once you have perfected a project to your liking on the Arduino Uno, moving it on to its own circuit offers several benefits:
- It free up the Arduino Uno, so it can be used for another project.
- The project can run on lower power than it runs on the Arduino Uno.
- The project can be made more compact and durable by housing in a suitable enclosure.
- It is less costly than having to dedicate an Arduino Uno for each project that you want to make permanent.
The first step in moving a project onto its own circuit is to replicate the Arduino Uno’s functionality on the external circuit.
Sounds complicated? Actually, it turns out to be quite simple.
Arduino Uno is built around the Atmel ATmega328-PU microcontroller. In addition to the microcontroller itself, the Arduino Uno board contains a lot of bits and pieces of circuitry that, for example, regulates power and manages communication with the computer. Most of these extra circuitry are actually not required when you make your project permanent.
Lets discuss how we can get the ATmega328-PU microcontroller running on your own breadboard.
To get started, gather the following stuff:
- 1x ATmega328-PU microcontroller
- 1x breadboard
- 1x 16 Mhz crystal oscillator
- 2x 22 pF ceramic capacitor
- 1x 10µF capacitor
- 1x 10kΩ resistor
- 1x 460Ω resistor
- 1x LED
- 1x LM7805 voltage regulator
- 22 gauge breadboard wire
First, we need to load a program onto the microcontroller, so we can verify whether our circuit is running correctly. For convenience, lets use the ‘Blink’ example sketch which comes with the Arduino IDE.
The simplest way to load the program onto the microcontroller is to carefully replace the chip on the Arduino Uno with our own, and load the ‘Blink’ sketch onto it using the Arduino IDE. Once the sketch is loaded, make sure the onboard LED (connected to digital pin 13) is blinking according to the sketch. Then, extract the chip out of the Arduino Uno and replace the original microcontroller.
Be careful not to break any pins when you remove the chip from the socket; this is easily said than done. If you do not have a chip extractor tool, you can use a couple of screwdrivers to lift the chip from both ends. Also, if your ATmega328-PU did not come with the Arduino Uno bootloader, you will first need to bootload it using the Arduino IDE, before loading the ‘Blink’ sketch.
Great. Then, place the microcontroller and the other components on the breadboard as per the schematic. As you may see, I’ve placed a 10uF capacitor across the power rails of the breadboard to stabilize any noise in the input voltage. This is not a must, but its better if you can have it. Do yourself a favour by using cut-to-length breadboard wires; as tempting as it is to use jumper wires to connect it all together, it will result in a rather messy circuit!
To keep things simple, the LM7805 voltage regulator is shown separate from the rest of the circuit. In fact, depending on the components used in the project, you will be able to skip the voltage regulator altogether and power it with just 2 AA batteries; our ‘Blink’ example definitely can be. You can add in the voltage regulator if you intend to use a voltage source of more than 5V.
Once you have put everything in place and wired up the components, triple-check to make sure that nothing is connected to where it shouldn’t be.
Then, power up the circuit. With any amount of luck, the LED should start to turn on and off in one second intervals. Congratulations, you have made your own barebones Arduino Uno with much less components!
If the LED doesn’t blink, immediately disconnect power, and check the circuit for any loose or incorrect connections. If you are using batteries, you may also want to check that they have not run out of juice. The ATmega328-PU chip can take some mishandling before going out in smoke; your circuit should run once any errors are traced and fixed.