The proper way to put an Arduino in a Raspberry Pi

For all their hoopla, the GPIO pins on the Raspberry Pi aren’t terribly useful on their own. Sure, you can output digital data, but our world is analog and there just isn’t any ADCs or DACs on these magical Raspi pins.

The AlaMode, a project designed by [Kevin], [Anool], and [Justin] over at the Wyolum OSHW collaborative aims to fix this. They developed a stackable Arduino-compatable board for the Raspberry Pi.

Right off the bat, the AlaMode plugs directly into the GPIO pins of the Raspberry Pi. From there, communication with the ATMega of the Arduino is enabled, allowing you to send and receive data just as you would with an Arduino. There’s a real-time clock, servo headers, plenty of ways to power the board, and even a breakout for this GPS module.

A lot of unnecessary cruft is done away with in the AlaMode; There’s no USB port, but it can be programmed directly over the GPIO pins of the Raspberry Pi. Pretty neat, and we can’t wait to grab one for our Raspi.

Comments

  1. Tony says:

    Folks, that’s what fanboi nirvana looks like.

    If only Steve Jobs was around to slap an Apple logo on it.

  2. Destate9 says:

    ok, I’ve been trolling a lot lately, and for that, I apologize. I’ve been trying to be more supportive of the people doing the projects and the writers. However, considering the negative aspects of this site (everyone is OBSESSED with RasPi and Arduino), you can see how this would tempt even the most self controlled commenter… but I’ll leave it to the other commenters to comment on how rediculously hilarious this is

    • Joe says:

      …says he, managing to comment, without admitting to comment, on the “redicule” of it all…

      • Saul_Goode says:

        Doesn’t change the fact that he does have a very valid point. RasPi is the new Arduino when it comes to hackaday write-ups.

        As time goes by it seems that the focus of HaD is being pulled into the specific and advanced interest area’s of the writers.

        Between the microprocessor-centric posts and the lack of standards (double posts, grammatical errors)…

        …hell, writing this has made me think about the state-of-HaD and I’m depressed now. Seeing the same hack written up twice on the front page broke me. …with gaffes like that, you deserve all the trolls you get.

        • As time goes by it seems that the focus of HaD is being pulled into the specific and advanced interest area’s of the writers.

          Yes, we do have a few too many uC-centric posts, but we need to work with what’s given to us. Electronics is just more popular than home mechanical engineering, it seems. Give me something where a guy builds a steam engine car, and I’ll put that up. Hackaday doesn’t hand stuff down from on high; what we cover is directly related to what makes it into our tip box, or what we find elsewhere on the Internet. We can’t be everywhere, and the most important people at HaD is our readers. Seriously.

          Also, we’re kind of running a business here. As of this comment, this post has more views than the Growerbot, Blinkenwall, and IR remote posts on the front page combined.

      • charles says:

        Well said Brian Benchoff.

        …I must admit though. The only reason I am looking at this was to see all the easy to program microcontroller (arduino) haters in a tizzy.

      • Destate9 says:

        Yeah, on second thought, it’s not HaD’s fault. We as a comunity need to send in more cool projects that don’t involve these boards (like electronics projects that actually require skill, sorry just had to get another troll in there). My bad, HaD, but c’mon people, learn some circuitry and build cool stuff! Get rid of the uC boards and see what you can do with a 6-pin PIC, or analog circuits

      • Paul says:

        Why do haters judge the worthiness of every project based only on its component costs?

        If I make something useful, where something is just one for my own personal use, does it really matter if I use a $50 circuit board or a 50 cent opamp? Sure, that matters greatly if I make that same project for mass production, but for for just myself?

        The really insane part about applying cost-of-the-bill-of-materials thinking to a one-off special project, as if everything everyone builds is subject to some sort of intense cost minimization effort appropriate for high volume manufacturing, is that in a corporate environment, when building a one-off project for internal use only or for a proof-of-concept demo, minimizing the number of paid hours spend designing and building would be considered much more important than the extra $49.50 to use an easy microprocessor-based board rather than fiddling around with tricky analog circuits.

        But not here on Hack-a-Day. Someone builds something interesting and useful for their own personal need…. if they want to see positive comments, they better have spend a huge number of unnecessary hours also minimizing the build cost. It’s stupid. Apparently to groupthinking HaD haters, everyone should put in countless extra hours of unpaid work, far beyond what’s necessary to get their projects working, just to save $50, or $20, or sometimes even $5 (eg, use an opamp instead of a AVR).

        • thedoktorj says:

          Nail on head! Thank you for this! For many of us that are not EEs and are learning and doing in our spare time, the cost of dedicating an Arduino or Raspberry Pi to a project is WAY less than the cost of losing many hours of already scarce spare time designing a custom board, sending it off to be built, populating it with components that I can’t even order in single quantities, and spending many hours learning hardware code instead of using Arduino libraries.
          All this, for a project that I am building for fun and purpose, in my spare time, just so that a bunch of people who do this stuff for a living won’t bash my project into oblivion because I didn’t do everything exactly like a professional would. Well, fuck that!
          Get over yourselves and remember that some of us are learning and/or have much different priorities. Time is money and spare time is priceless! I won’t waste my time reinventing the wheel, when I could spend 30-50 dollars and concentrate on the actual task at hand.

          • ScrappyLaptop says:

            ” if they want to see positive comments, they better have spend a huge number of unnecessary hours also minimizing the build cost.”

            Um, that’s what “hacking” originally meant. You started with say, a piece of ugly, bloated code and you “hacked” away at it until you were absolutely sure you had minimized it to as few instructions as humanly possible. Inflated build cost is often a reflection of complexity, or at the very least a non-minimalist attitude, which in turn indicates a possible lack of elegance and skill. And that is the antithesis of hacking.

        • s944 says:

          I once mentioned that it would be possible, in principle, to run most of the control feedback of a nuclear reactor on 741 op-amp circuits. I wouldn’t suggest that anyone try that, as it is lacking failsafe backups and probably would go boom next time someone knocked the crocodile clips with a tea mug. This forum is for people who have a hobby project which won’t level the neighbourhood if it goes on the blink, and can try stuff out and break things. And for that, if someone with more money than time finds a way to do it with a microcomputer, and someone else with more time than money finds an elegant analog circuit, and someone else can make it work with an op amp, then each should post here and not complain that the other did it differently to how they would.

    • meh says:

      Oh no, kids want to play with their new toys.

      Please point me to all your non-raspi/-duino projects that HaD refuses to post because they are saving room for the new toys.

  3. webby says:

    Suddenly I have the urge to finish one of my pic based projects…

  4. Rob says:

    Here’s hoping it inspires some of the newer generations of makers to go on to greatness in their respective fields.

  5. trollzor says:

    Yo dawg, we heard you like programing.
    So we put a arduino on your RasPI
    So you can program while you program.
    (Sorry but I just had to XD )

  6. Daniel says:

    When can I get one, where and for how much? :)

  7. cgimark says:

    sigh, lets use the poor quality ADC of the arduino to interface to a chip with multitudes more processing power, do it right , grab some of the ADC chips like the AD7366-5 for $7 and interface those directly to the Rasberry Pi. This is like someone putting fuzzy dice on the mirror of a Porsche , it doesn’t belong.

    • Whatnot says:

      But the arduino is easy to handle and has thousands of examples and a library of past projects and a clear development system, and those things matter all the way. I’ve seen so many very nice and capable things never get anywhere because of poor documentation/support, it’s heartbreaking.

      And of course capable individuals can easily do what you suggest themselves anyway.

    • JohnBailey says:

      Great.. So when do you start?

  8. ds18s20 says:

    I would not call it an obsesion but rather just the newest thing. Do you not remember all the hoopla around the Pentium releases, the mobos etc. Now its all about Raspberry and Arduino – nothing wrong with that

  9. ds18s20 says:

    Nothing wrong with Raspberry Pi or Arduino. Its just the newst stuff out there.

    I am so glad we are not seeing write ups on Android tablets and such.. wait there arent that many hacks cuz it takes effort to hack those and they go $500 a pop… LOL

    • Whatnot says:

      You can get very nice tablets for less than $200 now with ICS, in fact even for $100 although then it’s really more for development than sitting in public trying to look cool.

  10. Bob Thing says:

    “the Raspberry Pi aren’t terribly useful”

    sums it up quite nicely :D

    • gleen close says:

      Yeah I thought it was funny too how quickly they psshawed the pins too :) Oh if you actually want to do something useful disregard that tickertape parade and flaming clowncar of the past few weeks lol. I guess at least they are honest about that point.
      I still keep waiting for Phineas T Raspberry to pop in and extol the virtues of that most heavenly number cruncher in a bottle from his lil wagon any day now ;)

  11. 'Duino says:

    This, like anything else has it’s place. The point is to create a CHEAP but CAPABLE microcontroller / linux device. THIS FINALLY FITS THE BILL. It can do so much for so little AND THAT’S WHY THIS MATTERS.

    Now all we need is an industrial version of this (24VDC tolerant) and on a single board or at least something you could plug this into.

  12. SuperNurd says:

    To all the people bullying HAD for putting up alot of RasPi and Arduino stuff it is probably because alot of hobbiest just got their RasPi and many people default to Arduino because it is C based and pre-prepared plus it has a huge community, if you want to see projects that don’t involve theese quit being so lazy and build your own. Also nobody forced you to read this post just go on browsing if your not enticed by it, the tile was descriptive enough.

  13. leec says:

    kudos, this is great! Best of all, is that it’s the DIP atmega328. I don’t understand this surface mount push by arduino. If you are going to lock your prototypes to a $30 arduino board, why the heck not just shell out the extra $5(or -$5 if the base pi ever comes out) and get a raspberry pi. Toaster oven’s and sexy on glass etched circuit boards aside, my favourite part about the DIP based arduinos is that i can easily “trim the fat” and make it into an comparable and nearly disposable at $4, circuit.

  14. problemchild68 says:

    This is just like our prototype we did ages ago

    We were going to do more with it but really we found that the Arduino Environment just works on the RPi already and you may as well use an existing USB Arduino and no need to be an hero

  15. Dane Archer says:

    And all I have to add is that the link to the GPS mentioned in the story actually takes me to the wrong vid, although cutting vinyl using CDs is impressive :D

  16. cpmike says:

    Is it just me, or is programming two different devices to work together to complete a task, actually more of an effort and annoyance than just finding a way to work with a more appropriately-purposed, single device?

    • Ac says:

      It’s you. Kind of how some people prefer serial chips instead of bitbanging protocol, or some people prefer the Arduino boot loader instead of C.

    • cgimark says:

      It isn’t just you, normally when you develop something you go for the lowest parts count and try to stick to a single platform.

      My biggest issue with bringing arduino into the pi world is that people really are not learning anything about the pi, what they are doing is trying to use something new, not willing to learn to use it and defaulting back to something they already know then making excuses that the hardware was the problem when it was the user.

      The pi is more than capable of doing what this arudino board does, but that takes learning and not just re-using what already exist , more cut and paste coding and not understanding what is taking place in the hardware. That is fine for doing something quick but annoys us that have to solve issues with hardware when users complain something isn’t working because the library they downloaded doesn’t perform and now they want you to explain everything they should already know.
      I can’t see anything this adds to the pi that couldn’t be done a better way with just the pi and some support chips.

      • Jarel says:

        Amen!

      • Eirinn says:

        If you’re an EE; If you’re not, you’re going for simple, and that’s why this exists and why this article probably has a higher view-count than anything posted lately.

      • jherrm says:

        I know this is several weeks after this was posted, but having the arduino as a companion to the pi helps a lot with controlling motors and other devices that need real time control (nano/microseconds).

        Trying to do this via the GPIO on the pi would need a real time version of linux (check out linuxcnc) which unfortunately doesn’t exist for the pi yet. Even if it did, it might not have the horsepower to do it well.

        I think we’re going to see a lot of pi+arduino team-ups for projects that need networking as well as motor control. This is perfect for a low cost robot controller.

    • Cyril says:

      HEY! Stop thinking for yourself and [like] drink the koolaid already!!11!! *curly-moustache-twirl*

  17. Conner Smith says:

    I’m no expert, but couldn’t you just a make a program that turns the digital pins into analog via pwm? I guess that really only works for output though…

    • Hackerspacer says:

      PWM is also a “fake” signal that only involves rapidly turning on and off 5 volts. Lots of things need a true analog signal to work properly and a PWM signal from an Arduino is a good hack but doesn’t substitute for a real analog out.

      • cgimark says:

        How are you going to get ‘true analog’ from a digital device ? You can’t , you will always be turning on and off something, then averaging it or summing it to generate the analog signal or to decode analog signal . There is nothing fake about PWM, it is simply how digital does analog signals , whether it be sampling data or the sound being output from 7.1 surround system on a home theater using a class D amp.

      • Jarel says:

        If you don’t need super accurate or fast analog output, you could always put an RC filter on it. I understand what you’re saying (despite the way you said it). Some devices can’t deal with raw PWM very well.

    • cgimark says:

      You can do analog input with a device that doesn’t have one built in by rapidly sampling a port, the problem is that most processors do not have the speed necessary. Look up data on the early ADC and see how it was done on chips like the 8051 before ADC existed, might require an opamp or two to provide a proper signal to the port, but it can be done.

  18. Mr Sheesh says:

    … We’re going to need a bigger case…

  19. zuul says:

    how do you program it through GPIO? would there be a setting for that in the arduino IDE?

    also it’s cool but sometimes things like this are a little bloated, like i don’t need the sd card and servo headers etc.. just an arduino connected to the gpio breakout would be good

    or even just the schematic on how the atmega chip connects to the gpio and the software to control it/ talk with the pi

  20. xo says:

    Seems premature. It’s in “limited beta”. Maybe “introduce” it when it’s actually available.

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

Follow

Get every new post delivered to your Inbox.

Join 92,295 other followers