Create your Arduino (1 / 2)
The combined capabilities of Raspberry Pi with an Arduino represent for me the ultimate system (nothing that much !). I had already spoken of My first experience with an Arduino but i had to invest in a dedicated card. Today we will see how to create your own Arduino and install sketches (the small programs) directly from the Raspberry Pi.
In this first article, We assemble our arduino with a LED on the pin 13 in order to make it flash.
The list of hardware that I used is as follows :
- An ATMega328p with a bootloader. Most on eBay have one.
- A 16 Mhz resonator
- A reset button (Optional)
- Two capacitors 22μF
- Resistance 10KΩ
- Resistance 4.7KΩ
- A LED
About the cost, I ordered several components of each element in order to optimize costs. The result for me is a cost for each Arduino around 5-6€ without wires (I can give links on eBay for those wishing)
NoticeAttention : with this installation you need to power your components with a source between 3V and 5V. For a higher external power supply, you need a type voltage regulator TO-220.
- Position the Atmega with the notch (is that the word ??) upwards
- Add the push button below the Atmega
- Linking the two sides of the breadboard for make it easy. You can see after how organise/optimise the use of wires.
- Bind the power to pin 1 of the Atmega with resistance 10KΩ. This allows to maintain the reset at the right level input
- Bind the button input to pin 1 the Atmega and another entrance to the ground. You can push it to restart your Arduino
- Link pins 8 and 22 (in front of the PIN 7) of the Atmega to the ground.
- Link pins 7, 20 and 21 to Vcc
- Add the resonator between pins 9 and 10. Do not care of left/right pins
- Add a capacitor between pin 9 and the ground
- Add a capacitor between pin 10 and the ground
- To add the LED, you can use the pin 22 (D13)
Voilà ! You have a freshly designed Arduino.
To test my installation I had at home a Gertduino card. So I used it to program the Atmega328 to make the LED flash. I then installed it on my breadboard and powered with the pin 3.3V of the Raspberry.
Next step, create a program, compile and send it to the Arduino, all from Raspberry Pi !