Jumping Jack Flash weblog

New test with IR receiver/transmitter using sound card

Posted in Infrarossi by jumpjack on 30 settembre 2009

Some tests have been performed using an Asus EEEPC 701 4G to both sample and play remote control signals.

EEEPC looks to have an high capabilities sound card, which allows sampling up to 154000 Hz; this allows properly sampling the original 38000 Hz carrier rather than just its presence/absence.

Standard audio card sampling:

Asus EEEPC sampling:

tv-org

Using this sample, some tests hav been performed to determine if, how and when the EEEPC is capable of controlling the TV set which the remote belongs to.

Results are weird: ONE single LED appear to be enough to control the TV set, but NOT using the original sampled signal; instead, an artificial signal made out of a 19000 Hz tone and “mixed” into a stereo signal made up of inverted signals is needed to properly control the TV set.

tv-art-mono

tv-art-stereo

tv-art-stereo-44100

Codici discreti telecomandi per DVD recorder LG

Posted in Infrarossi by jumpjack on 28 gennaio 2009

Discrete IR codes for LG DVD Recorder (tested on RH-255)

Un “codice discreto per telecomando” è un codice di controllo che non corrisponde a nessun tasto realmente presente sul telecomando che attiva una certa funzionalità sul dispositivo.

Sul telecomando è presente un singolo tasto on/off, che accende il dispositivo se è spento o lo spegne se è acceso (“toggle”).

Il codice discreto “ON” accende il dispositivo se è spento, e non fa niente se è già acceso; analogamente il codice “OFF”.

Per la selezione della sorgente esterna, il tasto sul telecomando scorre le sorgenti AV1, AV2, AV3 e antenna; su certi dispositivi esistono codici discreti per selezionare la singola sorgente, a prescindere da quale sia quella attualmente selezionata.

——–

Per il DVD RH 255, ho trovato questi codici:

DVD ON
0000 006d 0022 0003 00ab 00aa 0016 003f 0016 0014 0016 003e 0016 003f 0016 0014 0016 003e 0016 0014 0016 0014 0016 003e 0016 0014 0016 003e 0016 003f 0016 0014 0016 003e 0016 0014 0016 0014 0016 003e 0016 0014 0016 003f 0016 0014 0016 003e 0016 003e 0016 003f 0016 0014 0016 0014 0016 003f 0016 0014 0016 003e 0016 0014 0016 0014 0016 0014 0016 003e 0016 06c3 00ab 00aa 0016 0014 0016 0e7d

DVD OFF
0000 006d 0022 0003 00ab 00aa 0016 003e 0016 0014 0016 003f 0016 003e 0016 0014 0016 003e 0016 0014 0016 0014 0016 003e 0016 0014 0016 003f 0016 003e 0016 0014 0016 003f 0016 0014 0016 0014 0016 0014 0016 003e 0016 003f 0016 0014 0016 003e 0016 003f 0016 003e 0016 0014 0016 003f 0016 0014 0016 0014 0016 003e 0016 0014 0016 0014 0016 0014 0016 003e 0016 06c3 00ab 00aa 0016 0014 0016 0e7d

tasto REC

Codice LIRC: 0x6D92 = 0110 1101 1001 0010

L’equivalente PRONTO dovrebbe essere, stando al programma “TONTO”:

0000 006d 0022 0002 0157 00ab 0016 003f 0016 0016 0016 003f 0016 003f 0016 0016 0016 003f 0016 0016 0016 0016 0016 003f 0016 0016 0016 003f 0016 003f 0016 0016 0016 003f 0016 0016 0016 0016 0016 0016 0016 003f 0016 003f 0016 0016 0016 003f 0016 003f 0016 0016 0016 003f 0016 003f 0016 0016 0016 0016 0016 003f 0016 0016 0016 0016 0016 003f 0016 0016 0016 05f3 0157 0055 0016 0e4d

Come ho ricavato il codice “PRONTO”?

Osservando il tracciato del segnale campionato, e considerando (a parte i primi due “scalini” molto larghi) che “alto-breve / basso lungo” indica un bit pari a 1, mentre “alto-breve / basso-breve” indica un bit pari a 0 (zero), si ottiene:

10110100101101000110110110010010

remote-dvd-lg-rh255-rec-wav-76000hz

In questo tipo di protocollo (“SIRCS”), i primi 16 bit sono sempre uguali e indicano il dispositivo; i successivi 8 indicano il comando; gli ultimi 8 sono i bit invertiti del comando.

Dividendo la sequenza in gruppi di 8 si ha:

10110100 10110100    01101101  10010010

Si nota chiaramente che gli ultimi 2 gruppi hanno i bit l’uno l’opposto dell’altro.

Convertendo in esadecimale, si ottiene:

B4 B4 6D 92

Questo vuol dire che i comandi possibili sono solo 256, cioè i valori da 0xb4b400 a  0xb4b4ff (aggiungendo alla fine il byte invertito).

Nel file LIRC, il codice dispositivo (b4b4) è indicato nella riga:

  pre_data       0xB4B4

Riepilogando, ecco alcuni tasti noti:

DVD ON: 0xb4b4.ae.51

DVD OFF: 0xb4b4.6e.91

REC: 0xb4b4.6D.92

PLAY: 0xb4b4.8C.73

STOP: 0xb4b4.9C.63

In piu’, secondo il file LIRC:

nome hex dec bin
6 0x02FD 2 0000001011111101
SUBTITLE 0x0AF5 10 0000101011110101
POWER 0x0CF3 12 0000110011110011
DOWN 0x12ED 18 0001001011101101
ENTER 0x1AE5 26 0001101011100101
PAUSE 0x1CE3 28 0001110011100011
0 0x22DD 34 0010001011011101
ZOOM 0x26D9 38 0010011011011001
SKIP-FORWARD 0x2CD3 44 0010110011010011
ANGLE 0x32CD 50 0011001011001101
2 0x3CC3 60 0011110011000011
8 0x42BD 66 0100001010111101
SEARCH 0x46B9 70 0100011010111001
SCAN-BACK 0x4CB3 76 0100110010110011
TITLE 0x52AD 82 0101001010101101
RIGHT 0x5AA5 90 0101101010100101
DISPLAY 0x5CA3 92 0101110010100011
CLEAR 0x629D 98 0110001010011101
SETUP 0x6A95 106 0110101010010101
OPEN/CLOSE 0x6C93 108 0110110010010011
STAR 0x7A85 122 0111101010000101
4 0x7C83 124 0111110010000011
7 0x827D 130 1000001001111101
MARKER 0×8679 134 1000011001111001
RANDOM 0x8A75 138 1000101001110101
PLAY 0x8C73 140 1000110001110011
LEFT 0x9A65 154 1001101001100101
STOP 0x9C63 156 1001110001100011
RETURN 0xA25D 162 1010001001011101
A-B 0xAA55 170 1010101001010101
SKIP-BACK 0xAC53 172 1010110001010011
3 0xBC43 188 1011110001000011
9 0xC23D 194 1100001000111101
REPEAT 0xCA35 202 1100101000110101
SCAN-FORWARD 0xCC33 204 1100110000110011
DVD-MENU 0xD22D 210 1101001000101101
1 0xDC23 220 1101110000100011
UP 0xE21D 226 1110001000011101
PROGRAM 0xEA15 234 1110101000010101
AUDIO 0xF20D 242 1111001000001101
5 0xFC03 252 1111110000000011

Turn your phone into an universal remote control

Posted in hardware, Infrarossi, Sviluppo, Symbian by jumpjack on 10 giugno 2008

This short tutorial shows how to turn almost any cellphone into an universal IR remote control.

CHECK GoogleCode page for downloads and updates

Old post (with detailed instructions about how to build hardware)

How I did it (and credits)

Why it should work also on non-stereo cellphones (but it does not?!?) (see also excel file)

Useful links (explanations of remote control protocols)

Other uses for old phones
Available patents (not mine):
Infrared generator from audio signal source
IR receiver using IR transmitting diode

Requirements:

- a cellphone with stereo audio output (audio left , audio right , ground) or symmetrical audio output (audio+, audio-)

- 2 IR leds

- a wired headset compatible with the phone

- a PC with audio card

- an audio recording software on PC

- an audio editing software for PC or an audio sinthesyzer software for PC

This project does not depend on O.S. used: you just need ANY computer capable of recording audio and create audio files from scratch. Linux, Windows, MacOSX or whatelse makes NO difference.

Please look at this post to know how to:
- build an IR receiver for the PC
- sample a remote control
- (create a WAV file using Audacity program) (not strictly needed: this article describe an alternate method).

Once you sampled all needed buttons of your remote, it’s just a matter of building a proper WAV file for each one of them. If you don’t want to use Audacity to do it manually, you can use SOX program: it creates pieces of “raw” audio file, which joined together build up the final WAV file.

Here you find example scripts (for DOS/Windows environment) which build a WAV file based on binary description of the remote signal. You have to setup the unizeri.bat file to have it matching the sampled signal. Then call create.bat specifying as parameter the “creator file” (unizeri-raw, or unizeri-tv,… ), the final WAV file (testbutton) and the number of additional times you want the command is repeated (at least ONE occurrence will be alway created):

create unizeri-raw testbutton 4

(no extensions required for filenames) (NOTE: script must be run inside SOX folder).

This will result in a tesbutton.wav file which, played on a phone (or on PC, or on any audio capable device), equipped with audio-to-IR converter, to control your device.

The audio-to-IR converter:

It is just a couple of LEDs connected in oppopsite ways to “audio output left” and “audio output right” (for normal phones) or to “audio+” and “ground” (for phones with symetrical audio output like nokia 6680). In symetricl ouptu, Left- and Right- must be connected together (see below).

Audio-to-IR converter:

Connections for nokia 6680:

(10 Ohm resistor not strictly needed)

—————————————————-

Study about physics/optical phoenomena involved in this project:

Excel file – how to play a 38000 Hz “sound” through a 20000Hz-capable audio device

Big image summarizing Excel data

————————-

Forums about Ledrem:

Italian:

Nokioteca

PLC Forum

PC Tuner

HW upgrade

Planetmobile

English:

IP-mart.com

Hackint0sh

What can you do with an old cellphone?

Posted in GPS, hardware, Infrarossi, intuizioni, Symbian by jumpjack on 7 giugno 2008

An old nokia series 60 phone (like nokia 6600 or 6680) costs around 50$. But it has:

- bluetooth support

- infrared support

- fotocamera

- internet access

- SMS support

- USB support

- Python support (pys60)

- java j2me  support

Mix all these things together, and you could obtain:

1) 3d foto/video (*)

2) touchscreen (wiimote-like)

3) remote video surveillance

4) Add an IR led to your recipe, and you obtain an SMS-controlled remote-control. (GoogleCode page)

5) Add a bluetooth GPS receiver and you have a GPS antitheft. (GoogleCode page)

6) Home intrusion detection system.

7) Simple guitar tuner.

…any more ideas?

It’s just a matter of writing proper software!

(*) To make 3d photo of moving subjects, or 3d video, you need two separate but synchronized cameras. Bluetooth conection should allow such a synchronization, in such a way that when you shoot a photo on one phone, at the same time it’s shot on the other phone.

Remote control – 1: the receiver

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008

== 1 == BUILD THE RECEIVER

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).

^^ INDEX

>> NEXT: Sample the remote control

Remote control 4: the emitter

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008

== 4 == BUILD THE EMITTER

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

^^ INDEX

<< 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

== 3 == EDIT WAVEFORMS

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.

^^ INDEX

<< PREV: Sample your remote

>> NEXT: Build the emitter

Remote control – 2: Sample your remote

Posted in hardware, Infrarossi by jumpjack on 22 maggio 2008

== 2 == SAMPLE YOUR REMOTE

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).

^^ INDEX

<< 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

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.

NOTES:

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:

http://www.planetmobile.it/jumpjack/LedRem/

Available patents (not mine):
Infrared generator from audio signal source
IR receiver using IR transmitting diode

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:

http://irremote.psiloc.com/Show.aspx?d=TV

Pagina Psiloc per inviare codici da convertire:

http://irremote.psiloc.com/Wizard.aspx

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

http://www.remotecentral.com

http://lirc.sourceforge.net/remotes/

Forum vari su configurazione Psiloc IR Remote:

http://www.nokioteca.net/home/forum/index.php?showtopic=79009&st=180

http://www.spaziocellulare.com/forum/showthread.php?t=11487&page=2

http://forum.telefonino.net/showthread.php?t=347683&page=3

Scaricamento codici pronti:

http://www.fileden.com/files/2008/2/23/1777406/APPS/IrRemote%20Codes%20Adapter%201.0.rar

http://www.novii.tv/up/forum/download.php?id=293&sid=5be11bcf85de88dc0f30504b4c4ea88d

http://www.novii.tv/up/forum/download.php?id=292&sid=5be11bcf85de88dc0f30504b4c4ea88d

http://lirc.sourceforge.net/remotes.tar.bz2

Download Psiloc IR Remote:

http://download12.getjar.com/downloads/web/pub/1758/Psiloc_Total_irRemote.sis

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

Download Novii Remote:

http://www.novii.tv/soft/NRN_21_Novii.zip

Programmi analoghi, per Windows Mobile (pocketPc)

Vantaggio: i PocketPC POSSONO campionare i telecomandi!

http://www.wincesoft.de/html/remotecontrol_ii.html

http://vitotechnology.com/en/products/remote.html

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

Iscriviti

Ricevi al tuo indirizzo email tutti i nuovi post del sito.

Unisciti agli altri 56 follower