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.

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

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.

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

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).

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.

” 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.

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.

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.

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.

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

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 ;)

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.

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.

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.

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?

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.

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.

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.

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.

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.

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.