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
- Wires
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)
- 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 !
Sources :
http://arduino.cc/en/Main/Standalone
http://www.nobletouch.co.uk/AVRProgrammer.pdf
http://www.nobletouch.co.uk/Using_the_Raspberry_Pi_to_program_the_ATmega328P_AVR.pdf
http://project-downloads.drogon.net/files/
http://pi.gadgetoid.com/article/programming-your-pico-piduino
http://pi.gadgetoid.com/article/building-the-pico-piduino
http://pi.gadgetoid.com/pinout/atmega328-arduino