Havoc Heli remote: need some help decoding the signal
So I'm sure you've seen these things on TV. Its a little tiny RC helicopter for $30, and it's probably the single coolest thing I've purchased in a while. Anyway it uses infrared instead of radio, so I thought it might be an interesting challenge to try and figure out the controller's signals.
So this is what I've got so far: I plugged a 38khz IR receiver into a stamp, pushed the throttle all the way up, and measured the amount of time the sensor's output goes high and low.
the signal looks like this (the remote sends the signal continuously, so I posted 4 samples):
so with the throttle all the way up:
the sensor stays high (sees no IR) for 12700ish microseconds and then theres a
~2000us pulse,
~450us delay,
~780us pulse,
~450us delay(again),
~780 pulse(again),
~450us delay(third one),
and then a ~1300us pulse.
At this point it starts over with another ~12700ish delay.
The only difference in moving the throttle lower or using the left/right thumb stick is that the ~12700us delay goes down to as low as a 7300us(no left/right, throttle down all the way) or as high as 15000us (throttle maxed, thumb stick all the way to the left).
So I'm sorta stuck at this point. Wheres all the data? can everything be transmitted through that one first delay, and the rest of it's just for identification?
anyone who's got some sort of idea would be really helpful. Thanks!
[noparse][[/noparse]edit] you know, on second thought, is there any easy way to view the output of that sensor without an oscilloscope (just using the BS2 and some other software) I want to see what the signal looks like, I think I measured something wrong.
Post Edited (Whelzorn) : 8/25/2007 6:54:25 PM GMT
So this is what I've got so far: I plugged a 38khz IR receiver into a stamp, pushed the throttle all the way up, and measured the amount of time the sensor's output goes high and low.
the signal looks like this (the remote sends the signal continuously, so I posted 4 samples):
---------- 12695 1988 466 783 453 782 457 1302 ---------- 12697 1987 462 787 452 778 461 1302 ---------- 12701 1988 462 783 457 779 460 1298 ---------- 12705 1990 466 783 457 778 457 1302 ----------
so with the throttle all the way up:
the sensor stays high (sees no IR) for 12700ish microseconds and then theres a
~2000us pulse,
~450us delay,
~780us pulse,
~450us delay(again),
~780 pulse(again),
~450us delay(third one),
and then a ~1300us pulse.
At this point it starts over with another ~12700ish delay.
The only difference in moving the throttle lower or using the left/right thumb stick is that the ~12700us delay goes down to as low as a 7300us(no left/right, throttle down all the way) or as high as 15000us (throttle maxed, thumb stick all the way to the left).
So I'm sorta stuck at this point. Wheres all the data? can everything be transmitted through that one first delay, and the rest of it's just for identification?
anyone who's got some sort of idea would be really helpful. Thanks!
[noparse][[/noparse]edit] you know, on second thought, is there any easy way to view the output of that sensor without an oscilloscope (just using the BS2 and some other software) I want to see what the signal looks like, I think I measured something wrong.
Post Edited (Whelzorn) : 8/25/2007 6:54:25 PM GMT
Comments
so here it is (3 samples):
Thats what it looks like when you turn the remote on, no sticks moved, nothing.
heres full throttle only:
can anyone see a pattern yet? if it would be helpful to have samples from other scenarios, just ask and I'll get them. I have no experience in analyzing signals, so this is a little over my head
Thanks again
If you would be willing to re-run the test, displaying the output in HEX, I'd be happy to take a futher look at it. I only use decimal numbers for balancing my checkbook
To be perfectly honest, it's a whole lot easier looking for patterns in HEX or BINARY.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Take a look at the IR Remote kit for the Boe-Bot http://www.parallax.com/detail.asp?product_id=28139
In·the "Downloads" section on that page is a User Manual and a ZIP file with the source code for a BUNCH of little BS2 programs (from the ·User Manual) that will help you decode just about any IR remote command protocol and a good learning tool on how IR remotes work.
What you're seeing is what you would expect. Wait pulse, then an 8 part pulse train, then repeat. The wait pulse tells you that the remote is about to send a command, the pulse train then needs to be decoded into a hex byte (the manual above explains how to do it). The resultant code(s) then get mapped to the controller that you're using (if I press this button, I get this command). For proportional controlls like throttle and steering, you just have to work out the Min, Max and step values.
Steve
Post Edited (Duffer) : 8/25/2007 10:49:31 PM GMT
www.rcgroups.com/forums/showthread.php?t=671147&page=5
And here is an excerpt from the gent's code that looks like it has times for his (home-brew) controller. Not sure what scale these are at for PWM, but it should give you a good start (you might also think about contacting the author for tips).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Warning: It is off topic.
You mentioned earlier in your post: "Its a little tiny RC helicopter for $30." Would you be kind to tell me (or us, if interested) what it is and where it sells. I just started a new hobby in Helicopters in additional to my Robotics hobby. Is it called Heli-robotics hobby?
Thanks a bunch.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ol' Geo
Retired Software Engineer
An oscilloscope is a window of unseen electronic world. - GM
They are incredibly cool and fun to fly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
I also managed to figure out the way this thing works, *almost* completely. It sends binary 0's as ~670us pulses, and binary 1's as ~1225us pulses (as far as I can tell). Each bit is seperated by a ~460us delay, and theres a ~173000us delay in between each set of data (each set contains 21 bits) The first 6 bits indicate the channel, the next 4 are the throttle power (binary 0-14 [noparse][[/noparse]15 doesn't do anything]), and then theres 4 0's, followed by 6 bits that seem to affect the tail rotor. Then the last bit is always a 1.
So a sample of the data output looks like this (in binary):
001100 0000 0000 000000 1 - this is no sticks moved (spaces are just for clarification)
001100 1110 0000 000110 1 - full throttle
001100 1110 0000 101110 1 - full throttle, tail rotor left
001100 1110 0000 011000 1 - full throttle, tail rotor right
still a bit unclear about the tail rotor info, maybe some of it has to do with trim?
It may. The thing I am not clear on with the trim is this -- when you input trim, does the CONTROLLER take care of adding/subtracting the trim value to the tail rotor speed sent, or is the trim data sent the heli. I'm guessing the former, so you may not see trim info actually show up in the IR pulses.
Have you tried searching and/or posting at the RC Havoc Heli forum threads? It seems like some folks there have dissected this in great detail.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
Take a look at the·Parallax link http://www.parallax.com/html_pages/resources/custapps/app_irrepeater.asp.
There is much information you can learn from my BS2 code.
Stephen
By the way, there is no $30.00 2-axis substitute for a $2000.00 5-6 axis remote helicopter.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
At the Picooz forums a lot of folks seem to have experimented with different batteries, without much luck.
I think it's probably doable with a different battery and a surface mount controller, but you'd have to redo it from the ground up, and include two tiny, tiny motor amp circuits as well (fortunately each motor only has to turn in a single direction, but still). And then there's the problem of adding the weight of *any* kind of sensors. If you're interested, there are some good threads at the RC forums about getting more efficiency/power out of the Picooz -- that translates to more flying time vs. weight. Getting the most bang for weight vs. flight time might be a good place to start, then see how much extra weight you can pack it and still fly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST