Raspberry Pi vs Arduino ADK (with phone tethering)

androidarduinoraspberry pirobotics

I was doing some research for my capstone project next year. Basically it is an autonomous rover, designed to scout out outdoor areas and send back video/pictures to a website.

So far, our initial design for control system involved Arduino ADK connected to an Android phone. The phone is intended to be the brain and we can use all the sensors that comes with it, while the arduino will be used to control the motors and for realtime feedbacks.
We are using a phone for this because individual components like gps, cellular module, etc. for arduino will end up costing us a lot more. For communication, we are going to use cellular network of the phone due to it's long range.

Our professor liked the idea, but he suggested that we should look in to using a raspberry pi instead of Arduino, so that we could use some programs and hardware (analysis/data logging) meant for linux, giving the project a more practical purpose in the future. Essentially making the RPi the brain, and just use the sensors on the phone to supply data.

I'm not that experienced with Rpi, so not sure how things will turn out. So I have a few questions:
-Can an android phone be tethered with the Rpi, and simply use it as a 3g modem, and use the data from the onboard sensors?
-While RPi is not meant for realtime functions, what kind of lag should be expected from this? if it is less than 100ms, i figure it should be fine.
-While the GPIO on the RPi is limited in number, can it be used to run a motor controller? It can also be paired up with a simple arduino uno which in turn can have have the motor controller, but will it be a waste of resources?

I am still doing my research and will have plenty of questions in the future. For now these noobish questions will be enough to start with.

Best Answer

A pi is indeed, not a wonderful solution for motor control - as an embedded linux device it is not ideal for realtime control, and as one which depends on an SD card for a root filesystem it is notoriously fragile in state especially where unexpected power loss may be an issue. Being based on a set-top-box rather than mobile SoC, it also lacks most of the power control features one would expect for a battery powered system.

But doing USB host with an Arduino is not a great idea either - the host chip ends up costing more than your main microcontroller.

If you want to keep the ADK idea with the external device as the host, look at something like a STM32F4 or KL25Z as an inexpensive embedded USB host (the STM Nucleo boards are in the $11 range, though the USB signals only exist on pin headers rather than a USB connector)

Another option is to turn things around and use the phone as a host, with the embedded processor as a device. This is in a way more sensible, and can put you back in Arduino territory, however it does mean that you either have to come up with a way to power the phone while doing this, or end up running down its battery.

For simple motor control, running modulated signals through the headphone jack is worth looking at as well.

(I'm aware this is an old question, but there's nothing particularly dated about it. Maybe with an answer we can retire it so that it doesn't bubble up again in the automatic churn).