DominusPi
Posts: 39
Joined: Mon Nov 18, 2013 5:31 pm

Why mix arduino with raspberryPi

Tue Jan 14, 2014 9:47 pm

Hey guys !

As a beginner, I noticed many people mix arduinos and RPi, but I don't understand what does the arduino givess that the RPi doesn't have.
It might sound like a stupid question to many, but well, I don't know the answer to it :D

Thanks in advance !
Cheers !

User avatar
duberry
Posts: 379
Joined: Mon Jan 28, 2013 10:44 pm
Location: standing on a planet that's evolving. And revolving at nine hundred miles an hour

Re: Why mix arduino with raspberryPi

Tue Jan 14, 2014 9:52 pm

lend me your arms, fast as thunderbolts, for a pillow on my journey.
If the environment was a bank, would it be too big to fail
so long; and thanks for all the pi

User avatar
mikronauts
Posts: 2732
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Why mix arduino with raspberryPi

Tue Jan 14, 2014 9:59 pm

- analog inputs
- more PWM
- more digital I/O
DominusPi wrote:Hey guys !

As a beginner, I noticed many people mix arduinos and RPi, but I don't understand what does the arduino givess that the RPi doesn't have.
It might sound like a stupid question to many, but well, I don't know the answer to it :D

Thanks in advance !
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

User avatar
AndyD
Posts: 2333
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Why mix arduino with raspberryPi

Tue Jan 14, 2014 10:01 pm

The nice thing about the Arduino is the large amount of code and shields that are already available and work. The problem with the Arduino is low processor speeds, limited memory etc. So using an Arduino and a Raspberry Pi you can have the best of both worlds. Connect your sensors and shields to the Arduino and get the Raspberry Pi to handle things like user interface, network connections, web servers etc.

AJB2K3
Posts: 215
Joined: Sun Aug 11, 2013 3:25 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 6:29 am

1 other reason is to provide protection to you Raspberry pi's I/O's
Back in the old days, we were smarter then the technology.
Nowadays technology makes us look like villages fools in front of the children!

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 7:37 am

I have no use for an Arduino. I have plenty of I-O capabilities on the Rpi.

One Rpi can have:
1,982 PWM outputs
64 ADCs (4 channel)
512 GPIO ports
plus eeproms, dacs, etc etc.

I suppose there is a use for a Rpi /Arduino pair. I just don't have one.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

JoeDaStudd
Posts: 274
Joined: Fri Jan 27, 2012 1:34 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 11:16 am

Both are great in there own right so it seems only logical to use them together where the need appears.
Its worth glancing at these two articles.
http://www.raspberrypi.org/archives/1171
http://www.raspberrypi.org/archives/5308

I think the better question would be; why not mix arduino with raspberry pi?

achrn
Posts: 376
Joined: Wed Feb 13, 2013 1:22 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 11:39 am

Richard-TX wrote:I have no use for an Arduino. I have plenty of I-O capabilities on the Rpi.
No, you don't. At least , you don't have this list on the Pi:
One Rpi can have:
1,982 PWM outputs
64 ADCs (4 channel)
512 GPIO ports
plus eeproms, dacs, etc etc.
Not without extra hardware it can't. Arduino is one way of providing extra interfacing to the outside world, utilising one sort of additional hardware. There are other ways of providing extra interfacing to the outside world using other sorts of additional hardware. Is that supposed to be a brilliant revelation?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24124
Joined: Sat Jul 30, 2011 7:41 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 11:43 am

Don't think anyone has mentioned to better real time reaction performance of the Arduino. So you can be much more accurate in GPIO timings with no Linux OS getting in the way and causing jitter.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

gordon77
Posts: 4292
Joined: Sun Aug 05, 2012 3:12 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 3:48 pm

jamesh wrote:Don't think anyone has mentioned to better real time reaction performance of the Arduino. So you can be much more accurate in GPIO timings with no Linux OS getting in the way and causing jitter.
I agree, in my application I can either use the RPI.GPIO or USB to a Arduino Uno.

If I send a command, eg #Mgn1000, to the Uno I know it will switch for 1000mS, using GPIO it may not depending on whether the Pi is doing other things. I admit I haven't found it an issue yet but time may tell.

DominusPi
Posts: 39
Joined: Mon Nov 18, 2013 5:31 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 4:42 pm

Thanks for all the answers !

So if I understand well. The RPi would act as the brain, why the arduino would receice commands from the brain and "translate" them tothe physical system?

And is the Arduino more protected against circuits malfunctions or is it just a barrier that still gets damaged ?
Cheers !

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 7:53 pm

The ATmega328 is fairly rugged but it can still be damaged. It's in a socket so it's easily replaceable.

Since Raspbian for the Pi now comes with Mathematica you should be able to do some amazing processing on data coming back from the GertDuino.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 8:41 pm

achrn wrote:
Richard-TX wrote:I have no use for an Arduino. I have plenty of I-O capabilities on the Rpi.
No, you don't. At least , you don't have this list on the Pi:
One Rpi can have:
1,982 PWM outputs
64 ADCs (4 channel)
512 GPIO ports
plus eeproms, dacs, etc etc.
Not without extra hardware it can't. Arduino is one way of providing extra interfacing to the outside world, utilising one sort of additional hardware. There are other ways of providing extra interfacing to the outside world using other sorts of additional hardware. Is that supposed to be a brilliant revelation?
Adding an Arduino is adding extra hardware.

I doubt that the Arduino could provide everything listed above - simultaneously. The Raspberry Pi can.

Sure there are issues with timing, but I have no such requirements.

I still have no use for an Arduino.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

hampi
Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 8:55 pm

I as far as I understand the the arduino is very good for learning small microcontrollers while Rpi is more a miniature linux server. If you know or have used microcontrollers already before the arduino is probably not very interesting to you any more. In that case you can choose any microcontroller from the market and connect it to the Rpi. Typical ones are made by Atmel, Freescale, Microchip or Texas Instruments. One small 8-bit microcontroller is quite cheap with a price around one dollar. That price scales down with the quantity which is not case for Rpi with a fixed price (but then the Rpi is more for educational use).

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 8:57 pm

I have not found those 64 ADCs in my raspberry. Should I return it or can you explain where they are?

AJB2K3
Posts: 215
Joined: Sun Aug 11, 2013 3:25 pm

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 9:44 pm

shuckle wrote:I have not found those 64 ADCs in my raspberry. Should I return it or can you explain where they are?
Sudo apt-get install handwavium

Sorry couldn't resist using a writing joke here!
Back in the old days, we were smarter then the technology.
Nowadays technology makes us look like villages fools in front of the children!

User avatar
scruss
Posts: 2615
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 10:06 pm

Richard-TX wrote:I doubt that the Arduino could provide everything listed above - simultaneously. The Raspberry Pi can.
C'mon, dude, I was over the “my computer's better than your computer” wars in 1985. Unless you got a Large Hadron Collider-class data acquisition system in a box accidentally marked ‘Raspberry Pi’, the current GPIO as generally configured can only do:
  • PWM outputsone. GPIO 18, or pin 12.
  • ADCsnone.
  • GPIO ports — count the available headers. Not that many.
  • eepromsnone. (I checked, twice!)
  • dacs — there will be a couple in the audio hardware, and a few more in the SOC to do things like the thermal random number generator, but they're not often exposed or generally configurable. So, none (± standard uncertainty).
  • etc — This one I'll concede. It's highly likely that the Raspberry Pi's implementation of OpenGL ES can (or will) support Ericsson Texture Compression.
So why do I use an Arduino with a Raspberry Pi? Many reasons, including:
  • 5V tolerance — most Arduinos do 5V without smoking, and it's cheap to replace the µC on the socketed Uno versions if you do.
  • Realtime — if I want a precisely-timed (± a couple of µs) signal, I can spit a serial command to an Arduino, and it does the accurate stuff.
  • Firmata — is a remote control serial protocol. It turns your Arduino into a acqusition/control board. You can talk to it over Bluetooth if your project needs to be remote. Firmata has thousands of users.
  • Familiarity — µC boards have been around for a long time. Who knows why the Arduino has ‘won’ (if it were up to me, Wiring is better, and it properly acknowledges Processing in its history) but it has many more users than the Raspberry Pi. Plus, they seem to be breeding in my house; I think I have around 20 around here, from the tiny Digisparks to the brawny Teensy 3.1, even including the for-any-sakes-why Intel® Galileo.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
DougieLawson
Posts: 36520
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Why mix arduino with raspberryPi

Wed Jan 15, 2014 10:11 pm

You've missed that the Arduino can run something that's self-contained. Prototype with the RPi connected to the Arduino, when the Arduino code is running you can undock it from the mothership and it will run it's program without intervention.

Give the Arduino an ethernet connection or WiFi or Bluetooth and it's autonomous and connected to the "Internet of Things".

I think the classic example is the house on the Isle of Wight that tweets. It's been wired with all sorts of real world sensors, RPis and arduinos and a Viglen MPC-L and gives Dr. Andy Stanford-Clark complete control from anywhere.

http://asmarterplanet.com/blog/2009/07/ ... weets.html
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

achrn
Posts: 376
Joined: Wed Feb 13, 2013 1:22 pm

Re: Why mix arduino with raspberryPi

Fri Jan 17, 2014 9:55 am

Richard-TX wrote:
achrn wrote:
Not without extra hardware it can't. Arduino is one way of providing extra interfacing to the outside world, utilising one sort of additional hardware. There are other ways of providing extra interfacing to the outside world using other sorts of additional hardware. Is that supposed to be a brilliant revelation?
Adding an Arduino is adding extra hardware.
Do you think possibly that would be why I said "Arduino is one way of providing extra interfacing to the outside world, utilising one sort of additional hardware."
Richard-TX wrote: I doubt that the Arduino could provide everything listed above - simultaneously. The Raspberry Pi can.
No it can't. That's a simple straight fact.

The Pi can possibly control external hardware providing all the above (though I have my doubts about bus bandwidth, if it's doing all that at a useful rate), but the Pi does not provide any ADCs, for example. To provide all that you need extra hardware. Arduino is simply one sort of additional hardware that can provide extra interfacing to the outside world.

Also, you've rather gone off on a straw man, haven't you. No-one has made any claims that a single Arduino alone can provide more interfacing to the outside world than can a single Pi alone, but that seems to be what you're arguing against now. Whether a single arduino could drive the whole list above simultaneously is entirely irrelevant. No-one was advancing any sort of Arduino is better than Pi argument, so why do you apparently want to turn it into one?

Heater
Posts: 13863
Joined: Tue Jul 17, 2012 3:02 pm

Re: Why mix arduino with raspberryPi

Fri Jan 17, 2014 1:16 pm

Richard-TX
I have no use for an Arduino. I have plenty of I-O capabilities on the Rpi.

One Rpi can have:
1,982 PWM outputs
64 ADCs (4 channel)
512 GPIO ports
plus eeproms, dacs, etc etc.
What? May be I have missed a point some where but as far as I can tell the Pi has very limited I/O capabilities, a few GPIO an UART, SPI etc on the GPIO header.

How on earth are you going to connect 1,982 pwm outputs to a Pi? Plus all that other stuff?

Just the other day I was thinking it would be cool to demo a Pi driving 30 PWM RC servos. To do that I would use a single Propeller micro-controller hooked to the UART on the GPIO header. The propeller can easily drive 30 PWM outputs whilst accepting commands from the Pi as to the desired servo positions.

Obviously I was not thinking big enough.

I would really like to know how one can do all of those things you mention.
Memory in C++ is a leaky abstraction .

Steven_Aldrich64
Posts: 4
Joined: Mon Jan 27, 2014 1:30 am

Re: Why mix arduino with raspberryPi

Mon Jan 27, 2014 6:21 am

I use the arduino for repetitive tasks that take little or no input. Not saying it can not do more complicated programs. I like the pi for it ability to run a full featured C++ program (with threads) with automation, communication, and display.
Both have their purpose but can often do the same tasks.

Return to “General discussion”