Jumping Jack Flash weblog

Remote control – 1: the receiver

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008


a – cut the ending part of the headphone cable (i.e. , remove headphones)

b – connect the IR leds in place of the headphones (one led per channel)

That’s all, now you have an IR receiver. (Note: images refer to first attempt with a single LED connected once to a channel and then to the other till the correct one was found).


> NEXT: Sample the remote control


Or just buy one irDroid IR blaster:


Remote control 4: the emitter

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008


a – Pick the headphone cable

b – connect one led between left and right channel (don’t care GROUND)

c – connect the other led between left and right channel, but the opposite direction

Your emitter should look like this:

Please note the opposite orientation of the two leds!

You should connect them to your headphone cable this way:

Ok, your emitter is ready.

Unfortunately, as it is it will be very weak, and it will have just a few centimeters range! To get a suitable range you need a suitable power; and to get more power than the phone can provide, you need an amplifier.

An amplifier is an electronic circuit which uses an external power source to add some power to a weak electric signal; you can build a simple one using just a few components: 5 resistors and 1 transistor:


The resistors are the component which have a “xxx kOhms” label; the transistor (here, actually,  a “double transistor”, properly a “darlington”) is in the circle.

The external power here comes from a 9V battery (bottom left in  the picture) .

Let’s divide the circuit in parts to better understand it.

  1. We have a voltage divider: this set of components divides the voltage in parts, depending on how it is built, according to formula:
    Vout = Vin * R2/(R1+R2)
    If R1 = R2, Vin is exactly splint in 2 equal parts: Vout = Vin / 2voltage-divider.png
    This means that in our circuit the voltage in Vout will be 4.5V if we use a 9V battery.
    Why do we need this voltage divider? Because the input signal coming from phone to our amplifier will have positive and negative values (its carrier is a sinusoid), so if the base of the transistor was biased at 9V, transistor  wouldn’t be able to amplify positive parts of the wave, being it at higher voltage than the battery; if it was biased at 0V, negative parts of the input wave would be lost; we need “the right in the middle value”: 4.5V
  2. Now we can add the transistor, which will get Vout as input to its base:transistor.png
  3. In case the current/signal coming from the phone was too high, we need a limiting resistor on the input; I don’t know how actually high can the phone output voltage be, anyway the current that will flow trhough transistor will be Iin = Vphone/R3. This current will just activate and drive the transistor, it does not flow through the speaker:
  4. The current which flows in the speaker is determined by the  battery voltage, not by the phone voltage; the power which the transistor must handle due to surrounding components is given by P = V^2 / Rs, where Rs is the internal resistance of the speaker, which we do not know:
    but we know from datasheet that the MPSW45A cannot tolerate more than 1W  (Pd value); to get Pd<=1 we must have V^2/Rtot <=1 ,i.e 81<= Rtot , where Rtot is the total resistance given by sum of speaker resistor and additional R4: we get that it must be Rtot = Rs + R4 >=81 ohm , and Iout would be Iout = V/Rtot <= 9/81 = <=111 mA:
    limit-output.png for this current flowing through the transistor we get around the maximum amplification, as we can see from datasheet:

In “phone world”, 5V is a most common voltage (USB charger voltage); what does it happen by applying 5V to this circuit rather than 9V?

The original site the schematic comes from does not explore this case… but I assume that we would get:

  • Rtot >=V^2  –>  Rtot >=25
  • Vbase = 2.5V
  • P = 25/Rtot
  • 25/81= 0.3  = 1/3

This means that by sure the transistor won’t get damaged, and it also probably means that we’ll get an output power wich is 1/3 of what we get using 5V, assuming we use same R4. To get same power of the 9V-powered amplifier, I think we’d need a total resistance Rtot >= 25 Ohm; R4 value is given by: R4 = Rtot – Rs = 25-Rs.



<< PREV: Edit waveform

>> NEXT-  REPLAY THE WAVEFORM: (in this same page)

a – Plug the emitter into HEADPHONE output of your audio card

b – Position the two leds just in front of your device

c – Press PLAY in Audacity: your device should react to the command you previously sampled.

Remote control – 3: Editing waveform

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008


Now you need to rebuild the original signal of the remote. As explained above, it’s just a matter of carrier present/absent. So:

a – Add 2 new mono tracks into Audacity project

b – Copy the “squared” signal into one track

c – On the other track, create a “tone” (the carrier): 38000 Hz 19000 Hz frequency, 0.9 amplitude

d – Select and delete unneeded parts of the tones; to do this, you have to zoom in: select a part of the signal, and click on the “zoom to fit” button:

You’ll obtain something like this:

e – Now click on an edge of the signal and drag the mouse down to the second track, until the selection reachs the edge of the next pulse in the signal:

f – Once thw WHOLE low-part of the signal is selected (see picture below), click on the “silence” button:

g – You should obtain “silence” on the lower track too:

h – Repeat steps e-f-g for all silence parts of the signal, until you obtain something like this:

Ok, now you have replicated the original signal.

Unfortunately, you can’t just “replay” it: soundcards can usually reproduce only signals up to about 20 KHz, but a remote control use 38 KHz modulation.

But some guys had a great idea some years ago (look here for their patent, now free available on internet; free registration required): simply connect two IR led to left and right channel, one the opposite way of the other, discarding GND, and play a stereo signal made of same signal with opposite phases: this will result in each LED producing a 19 KHz signal; their opposite phases allow signal “sum”, and the result is a 38 KHz signal.

How to accomplish all of this?!?

i – After deleting original signal track (you don’t need it anymore), create a new mono track in Audacity (menu can vary amond different versions):

j – Copy into it the just obtained (reconstructed) signal:

k – Select the whole track

l – Select “invert” from “effects” menu: this will inverti waveform phase:

m – select the first track and choose its own menu item to join it to the track below into a single stereo track:

You should now see a single stereo track:

Ok, now you eventually have the needed signal, which you can use to control your device.


<< PREV: Sample your remote

>> NEXT: Build the emitter

Remote control – 2: Sample your remote

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008


a – Start “Audacity”

b – Plug your receiver into MICROPHONE input of your sound card

c – Place your remote in front of the LEDs

d – Start recording: stereo track, 7600044100 Hz, 16 or 32 bit.

e – Press a button on remote

f – Stop recording

Ok, now you have a sample of one button of the remote. You should see two different tracks: you’ll have to consider just the one which looks like a “square wave”.

Indeed, on my audio card (VIA AC’97) sampling on one channel results in a sequence “triangles”, while on the other channel I get a sequence of “rectangles”. You’ll have to ZOOM a lot into the waveform, both vertically and horizontally, as the signal is very short (few milliseconds), and probably quite low.

The meaning of squares is “digital”: if the signal is high, it means a 38 KHz carrier is present; if the signal is low, no carrier is transmitted. Remote controls use different protocols to tramsmt signals. Look at this page for details (but you don’t need to know details to complete your remote transceiver).


<< PREV:Build your receiver

>>NEXT:  Edit waveforms

World’s cheapest remote control replicator: just 1$ !

Posted in hardware, Infrarossi by jumpjack on 20 maggio 2008

===>> New updated post

DOWNLOAD Windows software


Android apps:

  1. irplus WAVE https://play.google.com/store/apps/details?id=net.binarymode.android.irpluswave&hl=it
  2. Audio IR https://play.google.com/store/apps/details?id=com.ir_remoter&hl=it
  3. MyRemocon https://play.google.com/store/apps/details?id=com.signzzang.sremoconlite&hl=it
  4. Zaza/il telecomando Tiqiaa https://play.google.com/store/apps/details?id=com.tiqiaa.remote
  5. jackcom – https://play.google.com/store/apps/details?id=com.jakcom.key


External IR blaster devices to fit in 3.5 mm plug:

  1. https://macsources.com/jakcom-i2-universal-remote-control-smart-phones-review/
  2. https://www.amazon.com/Ariic-Remote-Android-Universal-Headphone/dp/B00PBXH9YQ


You won’t need anymore complex circuits & complex software to sample commands from your remote control and to replicate them; all you need is just two standard IR led, which you can afford for about 0.50 $ each, or maybe you can extract from a couple of old remotes.

This method was tested with a VIA AC’97 audio card; please report if you have any success with different cards.

What you need:

– 1 spare headphone cable (0$ if you already have it, 10$ if you need a new one)

– 2 IR led (0$ if you have a couple of old remote controls, 1$ if you need to buy them)

– audio recorder software, e.g. Audacity, opensource and multiplatform (Windows/Linux)

What to do:

1) Build the receiver

2) Sample the remote control

3) Edit the resulting waveforms

4) Build the emitter

5) “Replay” the waveforms:

a – Plug the emitter into HEADPHONE output of your audio card

b – Position the two leds just in front of your device

c – Press PLAY in Audacity: your device should react to the command you previously sampled.


1 – For unknown reason, playing the resulting signal in Audacity works fine to control my device; but if I save the signal into a WAV file and reload it in Audacity, playing it results in… nothing! Any explanation for this?!? FIXED: it was due to wrong carrier frequency of rebuilt signal, which must be HALF of the needed carrier frequency! (19 KHz for 38 KHz, 18 KHz for 36 KHz…)

2 – You can’t save the signal in OGG or MP3 format, because this format distort the original signal

Please report results of your experiments! Good or bad, please just report and share! 😉

References and credits at bottom of this page:
Available patents (not mine):
Infrared generator from audio signal source
IR receiver using IR transmitting diode


Buy a ready-made device:


Appunti su fattibilità telecomando tramite cellulare

Posted in Infrarossi, Symbian by jumpjack on 10 maggio 2008

Varie possibilità:

già pronte:

Novii Remote (solo alcuni nokia, a pagamento), utilizza porta IrDA, non puo’ campionare ma solo usare codici da scaricare da internet; c’e’ da capire come creare nuovi codici

Psiloc IR Remote (moltissimi nokia s60, anche 3rd, stesso principio di Novii: non puo’  campionare).

La porta IrDa non puo’ essere usata per campionare i telecomandi, per motivi hardware, ma puo’ “riprodurli”.

Pagina Psiloc da dove scaricare codici pronti:


Pagina Psiloc per inviare codici da convertire:


Siti che forniscono codici per telecomandi (devono essere convertiti nei formati di Novii e Psiloc):



Forum vari su configurazione Psiloc IR Remote:

Scaricamento codici pronti:

Download Psiloc IR Remote:
http://web.archive.org/web/20060321063024/http://www.psiloc.com/files/consumer/series60/Psiloc_TotalirRemote_S60.sis   (2.0 ???)

Download Novii Remote:
Programmi analoghi, per Windows Mobile (pocketPc)

Vantaggio: i PocketPC POSSONO campionare i telecomandi!



http://www.griffintechnology.com/griffinmobile/totalremote/  (fornisce anche hardware da collegare a presa cuffia, cosi’ qualunque dispositivo con uscita cuffia puo’ diventare telecomando! (ma prima bisogna registrare i codici!))  SITO MORTO

Progetti hardware di campionatori/replicatori telecomandi:

http://pc-ir-remote-vb.sourceforge.net/     PC IR Remote

http://www.geocities.com/odednoam/   IR Remote  – progetto semplicissimo: campionatore costituito da normale fotoresistenza collegata a scheda audio! (funziona solo al buio, registra codici telecomandi, per poi riprodurli sempre con scheda audio, stavolta collegata a diodo emettitore)

http://features.engadget.com/2004/07/27/how-to-turn-your-ipod-in-to-a-universal-infrared-remote-control/   Usare l’IPOD e il “recorder di raggi infrarossi” della Griffin per telecomandare dispositivi.
Spiega anche come registrare IR senza PocketPC, con semplice diodo ricevente IR collegato a scheda audio.

http://people.inf.ethz.ch/mringwal/lirc/   Campionatore per LIRC e WinLIRC  (linux e windows)

http://it.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=2861419    Diodo IR ricevente su RS-compnents