HOW I DID IT: I’ve had an iPhone for about a year now, and find it quite indispensable. It’s handy in so many situations, and fits into a lot of nerdy stuff I do. However, it hasn’t fit in perfectly to the main nerdy thing that I like to do: Fly radio control airplanes and helicopters. For that, I use a really high quality piece of
hardware from a company called JR, a JR 9303 radio. It works great. However, one day it occurred to me, how cool would it be to use my iPhone to fly my RC stuff? The answer was “So cool” obviously. I tossed around the idea for a couple of months and ultimately gave up on it because the iPhone doesn’t have a receiver I can put in the airplane to fly it with.
So the idea sat untouched while I learned how to program stuff on the iPhone for other nerdy purposes. My roommate requested I make a chadwick balancer for him using the accelerometers. (For those who don’t know, this is a device they use in real and model helicopters to find out if something is not balanced. Main blades, tail blades, shafts, gears etc…) While I was learning about the accelerometer functions in the iPhone, the idea pinged me again, and I thought, How cool would it be to fly an R/C model using the accelerometers inside the iPhone?! Alas, still no receiver.
IMAC Season came and went, and so did indoor season. I was busy practicing for contests I knew I’d be beat at, and building planes I knew were way to good for me. =) Then, one fateful day, I deleted some PHP program I was working on by accident. This was a LOT of work, and I was exceptionally pissed off about it. I was distracted by some girl in my bed (Don’t EVAR program PHP with a girl(s) in your bed!) and maybe a beer or six in my blood. I was writing a series of test programs for a SOAP interface, and had named one of them 8.php. (The more seasoned nerds among you can probably see where this is going). The program had turned into a complete disaster and was causing “internal server errors”, and I wanted to delete it. While girl was yammering in my ear I typed rm *.php instead of rm 8.php, and hit enter. Deleting every php file in the folder. Hours of hard work gone into the void.
The next day I went and bought a time capsule from Apple so this would never happen again. The side effect of this was that I had a Linksys 54 to play
around with. I always had this grandiose idea of building a WIFI sniffer/jammer. I figured there may have been some people playing around with these routers. And gosh, was I right.
The DD-WRT project is a group of people who have reverse engineered many popular brands of routers and have managed to load a small linux distribution. As soon as I saw that they had independent programs running, it hit me like a bolt of lightning: My planes and helis don’t need a receiver if they are carrying around the server. If I could carry around the router on board, I could fly my stuff.
So I started scheming. There were a lot of problems to be solved, and I am only just so nerdy. I made a list:
- How do I get the router to talk to the servos? How much current can ethernet handle?
- How do I control throttle with no stick?
- What is the latency going to be like from iPhone->Router->Program->Servo?
- What is the range of WiFi? Good enough for RC?
- Can I fly with the accelerometers? I’m a stick banger. BIG time. How does one add expo to this?
- Whose planes can I test this on? >=)
So I had my basic idea down. iPhone joins the Linksys router network. It gets an IP address. Then, I open up my pilot program. The pilot program interfaces with the router via SSH (I couldn’t think of a better way that has redundancy, and speed, and was already buily by someone else). The pilot program interprets what the iphone is doing, and outputs data to one of the ethernet ports of which there are conveniently 4. Rudder, Ailerons, Throttle, Elevator.
Once I had that idea all drawn up, I said “great, I’ll file this in the ‘projects I’ll claim to have come up with once someone else does all the work’” file. However, my friends and roommates kept egging me on, especially as more and more of them got and loved their phones. They wanted to be able to fly stuff too! Just to say they can.
So the first order of business was to come up with a user interface for the iPhone to fly things with. I know how my JR Transmitter works, but it’s a whole different beast: it has sticks and buttons. So, I came up with a simple “flight interface” for the iPhone. It’s sinfully ugly, but brutally functional. It has a couple of things that I felt were important:
- Throttle Lock/Cut
- Visual Throttle Cue so you can see if the throttle is at full and you’re not getting power to the plane. Also, the phone will vibrate depending on different throttle positions. Full throttle gets a hearty shake out of the old girl.
- Network status (Based on ping latency)
- Really difficult to accidentally quit.
- Ability to eventually use more than one engine. (Just in case).
- Cool looking throttle levers like the big boys use.
The program itself wasn’t too hard to make using Xdev, the iPhone/OS X development suite. The interface was pretty easy, but there was a lot of code behind tapping all the accelerometers at once. To further complicate things, how I tilt the phone may be different from how someone else tilts it.
There were some major hurdles. While range testing one night, I received a call from a girl. She was pretty insistent on me going to a party or something. So now I had two huge problems, incoming calls would kill the link to the craft, and I had to figure out if I had any clean clothes without R/C Logos on them to wear out.
The other problem I ran into was that the Linksys router can actually work on a lot of different voltages. Ironically, it’s very happy at nine volts, the max output voltage for the Castle Creations Castle link.
Finally, you may ask how the servos are being driven. Well, routers are used to send bits of information down a series of twisted pair wires usually. Guess what it takes to send packeted information? An IC that would work really well as a PWM! I did some haxoring around on this, and read what other nerds had done on the internet, and the next think you know I have a servo with a Cat5E plug on the end of it. Below is a small video I made of some of the earlier tests, the first real successful flight test, and an interesting near miss at the very end.

You should do yourself a favour and learn about revision control tools, such as cvs, subversion, hg or git. You won’t regret it.
Hi Josh,
This is extremely cool !
I don’t know anything about iphone programming, but instead of the throttle gui, would it be possible to have the acclerometers respond to lowering / raising the entire phone as throttle commands ?
And how about twisting the phone controlling the tail ? (or is it already doing that?)
Any chance of posting your code under GPL?
Can you post links to the info on the “cat5 servos” ?
Mike
Hey man, thats not possible. In no friggin way are you going to fit a linksys router into the heli. The frames are too small.
I’d like to see the pics of your heli. How you connect Linksys router to the servo? Can you show us?
Hi
I am a newbie try my hand at building RC planes. Got a basic Q for which I am not able to find answers….err let me put it this way ….my lack of knowledge is hampering me from understanding what already there! So can I pose a straight Q to you?
I have a Eclipse Tx-Rx and a Lego……and some motors. I want to drive my RC plane on Lego platform. Lego candrive motors pretty easily….but I don’t know how can I interface my receiver to LEGO…….
some day I should be replicate this from my Mac atleast if not iPhone!
Very nice project. Followed the link from Hackaday.com I’d like to do something similar with my G1
Good inspiration.
Hmm, I’m sceptical if this is real or not. Either way, if you’re coding through xCode (and not a jailbroken program) then there’s no way you could have solved the problem of “Really difficult to accidentally quit.” as you can not use that button in your code.
If its real nice work but it looks too fake.
Good work !
I have done an equivalent few time ago with RC car Windows mobile phone via bluetooth, you can see it on Youtube!
I am wondering if you were able to plug the servos to the router, or did you use a card like SSC-32 to control servomotors (connected via serial to the router) ?
Regards,
Florent
a semantic/grammar error for you:
on your ‘Who is my aunt? Why is she hot?’ page, last paragraph:
“… For all intensive purposes …”
should be
“For all intents and purposes ..”
see http://wiki.answers.com/Q/Is_the_saying_‘all_intents_and_purposes’_or_’all_intense_purposes’
It’s actually zip-tied to the skids. Its hard to see a in the video, check out the pictures.
Josh
realy cool might do something equivalent with my rc cars (its now joining the list somewhere way down there ………)
People, this is fake. Turn on your Bullshit Detectors once in a while. He fit a Linksys board in the heli and that drives the servos? Yeah, right.
So why not create an iPhone app that u can access through the web? Have the iPhone itself control the servos. Then i bet u could do some way kewl stuff with the gps etc.
Funny why people would assume it’s fake. I can see the familiar black/blue router w/ antennas, vaguely, mounted underneath, but you could always take the frame off and just work with the guts anyway, as you’d lose most of the size and weigh then.
And why even bother to fake something like this? Just strap a non-functioning router to an R/C helicopter?
That would be so lame. Much more interesting to actually implement it.
It’s hard to guess whether the software or the hardware was more challenging. I guess you’d have to learn a lot about interfaces and tuning the outputs to physical devices that you didn’t know before.
BTW I know nothing about R/C stuff, I just used to program.
Psyops’ web control idea is cool but latency might vary a lot, I imagine.
[...] r/c trucks with a WiiMote and iPhone. Now some crazy American from decided to control his r/c helicopter with his iPhone. Seems to be an effective method for basic controls. I’d hate to try and do some [...]
vaya cara tienes hermano
I don’t usually reply to posts – but this I had to…
Just to clear this up – this is so obviously a fake. “…and the next think you know I have a servo with a Cat5E plug on the end of it.” – yeh, course you did mate! The hardware in the router is simply not able to output individual PWM signals to each port in order to control servos.
As a project, this is entirely possible by the way, but there’s a few key things missing from this write up which if you’d really done it you’d not miss – some basic understanding of the the connection to the servos in particular. The hardware in a router can’t be used to send PWM without some additional hardware. Also, what happened to control of the rudder?
And if anyone still thinks this is real – take a close look at the vids opening testing (frame by frame if you need to) – the tilting of the phone isn’t consistent with the controls on the heli – even if you take a little delay into account. The guy obviously has his other hand, conveniently out of shot, on the helis transmitter.
Oh, and also, watch the guy talking about it – it doesn’t take a psychologist to see signs of dishonesty whilst he’t talking about the technical aspects. For example, touch of the collar and eye movement when talking about ‘his’ modded Linux firmware.
Why fake this??? It’s obvious people would believe it – it seems plausible, and without understanding of the electronics/networking there’s no reason to think it’s not possible. Was your aim to have an easy go at fooling a few people, or to try and get credit for doing something you obviously don’t have the knowledge and understanding to actually implement?
Either way – what’s the point???
Sigmund Freud … errr Tim-
Thanks for your comment. It’s clear you’re not very knowledgeable about R/C.
Thanks!
Josh
Hi Josh,
Great Job!!
There is also a kit for doing so, it is a PCTx which can be used for application with PC computer, and write some application to send PPM signal to your transmitter and then control the RC heli.
To have the same result with your work, I would like to use gyro/accerometer Android applicaton on my HTC phone via Wifi, and talk to my PCTx application running in my NB to control the heli.
But how do you do you part in sending the signal to RC?
Thanks
Hi, i have a Castle creations mamba max ESC with futaba servos. I have an iPhone 3g with ssh and of course wifi. My remote is a nomadio sensor. The has a USB port. How to i go about programming this? Or does it only work for heli? Thanks.
Hi,
We fly exterior and interior R/C blimps in Mexico, and we had the idea to control them using an phone, I looked around and found your helicopter project, which is awesome. I would like to talk to you about our project if you are interested.
Thanks
Hey guys!
I’m glad you found my site. I have an unfortunate history with radio control blimps… http://www.myauntishot.com/2007/funny/the-rise-and-fall-of-a-giant-chalupa
=)
Josh
Hi Josh,
Congrats for this concept.
How cand i reach you ?
I want to talk with you about iPhone development and some other stuff.
Best regards
Hello Josh!
So I’m going to be studying your ideas here!
I’ll have to come back and look things over when I’m not at the end of a sleep deprivation test with Vault Cola. I have been putting systems together in my head and locating parts for almost two years now to work out the integration of RC and the computer, internet, etc. End goal is to have a long range device, maybe using a GSM chip or what ever that has unprecedented flight time & distance and feed that back in to first person POV so that you can fly out of sight and return. Incorporating my iPhone blind sided me! What a great idea! I’d like to throw some ideas out on the table and see what pieces of the puzzle can be fitted together. Power is of course the big issue, something that can fly for 15 minutes isn’t going to do, so alternative energy scavenging sub systems, like harvesting energy from long distance microwave tower to tower transmissions beams, ambient radio waves , temperature & pressure differentials what ever can be thought of until we get a micro fuel cell suitable for RC.
W2g Josh,
good job. would never have thought about that, even tho i just read of a czech guy doing the very same thing with a r/c car whilst carrying the (minimized) router in a backpack.
id love to understand how ud make a Cat5E work on a servo but i dont.
the idea leading me here was actually to fix a 2.4 Ghz Cmos cam on one of my helis – and since i didnt wanna buy a video receiver in addition to that – use the iphone asa receiver…
guess even in that case id always need a router.
maybe u can implement that in a 2.0 version of your software in case u ever publish it (plz do :p)
or maybe ill do it – anyways, thnx for all the nerdy ideas and hopefully many, many more
greetz