Since Arduino is opensource the information needed to build your own Arduino on a breadboard is easily available. In this post we will be building our very own very simple Arduino on a breadboard.
What you will need for this project:
- 2x 22pF ceramic capacitor (Buy on Amazon)
- 1x 10µF capacitor (Buy on Amazon)
- 1x pushbutton (Buy on Amazon)
- 1x 16Mhz crystal (Buy on Amazon)
- 1x 10kΩ resistor (Buy on Amazon)
- 1x 220Ω resistor (Buy on Amazon)
- 1x LED (Buy on Amazon)
- 1x ATMega328P-PU (Buy on Amazon)
- 1x 5v power supply (Buy on Amazon)
The breadboard Arduino will be assembled according to the schematic below.
Place the microcontroller on the breadboard. Note that one side of the microcontroller has a small indentation. On this side you start counting the pins. With this said, place the oscillator on the pins 9 and 10. Connect those pins with the ceramic capacitors to ground on pin 8.
Now the microcontroller has a determined clock speed of 16Mhz. With every pulse a state changes inside the microcontroller. Putting it bluntly, allowing it to process code.
Now we connect the 10µF capacitor to pins 20 and 22. IMPORTANT, make sure the negative pole of the capacitor is connected to pin 22. The capacitor may explode if connected the wrong way. This is a bypass capacitor. A bypass capacitor shorts any small AC signals to ground, creating a purer DC signal. Also, it may fill in voltage dips resulting from current spikes within the circuit. All this is important to ensure proper functioning of the microcontroller.
Connect the LED with its positive pin to pin 19. The negative pin needs to be connected to ground via a 220Ω resistor. The resistor protects the LED from burning out. This led could be used for indicating things when running your code.
At this point we started using the power rails on the sides of the breadboard. To keep things structured it is useful to connect the rails to each other. This way we need a minimum amount of wires. Also, connect the 10kΩ resistor to pin 1 and 5v. This keeps the reset pin high, preventing it from floating and the microcontroller from resetting. You could skip step 5 if no reset function is needed.
In this step a push button is added. This button will allow to reset the microcontroller. Connect it to pin 1 and ground. When the button is pushed the pin will be pulled to ground. Resulting the microcontroller to reset itself.
To bring it all to life, connect pin 20 to 5v and pin 22 to ground. Now a 5v power supply could be connected to the power rail. AGAIN IMPORTANT, make sure the positive lead of the power supply is connected to the positive (5v) rail and the negative lead to the ground rail. The microcontroller will burn out immediately if connected wrong. Also, the capacitor may explode! If you are not sure, please wear safety goggles.
Now you build yourself a functioning “Arduino”. Of course, this is not strictly an Arduino, but a circuit allowing the ATMega328P to run code. However, this circuit is not as easy to program as an Arduino board. How to program a ATMega328P will be a topic for a different post. Or have a read on this post if you can’t wait.