This seems like something of a throwback hack. [WilinNeofoxx] has built an audio modem interface for use with his Android phone. A program running on the Android device takes the accelerometer data and converts it into a 9600bps audio signal, kind of like a dial-up modem. His custom circuit board takes that sound in through the headphone jack and demodulates it for use on the serial port of a PC. This connection to controls a flight simulator using the G1‘s motion sensors. In the video at the bottom of his post he unplugs the audio cable for a few seconds and you can hear the audio datastream coming from the phone. It’s pretty annoying so you might want to turn down those speakers before viewing it.
15 thoughts on “Android Audio-serial Connection”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
We are planning something similar. So far we have 9600 baud transmission working. I am currently fiddling with the mic input. We plan on producing a sub $20 kit for Android->arduino and Android->PC serial communications. Nice to see someone else thinking along these lines!
http://www.flakelabs.com/index.php/blog/
is flakelabs.com is fake. No information only links. Also RS232 TTL audio serial circuit with LM324 does not working.
ah, the joys of acoustic data transmission – I actually built an “Acoustic Coupler” for a Cell Phone that did not have data capability to tether my computer… main issue was that the model of cell phone (and a good chance most cell phones) can’t be dialed through the headset like regular phones can, so I had to program in the AOL Number and timing was critical – I thought about building a custom modem that would let the computer think that the phone was accepting the numbers it sent while the circuit would auto dial the number on the phone… never got around to it, and by the time I could I got an iPhone and just jailbroke it.
Just to clarify, most android phones have hardware to use the microphone jack as a serial port ( http://code.google.com/p/android-serialport-api/wiki/Htc for the dream), but presumably this method can get around the need to have the phone rooted?
Its UART type serial over the USB port (USB functionality disabled), not the mic/headphone 3.5mm jack.
If the idea is simply to get position data from the phone, it seems like this is needlessly complicated. Why not use WiFi, or better yet, Bluetooth?
If the idea is simply to get position data from the phone, it seems like this is needlessly complicated. Why not use WiFi, or better yet, Bluetooth?
It’s often easier, cheaper, more portable, and more efficient to have a low level interface.
@MS3FGX
I for one love the needless complication!
What modulation is he using? I really can’t figure out much of the detail from a quick glance at what he’s published.
Interesting… but for anyone looking to do something like this… Look up TCP sockets. Probably less programming, and certainly nicer to use!
Cool though. I imagine the author didn’t do this because he didn’t know a better way to do it… though i suppose that happens!
-Taylor
He should make one that sends data using phonemes, then it sounds like a weird conversation, would be fun.
@Dominic Thats FAIL. check flightgear.org
Free and the ORIGINAL version. If you did buy it, try get ur money back. anyway, this is a awesome hack, my phone maybe can have a serial com atleast now.
very good idea.
Great idea. For the folks wondering why this is a great idea, think “Internet of Things”. All manner of devices from home alarms, appliances all the way down to individual light bulbs can these days be controlled from your home network or the internet. Setting these devices up the first time is complicated, fiddly and proprietary. Imagine having a simple cell/tablet/pc app that lets you enter the configuration parameters, hold it next to the listening appliance and then click setup. Most folks that end up on forums like this know something about Bluetooth, networks or other matters technology, but 80% of other folks struggle getting their gadgets setup and working.
This idea is not only simplifying the user experience, but greatly simplifying how gadget designers implement configuration functionality into their products. Imagine the saving in time and money not having to build any user interface into say an internet connected $15 toaster [sic]. Setup is done locally via the phone via acoustic coupling by passing the configuration parameters directly to the toaster, and once connected the toaster is then managed via simple API (rest or SOAP web services sounds great). The user interface is built and run on the web where all manner if complicated and fancy looking human interactions is easily done without taxing the $15 toaster with this burden.
The idea is not new or unique. The Electric Imp guys are doing the same thing, but via light pulses from a cell phone screen. Personally I think the acoustic channel is more flexible and portable, all be it a bit more complicated and possibly slower.
I can imagine having a single on chip solution (with an ultrasonic mic) and a matching Cell/Tab/PC app that can be deployed in mass on these cheap devices for pennies.
I can smell a kickstarter coming on..
Nice post. I learn something totally new and challenging on websites I stumbleupon on a
daily basis. It’s always helpful to read content from other authors and use a little something from other
websites.