Version 7 (modified by hz, 10 years ago) (diff)


Hacking IR Dongle

There are 4 components in the circuit 2 resistors(5k, 50 OHM) , 1 IR LED(IR333C/H0/L10), and 1 NPN transistor(2N3904).

  • Resistors are not direction specific, both ends are the same.
  • IR LED symbol, pin 1 is Anode (longer lead), pin2 is Cathode(shorter lead).

NPN transistor

  • 2N3904 is the NPN transistor. Looking at the flat face, the left lead is Emitter (pin 1 in schematic), the middle lead is Base (pin 2 in schematic), the right lead is Collector (pin 3 in schematic).

Solder them together as in the picture (or use bread board), and then connect

  • 50 Ohm resistor to Collector on NPN transistor
  • 5K resistor to Base on NPN transistor
  • Anode of IR LED (longer lead) to Emitter NPN transistor
  • another end of 50 Ohm resistor to +5v pin on Arduino. (An alternative would be use a bigger resistor, say 100 Ohm, to replace the 50 Ohm one, and connect the other end to Vin Pin on Arduino.) This resistor is to make sure we won't burn the IR LED. The IR LED can only accept a maximum of 100 mA current, so if we use 5V to drive the IR LED, we need to make sure the current run through the LED is limited less than 100 mA, which yields the resistance R=5V/100mA=50 Ohm.
  • Another end of 5K Ohm resistor to Pin 10 on Arduino Uno.
  • Cathode of IR LED (shorter lead) to GND on Arduino Uno.

There's a total of 6 connection. After all these connections, you're all set.

After download the firmware to Uno, and wire everything up, if the helicopter still don't fly, you need to use a camera (except iphone camera) to look at the IR LED, make sure it's blinking. ALso, remember you may need to point the IR LED to the IR receiver(a little black plastic square) on the helicopter.

Hacking IR Dongle Audio Jack version

The Audio Jack IR Dongle is produced by UPRtek, and they have published their official Android App and iOS App

They use their own chip to process the audio wave. There's no way to figure out what's inside.

However, we only need to follow the same rules of the IR remote version, with minor change, and it should work.

Each command consists of 31 bits (including the leading 2 special period bits), the structure is explained in detail on our instructables

There are only 2 differences in the Audio Jack version:

  • The remote version use {HIGH=0.715ms, LOW=0.759ms} to be "1", { HIGH =0.377ms, LOW=0.422ms} to be "0", but the Audio version use { HIGH=0.55ms, LOW=1.01ms} to be "1", {HIGH = 0.25ms, LOW=0.56ms} to be "0".
  • The remote version use 38kHz as carrier, the Audio version use 21kHz as carrier.

Remember there should be some space between two commands, from 30ms to 80ms.

Hack Android app i-helicopter with Audacity

This is just a guide.

Download i-helicopter from play store. Use a dual head audio cable to connect audio jack of android device to line-in/microphone in laptop, run the app, turn volume up to highest, and move the throttle to a middle point. Start recording with Audacity. The left channel is the IR code without carrier, the right channel is IR code with carrier. IR code in audio/wave format is pretty easy to understand:

small volume

middle volume

MAX Volume

You can tell from the pictures, that the signal is originally a sine wave. With volume going up, the signal gets cut off and then becomes a square wave, which is the IR Code we want to send out. (that's why we need to turn the volume up to max to use the IR dongle).

The red part is the two starting bit. The yellow part is the 29 bit control code (not fully displayed in picture).

There are only two different period in the sine wave, as marked in the first picture(yellow on top). The bigger one has a period of 1.6ms, the small one has a period of 0.8ms ,give or take. These two period corresponding to the two different bit in the instructables (7 and 4).

Notice the green part in picture Small_volume.png. The starting bit is different. These two starting bit have two period for the upper part and lower part of sine wave. The upper part corresponding to "HIGH" in square wave, the lower part corresponding to "LOW" in square wave.

The protocol is exactly the same with the remote version, just substitute "1" and "0" with 1.6ms period sine wave and 0.8ms period sine wave.