Using Arduino shields with the Raspberry Pi

Since the Arduino was launched years ago, many ‘shields’ or add-on boards providing additional functionality have been released. There are hundreds of different shields, from video capture shields to touch screen shields. Now that the Raspberry Pi is out in the wild, it was only a matter of time before a RasPi to Arduino shield bridge was created.

[Omer] calls his bridge ‘Ponte’ and it allows Arduino shields to be used with the incredible  horsepower of an embedded Linux system. While [Omer] originally expected to write the RasPi to Arduino software converter himself, but found WiringPi halfway through the build. Of course this build comes just a day after we saw a tutorial on controlling the GPIO pins on the RasPi, and we expect to see similar GPIO-hacking builds in the future.

Right now, the Ponte only supports Arduino Uno-sized shield, so the possibility of an all-in-one RepRap controller using the RAMPS motor driver is impossible for now. We expect that to change very quickly as more people get their RasPis delivered.

30 thoughts on “Using Arduino shields with the Raspberry Pi

    1. Having worked with the Arduino in many different incarnations now for all sorts of projects (I have bought at least 30 of them), I am still on the fence about how well the RaspPi will offer an improvement over Arduinos. I can see the potential for a linux COMPUTER to best a single purpose device in many applications but in order to be truly useful, it needs lots more IO pins, including TRUE analog outputs, current protection, proper implementation of I2C, multiple 10 bit or greater analog inputs, true 10 bit or better analog outputs (not just 8 bit PWM).

      All things that can be added but it will be months and months before something like this gets added and when it does, will likely cost $40 – $50 on top of the RaspPi price.

    2. I agree, these are two different animals in terms of engineering a project – but it is excellent that the shields are now duel use. Nice little hack.

    3. Hackerspacer, The RPi and Arduino are for different purposes and shouldn’t be compared as such. They can complement each other, in some cases, replace each other in a project but never really should be compared to each other.

      I’m actually working on developing a ‘topping’ to the RPi based around the STM32F103 microcontroller to be an IO hub for the RPi (and RTC) and communicates over SPI. This is for a later project of mine but highlights what I mean, I’m not replacing the RPi but augmenting it with another controller.

      And in my personal opinion, using 5V Arduino based shields on a 3.3V RPi is a little silly, but could be useful for some ‘IO basic’ projects.

          1. The reason why the STM32F103 was selected as I can prototype with a leaflabs maple until such time that I can build one from scratch and also because I do not need 1MB of flash in the microcontroller. I suppose I could use a STM32F205 if I wanted to, but even that could be seen as overkill for my planned application of IO Expansion/Low level Communication Hub/RTC.

          2. Currently it’s just on an idea notepad of mine until I have the time to expand it further. A lot of assignments are due shortly which will wipe out any time I have until classes end in 2 weeks. Amusingly, that’s also when my RPi is due to be sent!

    1. There is one PWM pin available on the Rpi. The other option is to use another microcontroller as an IO hub connected via either USART or SPI.

      1. I’m not an EE so take this with a grain of salt please.

        Wouldn’t it be better, in any case, to use an external chip to do motor control handling? I know that it’s nice and all to have everything embedded, but stuff like motors are fickle.

      2. I’m not an EE either, so take this with a grain of salt.

        Depends on your application, but for simple interfacing with a H-bridge, the GPIO (with a buffer) should be enough. If you’re driving multiple of motors, it may sense to use an external controller.

        In the case of brushless motors, it’s easier to use a designed controller than trying to do your own.

  1. To add to the Arduino vs RaspPi discussion:
    with the addition of the RaspBerryPi you could use all your old Arduinos as sensor nodes with the RaspPi as a hub or something. Then the Arduinos could act as expansions through SPI or I2C interface. I’d like to get that going some time

    1. Then why not use 3.3v i2c sensors,A/D,etc and ditch the ‘duino?

      Am I the only one who sees this as a FAP-fest?

      1. Depending on your requirements, it could be cheaper to use another microcontroller as an I2C port expander or ADC/DAC to buying the individual components to get those features. There are Arduino varients which use 3.3V.

        And to answer your other question. No.

      2. To get that performance, you’d need to be running the I2C bus at about 1MHz, but your point still stands. I looked up the ATMega328P datasheet and it’s 15ksps, still slower than the ADC you linked to.

        Lastly, the ATMega328P is cheaper than that ADC chip (ignoring additional components costs for both) and in a easier to manage DIP package:

        http://search.digikey.com/us/en/products/ATMEGA328-PU/ATMEGA328-PU-ND/2271026

        So depending on your requirements, it could still make sense to just use a ATMega328P.

  2. I want to create an automatic irrigation system for my garden. I have seen the Plantduino and was wondering if I could use this adapter with a Raspi to achieve the same result. Can I use this adapter to get sensor information? Can I trigger relays? Any information about this would be appreciated. Thanks!

    1. Hello!!
      I’m trying too to make an irrigation system with an arduino. Give ur mail if you want to share info, ideas, ect.

    2. I have been developing a greenhouse controller using the pi and an atmega8. The atmega8 has 6 ADC pins and plenty of digital in/outs and UART communication seems to work well. All the high level logic is done in python.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s