The Pi is a fine little computer board, though not nearly as good as
the Arduino when it comes to I/O capabilities. The beautifully-engineered
Gertboard is a plug-in add-on that neatly overcomes this deficiency
by giving the Pi access to an ATMega328, but it's a very complex and
expensive solution. An alternative would be to interface an Arduino
running at 3.3 volts to the Pi, though this is easier said than done.
But, we won't let that stop us, will we?

You can buy a prebuilt  commercial version
of something similar to this project.
It's called an AlaMode, and it goes for something like $50.
Our version will cost about a third of that to build.

As a first step, we will build an Arduino plug-in board for the Pi.
It is customary to call Pi boards "plates," but indulge me and permit
me to name this particular board a hoody. Thank you.

We will be using generic stripboard to build our project. Small (3-3/4"
x 2-1/16") boards can be obtained on eBay for a bit over a dollar apiece.
It is also possible to use something like a Radio Shack 276-168 protoboard
($3.49). The main component, though, is an 3.3-volt Arduino Pro Mini.
This will permit connecting directly to the Raspberry Pi ports and other
3.3-volt devices without having to do level shifting.

Quite a number of Pi projects involve connecting sensors and devices
directly to the GPIO pins. This is not a good idea. Use buffer chips,
such as the 74HC4050 hex buffer, between the devices and the GPIO.
This protects the Pi from overvoltages, current surges, and your mistakes.
Far better to blow out a fifty-cent buffer chip than a $35 Pi.

This particular project connects directly to the GPIO Rx and Tx pins.
However, we are connecting to a 3.3 volt device, which limits the risk.
Still, a buffer chip would not be a bad thing here.

This is a moderately complex project, and beginners need not apply.
It requires skill at soldering and in the use of hand tools. Experience
with a continuity tester and a steady hand with a knife blade are also

Ready? Well, then, let's get on with it!

Step 1: Parts needed

  1. Arduino 3.3-volt Pro Mini clone
  2. 1 - stripboard (protoboard), 3-3/4" x 2" or larger
  3. 1 - 24-pin wire-wrap socket ***
  4. 1 - 26-pin, stacking header
  5. 2 - 40 pin female header strip (as for Arduino projects)
  6. 4 - female-to-male jumper cables / patchcords
  7. Nokia 5110 display (optional, but recommended) 
  8. Raspberry Pi, model A preferred (lower power drain)
  9. Video display for the Pi, Atrix lapdock recommended
  10. Hookup wire
Nothing terribly exotic, folks, and fairly cheap to get, too.

  • stripboard              $1.25
  • wire-wrap socket   $1.50
  • stacking header     $2.00
  • jumper cables        $4.00 (for set of 40)
  • female header strips                     $1.00
  • Nokia display         $6.00
  • Arduino pro mini  (or clone of same),  3.3 volt model   $7.00

Total is under $25, if you don't already have any of the components laying

  • Soldering iron
  • wire cutters (Plato 170 or similar)
  • sharp knife (or optionally a Dremel-type rotary tool)
  • continuity tester (preferred) or a multitester


*** Do not use a regular 24-pin socket. The legs of the Arduino pro mini
      will not fit into the holes. But, you can substitute two 14-pin strips of female headers.

Yes, it is possible to use a "normal" mini-Arduino powered at 3.3 volts for this project.
Some examples of such are the Boarduino and Ardweeny.
Be aware, however, that the ATMega328 chip is not rated to run at 16 MHz powered
at 3.3 volts. So, you would be running it out of spec, or essentially overclocking it.
I've done some experimenting with this, and at least some, maybe most ATMega328s
can be programmed and run at 3.3 v. But, of course, your mileage may vary.

<p>To get it working on Raspbian you need to stop /dev/ttyAMA0 from working as a serial console since that will screw things up. See the following link for how to do this:</p><p><a href="http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/io-pins-raspbian/uart-pins" rel="nofollow">http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/io-pins-raspbian/uart-pins</a></p>
<p>Thank you so much. I'm trying to send data from Arduino to OpenHAB and my heart sunk when I saw this Instructable wasn't for Raspbian. Thanks!</p>
<p>Yes, and thank you for the fix.</p><p>Most Pi users do install Raspian, so this info is very helpful.</p>
Rather than a stacking header that plugs the board directly <br>on top of the Pi, some of you might prefer to use a shrouded <br>box-type header and connect to the Pi with a 26-pin standard cable. <br>This takes up more workspace, but gives extra flexibility. <br> <br>And hey, folks, how about some ideas and suggested improvements? <br>Or maybe someone would like to produce an etched PC board. <br>
<u>Another alternative</u>:<br> <br> Use a stacking header as described in the Instructable,<br> and get a <a href="http://www.ebay.com/itm/161079500253" rel="nofollow">female-to-male 26-pin cable</a> to give the option<br> of using the interface board off the Pi.
Cool! <br>since i love Arduino's and also have a Pi which i kinda hate since i dont have the loved I/O-o-rama i know from Arduino, thats the perfect 'ible for me! <br> <br>2x voted! :)
Thank you for the praise, Orn.<br><br>As you've noted, the Pi lacks analog IO, which an attached<br>Arduino can provide. The other great shortcoming of the PI<br>is the fragile non-replaceable SOC/CPU, which requires much<br>care when directly connecting to the GPIO pins. A cheap Arduino<br>board, or even an ATMega 328 jig, running at 3.3 v makes a perfect<br>buss buffer.
Thank you for this information. I'm looking this for my final year project. I want to build a home automation system using raspberry pi and also arduino. Thank you sir. You inspiring me
Thank you for the praise.<br>Best of luck with your project, and note that the Pi takes 3.3 v inputs, NOT 5v.
<p>Thank you for this. I have been thinking about reading the analog data from my 1973 Super Beetle and displaying it, this may allow me to start on a project to do so.</p>
<p>What if I need to send more than a single byte? I have coordinates x,y with values ranging from 0 to 255 in the raspberry pi. For example: 178, 243.</p><p>How would I send this to the arduino and how would the arduino receive it so that it can be stored in two different variables (x and y)?</p>
Send them as consecutive bytes, and let your software handle concatenating the values.
<p>If you want to use a 5v Arduino to do the same thing (or any other microcontroller) take a look at my logic level converter solutions here: </p><p>http://blog.kamilon.com/?page_id=263</p>
<p>one question please. My arduino pro mini is externally sourced by a 12v font in order to drive a rgb led strip. In this case,can i only connect the raspberry and arduino rx tx pins? So I can control led strip from a Java programa running on pi. </p>
Make absolutely certain that the Arduino's rx and tx signals are at 3.3 volts. More than that will damage the Pi.
<p>At first I was very interested in the Raspberry Pi, but found what I was really looking for was the Arduino. I have both and like getting them to work together. Recently, Intel has come out with the Galileo. It seems that the Galileo is similar to what you did combining the Pi with Arduino. Would you see it that way? Or is there a big difference. With a Galileo, due, and every other board coming out which way will it all go?</p><p>Thx for the write up. We will be doing some integration with your article as a basis.</p>
Yes, the Intel Galileo is interesting, but it is a bit more expensive than the Pi, has less community support, and lacks documentation at present. Note that I don't possess one, and base this judgment solely on what I've read about it.<br><br>Hooking an Arduino or Hackduino to the Pi has the one big advantage that the Pi itself is not exposed to overvoltages or excess current. If you blow up a '328 chip, you can replace it for $3 or so, not a big deal, whereas if you blow up the Pi it's a bit more serious.<br><br>Thank you for your perceptive comments.
I have a question. If I just get a usb board like an UNO or Mega, can I just plug the Arduino in the RPi's usb port?
Yes, if . . .<br><br>1) You're using a USB hub with the Pi and have a spare port on it.<br><br>2) You've installed the Arduino IDE software package on the Pi.<br><br>With both of the above in place, you can program sketches for the Arduino and upload them to it. But, other communication between<br>the PI and Arduino over the USB buss is quite another matter.<br>Much easier is using the serial ports.
do you have the arduino IDE on the raspberry pi? If not enter the following <br> <br>sudo apt-get install arduino <br> <br>it will be typed into the terminal and then download after you hit enter. I may make an instructable on how to install it and some other stuff about it too!
Yes, thank you, I have that installed.<br><br>I think your idea about an instructable is interesting,<br>but you may want to consider expanding the scope of it.<br>How about doing an instructable on installing software<br>packages on the Pi? And maybe also about installing<br>different Linux distros? You'll do an excellent job at<br>this, I'm sure, and many Pi users will benefit.<br><br>Thanks for your comment.
I may do a separate one for Linux distros or maybe even xbmc
hey thegrendel I published it you can feel free to take a look!
so I should make an instructable about how to install arduino IDE on wheezy
Ok I will make one over that it is a very good idea
as a socket you can also use 2 14-pin dil sockets
&quot;There are nine and sixty ways of constructing tribal lays,<br> <em>And every single one of them is right!</em>&quot;<br> <br> -- Ruddy Kipling

About This Instructable


536 favorites

Bio: hobbyist, tinkerer, old curmudgeon
More by thegrendel: The Arduino / TFT LCD Connection Using an In-System Programmer Switchable Dual-Voltage (3.3v/5v) Hacduino
Add instructable to: