Turn Your Motorola Android Phone Into A Raspberry Pi

In the surest sign that hardware hacking is the new hotness, Motorola and Farnell/Element 14 have developed an add-on board and SDK that will let you connect virtually anything to your mobile phone. Motorola is calling it the “Moto Mods” system, and it looks like its going to be a dedicated microcontroller that interfaces with the computer inside the phone and provides everything from GPIOs to DSI (video). Naturally, I2C, I2S, SPI, UART, even two flavors of USB are in the mix.

dev-config-diagram-5

The official SDK, ahem Mods Development Kit (MDK), is based on the open Greybus protocol stack (part of Google’s Project Ara open phone project) and it’s running on an ARM Cortex-M4F chip. It’s likely to be itself fairly hackable, and even if the suggested US $125 price is probably worth it for the convenience, we suspect that it’ll be replicable with just a few dollars in parts and the right firmware. (Yes, that’s a challenge.)

The initial four adapter boards range from a simple breadboard to a Raspberry-Pi-hat adapter (hence the title). It’s no secret that cell phones now rival the supercomputers of a bygone era, but they’ve always lacked peripheral interfaces. We wish that all of the old smartphones in our junk box had similar capabilities. What do you say? What would you build with a cellphone if you could break out all sorts of useful comms?

Via HackerBoards, and thanks to [Tom] for the tip!

50 thoughts on “Turn Your Motorola Android Phone Into A Raspberry Pi

  1. I don’t know what to make of this, This is either going to be one of the best things released in a while or it’s going to flop. I really hope it doesn’t flop as phones would make a great hacking/making platform.

    1. Make no mistake, this will “flop”. This will interest less than 5% of the overall market share of mobile phones, and less than 5% of those people will actually pay to play. And even less than that will make anything cool. But that doesn’t mean it’ll be a failed project. It’ll serve it’s purpose, and we’ll all be the better for it.

      This is Moto/Google’s way of getting the hacker community to get involved in Ara to see what great ideas “we” come up with that Google can learn from.

      Its the same as all of the amazing Google projects and products that eventually die a silent death after Google has gleaned enough information (Latitude, Glass, etc).

      If we’re lucky some bits of this will stick around in the Android kernel so we can make use of it years from now in some form or fashion.

      1. I did think that this was a grab too see if anyone would add a new feature to phones that would sell if implemented well but then I thought I was being cynical. glad I wasn’t the only one who thought that was a possibility. I think it will flop too the price is way high. I got a bit carried away at first as it is a good idea.

      2. “This is Moto/Google’s way…”

        Motorola hasn’t been a part of Google for a while now. Lenovo now owns them, and as with Lenovo’s ThinkPad laptops, the Moto line of phones has tanked in quality. I’m honestly surprised they are even doing this “open hardware” thing, given how quickly they reverted to locking down bootloaders permanently again, and dropping software support within weeks of a model launch, as soon as they were off Google’s leash.

  2. I’m pretty sure I don’t want the phone I carry every day to have crap hanging off the back of it. The Moto Mods sounds like a good platform, but if there’s something else I want my *phone* to do, as opposed to a dev/experimentation platform on my *desk*, I’d probably want a little box that talks to my phone via Bluetooth and sits in a separate pocket, my backpack, a belt clip, etc.

    1. A headless Raspberry pi 3 can talk to your phone via bluetooth (terminal) or via wireless lan (terminal and vnc). All you need is a power supply. And while you are at it, throw in a bluetooth keyboard for easier typing in the terminal. When you have USB host mode, you can also use usb2LAN cable for a more robust connection. I do that all the time and it works.

    2. You can just think of it as a standalone dev platform. Battery, screen an other peripherals are already onboard. And if it supports it, why not program it on the fly.

    3. There’s no crap hanging off of it. These mods are connected with magnets so they simply pop on and off of the back. The phone was built with this purpose in mind, to swap mods quick and easily.

  3. Why? It looks like a gimmic to me.There are other easier and cheaper approaches. I am currently working on installing a MQTT client on an Android phone and a MQTT server on a Pi so that they can talk easily over local, secured Wifi. There are many other ways to do the same without bolting hardware onto a phone, USB, Bluetooth etc.running one of many software interfaces.

    1. Right, the most I’ve ever spent on a phone is $120 and I mean $120 free and clear, not 29.9% financing on $800 buried in a contract with 120 down. I could maybe see me paying up to $200 for something epic, but in the end, you’ve got to think of them as expendable, from loss, damage or theft.

  4. I’d be more excited to see GPIO access on one of those USD $30 4K Android TV boxes that can also run Debian using 5v at 2 amps. Then I’d use my phone as a wireless screen but not need to care about an over-voltage destroying it.

      1. You could do that, but as they can run Linux and have multiple USB ports you can could connect any of the common boards that way. What I was talking about was having GPIO lines directly off the >1GHz multicore 64 bit SOC, which as you can imagine would be a very powerful option.

  5. While I’m glad to see a post about Moto Mods on Hackaday, one thing is bugging me: no mention of the Moto Z.

    Right now, the Z is the only phone compatible out of the box. I’m sure someone can and will come up with a way to use them without the phone they were designed for, but it would probably be a good idea to at least say something about it.

    And yes, I do have a Z (Force version), with the JBL speaker mod, and I love it. Keep looking at the MDK and thinking about all the amazing things that could be made…

  6. Not sure I see much advantage to this, especially at that price. Ouch.

    As others have mentioned, there are already projects like the IOIO that work with a variety of phones, and for a fraction of the price.

    Also (cue the “the Zero is a myth!” people), it’s actually very simple to tether a Zero to a phone, if the phone supports USB Host. I did it recently just to see if it would work. The phone provides enough power to run the Zero, and they communicate over ethernet-over-USB.

    Just install the latest raspbian on the zero, change a config file to turn the USB port into an “ethernet gadget” instead, and plug it into your capable phone. My phone recognized it as a wired ethernet device; I could ssh into it, hit a webserver on it, etc. So there you have a ~$10 solution that is a real Pi, with all the jillions of pi libraries and years of knowledge and support, instead of some niche product that only works on one specific model of phone…

    There are a bunch of ways to do a human interface, once you’ve got that simple IP link between the phone and the Pi. Use an MQTT app, or a web browser, or even run an X server on the phone. (i didn’t have much luck with the X method, but I didn’t invest a lot of time into troubleshooting it, either.)

    1. You can also do it the other way around if your phone does not have host capability. Set it to USB tethering, now the phone will be a network card for the Pi and you can do the same stuff.

  7. Some time ago, I came across someone who was using an Android phone to power (be the brains of) a modified hexapod robot, one of the commercial toy ones. Can’t remember the name of the toy, “Hexa” something… anyway, the cell phone implemented tracking technology — objects and colors, as I recall.

    The motor control system was singularly inventive, though, and I’ve thought for a long time about a ball robot with a smartphone inside running things with a similar scheme. It was as simple as it was ingenious — the App running on the phone had control of the headphone jack and used it to communicate with the motor driver board via tonal control, similar to how the modems of decades past communicated across telephone lines…

    My own personal angle is to use DTMF tones. There’s actually sixteen of them — your telephone, unless it’s a particularly rare one, lacks the ‘A’ ‘B’ ‘C’ ‘D’ buttons that were intended to be next to the ‘3’ ‘6’ ‘9’ ‘#’ buttons, but the tone configurations for those buttons are in there somewhere anyways. DTMF encoders and decoders are cheap on eBay, and with sixteen buttons you can do hexadecimal encoding… and if you do two sets of overlaid tones per (for lack of better terms) “packet” — meaning you transmit one ‘button’ combination, then send another, then receive two the same way — you’ve got self-clocking asynchronous serial comms going. Sure, it’s slow, but let the phone do the sensor work (or at least most of it) and just run the motors off the jack..

    Not to mention that you have left right and mic channels in there — so if you /really/ need to run multiple things, you can use one xmit channel for data and one for bus arbitration. The cell phone controls. Left side puts out a hex address. Addressed hardware ACKs via mic channel (of course). Data spews from right side, with an ACK on the mic line after each byte. Non-addressed devices monitor the right side and mic lines, and don’t IRQ when the bus is busy, but can send such a request when the bus is not in use. Obviously this makes interrupts tricky, and bus thrashing really is a thing, but it’s the best I can come up with quickly.

    Obviously I just public domain’d this idea. I don’t care enough to try and ask for credit (good thing, probably!) — the smile I’ll get if I someday trip over your project using it, is payment enough for me ;) Do please credit the guy with the phone on his hex ‘bots, though, since he got there first. “Fair is fair, Fred!”

    1. Why dtmf when you can bluetooth and also perform wifi direct. Theres no need for slow forms of communications. Youre ideas would definitely have been ideal a decade ago but tiday you can find several cell phone driven robotics. Seen them even at radio shack for a song. Hopefully they slash the price in half of this semi proprietary hardware and one day even make it less proprietary allowing it to have its own power supply and communicate to any cellphone via bluetooth (will be version 5 which will quadruple the range, double the speed and increase data broadcasting capacity by 800%)
      You’ll definitely see bluetooth 5 drones based on this by 2020. There are already Bluetooth ver 4 drones but their range is sadly limited.

      1. Most of my tech knowledge is rooted in 80s gear. Why use a Pi or Arduino when a 6502, 2-4k ROM, and RIOT will do you fine? :P I’m only half serious, don’t worry… but, for the record, that hardware (plus a lousy screen-driving chip, the TIA) is the recipe for the home game console that quite arguably created its industry — the Atari 2600. One-hundred twenty-eight bytes of RAM (no, I did not accidentally leave off a metric prefix there), no CPU interrupt support whatsoever (!), and the /larger/ ROM cartridges were 4k… and look what it proved capable of.

        History is and forever will be constantly important, for two reasons. One, it tells you where you’ve been, which is never not relevant and (if nothing else) always good to know. Two, it tells you what undeniably /works/ (and doesn’t), which at the very least provides a fallback.

        Besides, I’m a strong believer in the wisdom of William of Ockham and his famous razor. After all, additional complication automatically means additional points of failure, potential or realized. Or, as the great engineer Montgomery Scott put it in one of the Star Trek movies — “The more you overblow the plumbing, the easier it is to clog up the drain.”

        DTMF over headphone /works/. Arguably, in some circumstances, it will work better than an ESP8266 and short-range WiFi or a Bluetooth connection scheme of some sort — neither of which you really /need/ when you’re bridging a distance best measured in fractional inches (or low quantities of cm, if you’re the SI type) anyways. Additionally, complete motor control (not using the protocol I specified previously, though) for two motors can be implemented with a single DTMF decoder IC, a Schottky diode network (or a set of glue-logic chips if you absolutely must) for ‘instruction’ decoding, and a single L298 if you use smallish motors (or two L298s, wired one motor per driver chip, with bigger motors). You don’t even need but one headphone channel so far — but if you want to get complicated, you can rig something up with vregs or whatever so that you have a crude speed control that’s not just a bang-bang type. Use Omni wheels (four, forming a square) and drive ’em sort of like an old ball mouse’s encoder — one set of wheels for left-right, one for forward-backward. There’s some physical challenges to overcome there, but you wouldn’t be here if you weren’t smart enough to figure that stuff out ;)

        The other idea I had, which smartphone control /really/ takes advantage of, I only sort of vaguely alluded to, IIRC. Use the frickin’ camera! Mount a mirror at a 45deg angle below the camera, with the phone horizontal, battery side down, and teach your phone to /see/. Modern phones’ SoCs should be able to handle that kind of processing with ease. Use a domed mirror, like those cheap little stick-on ones you can get for your car that supposedly see through blind spots, and your little cycloptic ‘bot has good vision in the periphery of its vision, not just straight ahead. Sure, that peripheral vision will be a little distorted, proportionally — but it’s not like you can’t deal with that in software… which you’ll have to do for the rocking motion it will have to deal with anyways (/that/ stuff happens basically because Newton). Fun fact, your body does this already. When you’re born you see upside-down. One lens per eye, folks!

        You’ll want a distance-measuring something in there as well, unless you can give your phone depth perception (/that/ might be a bit much on the processor). Use an acrylic ornament ball (they come in up to ~200mm size on eBay, you know) and tape over the seam with gift-giving Scotch (or Sellotape if that’s more your flavor). Presto! one IR-transparent mobile ‘bot enclosure. So, use an IR rangefinder. I’ve heard that Sharp has some particularly nice offerings there. Use the mic input for that signal — higher pitch is closer distance, would be my suggestion, basically because it makes sense — but whatever works, works.

        1. Something to mention… a lot of older and some fairly dumbass PDAs had DTMF out the speaker available from phone book entries. The theory being, that although they weren’t integrated to the telephone network, they could still make things easier by making the tones, so all you had to do was hold them up to the phone mic to dial….

          … anyhoo, for the less smart ones, dumb PDAs that were basically databanks, you could mayyybe just use the phone books as sequences of commands. Then getting into the ones that were programmable, Psions, Palms, Newtons et al, you can give them some braining duties, and they also might have IR networking, which can be used to communicate over short distances.

          1. Ahhhhh but they lack two things in a smartphone that require harnessing: the camera and the raw power of a modern smartphone SoC. Machine vision is a thing now ;) I /did/ talk about that.

            Besides, my only PDAs are a black-box PSION Z22 (if I didn’t get rid of it, which I think I did), some sort of old awful clamshell Clie thing that forgets everything when its battery dies and is also largely a black box, and a PSION Organizer II that’s the same age I am (literally — it was made the year I was born).

            Besides besides, I have zero money right now and my programming skills are all in QuickBASIC PDS 7.1 (okay okay I adapted some for PICAXE uC’s but that’s it)… I don’t even know how to Arduino yet :(

          2. Too far nested I guess. This is for star hawk – take a look at Python. It’s as fun as QB was, but more powerful than anything you’ve ever imagined.

            Then shell out the $3 for a wemos d1 mini board. It’s an esp8266 with everything on board you need to play with lua, micropython, or arduino programming, with wifi.

    2. Actually I was just flicking through a TAB robot book 1st published in late 70s, think my copy was 82 edition, and that had a DTMF tone control. The reasoning was that you could use it over RF link, directly by audio, or remotely by telephone line.

    3. There is a guy who has been showing the servo PWM over headphone jack app at Tokyo maker faire for several years now. Not sure if its his hack but he’s made a thing of it, with several tables, staff, and kids making two axis servo objects like animal tails and gigantic eyebrow glasses.

      As for your idea of using audio tone to control stuff.. all those animatronic stage shows at pizza parlors used to use audio tone encoded on one audio track of video tape. Pop the tape in hit play. You get vide and music for the house and control signals for lights, stage props and “robots”.

      Later versions went to digital media and allowed for audience interaction.

      I also bought a robotics kit a while back which programmed the micro through the audio output of the Pc. So.. been done, but OFTEN overlooked as aa method of IO. You’d think we would see more of it.

      But, if you have used any of these new credit card dongles that plug into a smartphone headphone jack, you’ve used your own idea before you even had i! ;)

  8. I thought of this a long time ago been waiting for someone to implement the idea sure the suggested price is north of $100 but surely it will be half that price in a matter of months … too bad its proprietary and that is bound to a particular type of cell phone if I’m understanding this correctly Moto Z?

  9. I have used a bus pirate on my andorid phone a long time ago to diagnose some things. Running from a terminal. It was the best thing I could do at that moment and it felt rather difficult to use. Of course, a dedicated app could have helped.
    While a device like this could be interesting, let’s not forget that the support for many USB-serial adapters is already out there, so there are plenty of things to hook up to your phone right not and bang some pins. The fact that not many people do it shows it is not really needed.

    The thing that I would like to have is some board which contains a usb hub and another microcontroller with GPIO, maybe imitating the Pi’s pinout. Of course it would be slower to access, but could work, you could turn an old phone into a pi with screen for less money.

    1. Yer, the RPi is so limited, it’s only been into space, made into super computer learning systems, weather systems, security cameras, robot vision, robot control, heating control, desktop pc, media centers, arcade machines, 3d printer hosts, tweeting beer kegs, tweeting coffee machines, dashtop cams, bathroom music players, build farms, live stock monitoring systems, photo booths, 360 photo capture booths, bullet time cameras, art exhibits. educational devices with a full curriculum……. I could go on all evening, yes so limited…………

      1. To be fair, rubber hoses (in some form or another, whether for carrying matter or for insulating wire) have also made it into most of the things you mentioned.

        “To a man with a hammer, everything looks like a nail.”

  10. To be fair this was first spec’d in the Neo900 by the same team which brought you openmoko. Though if you think the hacking port is niche then openmoko is deep in the noise with phones built on an Arduino with a GSM shield. The important thing about a hacking port or interface is that it will make adding a radio silent no-tracking POCSAG pager module into phones. Some easy qt or android code and you can have a phone which calls back the number paged to it, giving you the choice to run radio silent yet communicate, on your terms, within seconds of real time on a cheap well supported service with excellent coverage.

Leave a Reply to fooCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.