3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Nunchuk-controlled Helicopter

Step 4Capturing IR packets

Capturing IR packets
All right, so now that your 'logic analyzer' is ready to go, we're going to start the actual reverse-engineering : 'intercept' the IR signal that goes from the remote to the helicopter. In the next step, I'll attempt to decode this signal, and create one from the Arduino.

So just click on the capture button, and crank up the throttle on your remote. Zoom in a little bit, and you'll see a signal like in picture 1. The signal is read from right to left
- As you see there are times when the 'ON' period is long, and times where it's short. At the beginning, there's a very long 'ON' period, we'll deal with that later.
- Right-click on one falling edge of the short 'ON' signal, select set cursor 1 (for better precision, use the zoom)
- Right click on the corresponding rising edge, select set cursor 2 (see pic2)
- Now go to Tools-->Measure, check the 'Distance' value, and write it down : write short_ON=[distancevalue] in a txt file.
- Do the same thing for the 'OFF' (check pic3), and write down : OFF=[distancevalue]
- Do the same thing for the long 'ON' period, and write down : long_ON=[distancevalue] (see pic4)
- The very long 'ON' period at the beginning of the signal is called a header. Measure it, and write down : head_ON=[distancevalue]

But now, how will we decode the binary stream (0s and 1s) sent by the remote? One would think that a 'ON' period is a 1 and an 'OFF' period is a 0. But then, why are there longer 'ON' periods, and why are all the 'OFF' periods the same size? The reason is that :
- a 1 is a long 'ON' period followed by an 'OFF' period (see pic4)
- a 0 is a short 'ON' period followed by an 'OFF' period

Now that we have figured out how to 'translate' this IR signal into a series of 1s and 0s, we still need to know which 0s and 1s control which part of the heli (the yaw, pitch, etc...). For this, we will try to write down that series of 1s and 0s in every possible configuration of the remote, (e.g. Full throttle-yaw centered, then Full throttle-yaw to the right, then Full throttle-yaw to the left, etc...). Then we can figure out which combination of 1s and 0s corresponds to which part of the heli, by seeing which 0s and 1s change in which remote configuration. Now, to better see the changes of the 1s and 0s, we can color them differently using a intelligent notepad. I made it under notepad++ in windows (you can use it with wine on linux). At the end, I got a text file looking like picture 6. Then I tried to decode it and made another text file describing which helicopter components were affected to which bits : here it is.

With this info, you should be capable of reverse-engineering the IR protocol of any similar helicopter. If you do, please post a comment so I can integrate it in this instructable.

Next step is recreating this IR pulse in Arduino. Ready, let's go !
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
38
Followers
4
Author:a1r(A1Rstudios.com)
My name is Jonathan Rico, I'm 17, I'm french and I live in Morocco near Casablanca. I'm in Terminale S (French equivalent to 12th grade) at the CNED (homeschool, but controlled by the french governmen...
more »