Re: Infrared over Headphones
Quote:
|
Re: Infrared over Headphones
Quote:
Quote:
In this case, it's even better - I would like to test any "monstrosity" I've created before sending it to you, as I've never build something like that before. By briefly looking at example schematics found in NET, it's so simple, that could be used to teach kids as "my first project with soldering iron", but you never know until you actually start to patch it up ;) /Estel |
Re: Infrared over Headphones
Hey Copernicus did you ever end up converting pierogi files to audio to support this?
I recently made one of these audio ir transmitters with a 3.5mm jack and 2 ir leds taken from a remote. A few tv-b-gone wav files and it is working nicely for on/off of select tv's. Range is pretty good, about that of a normal remote. But I would love to have more functionality which pierogi has. Most of the LIRC is based around an input to create an output file...haven't been able to figure out how to convert the LIRC output conf to a wav. |
Re: Infrared over Headphones
Quote:
But yeah, setting up the audio-IR interface shouldn't be that hard, either. The trick is just to create an audio waveform that matches the carrier signal being used by the remote (most often, this is something like a 38 kHZ frequency). Then, you just send that audio waveform when you want the LED on, and go silent when you want it off. So it isn't really a matter of encoding the entire command as a .wav file, just the carrier signal. Anyway, I'm pretty sure that LIRC does support this already, although I'm sketchy on the details; so there should be some way to get LIRC running on it right now... |
Re: Infrared over Headphones
3 Attachment(s)
Quote:
LEDs need some minimum voltage to light up. Imagine an audio line playing a sine waveform and an LED connected between the live end and the ground (remember a protective resistor, but the audio output's internal impedance should suffice in this simple scenario). At the points where the waveform level is below the threshold, the LED will be dark. Where the level exceeds the threshold, it will be lit up, like this: Attachment 37138 Now connect a second LED anti-parallel to the first one. It will act exactly the same as the first one, only on the negative part of the waveform: Attachment 37139 However the receiver does not know that the light comes from two LEDs and not one. It knows nothing about the original sine waveform either. All it can see is light pulses. Note that the light pulses come at a frequency that is double the frequency of the original waveform: Attachment 37140 You can double the frequency again (to 4x the original waveform) by using the above arrangement in e.g. the left channel, the same on the right channel (i.e. 4 LEDs altogether) and playing the waveform through the two channels phase shifted by 90°. |
Re: Infrared over Headphones
I have figured out my issue converting IR to audio :). Irscrutinizer is pretty nifty, and 44100 Sample freq 2 channels 8 bits works well and keeps files small.
One question that maybe you could answer for me, Going through the LIRC database I see two different formats if you will. In one (usually in LIRC 0.6 or earlier) codes are very long, like this: KEY_1 0x0000000000000144 # Was: 1 But in the newer LIRC format (usually 0.8 or higher) codes are expressed like this: KEY_1 0x8877 # Was: ONE Audio encoded as is, I know the top format works (tested it on my tv), but I am not sure the bottom format works...is the bottom format a shorthand to get rid of all those zeros? As a side note, if you would like to add this to pierogi, I am willing to share my audio files (and would like to convert your files for my own personal use, not for distro) |
Re: Infrared over Headphones
Quote:
Code:
begin remote Bits: this remote sends 16 bits of "command" data for each key pressed. Flags: the bits are "space encoded", meaning that the value of each bit (zero or one) is determined by the length of time the IR led is on or off; "constant length" means that, regardless of how long a single sequence of bits takes to finish, the next sequence will start at a fixed time after the start of the current one. (The "eps" and "aeps" values are only of interest when receiving commands, so I generally ignore them.) The "header" specifies that, before any bits are sent, the LED should be left on for 9069 uSec, and off for 4455 uSec. (These are values determined by LIRC's "irrecord" utility off of a physical remote control; they may vary from the official timings for this protocol, but probably not enough to matter.) The "one" specifies that the binary bit "1" is sent by turning the IR on for 597 uSec and off for 1651 uSec, and the "zero" specifies that a "0" bit is on for 597 uSec and off for 531 uSec. (Again, these are a bit off from the official values, but close enough not to matter.) Finally, after the entire sequence has been sent, a last "on" pulse of 591 uSec is sent, and then the IR is kept off until the next sequence starts. (The "repeat" value describes a special feature of the NEC protocol, which I'll skip here.) The "gap", in this case, describes the amount of time, in uSec, between the start of one full sequence of pulses and the start of the next. (If the "CONST_LENGTH" flag hadn't been set, the gap would be the time from the end of one sequence to the beginning of the next.) Now, we get to the interesting part. Before we start sending the "command" bits, we need to send the "device" bits. In this case, these are the 16 bits of "pre_data". In hexadecimal, they are shown as 0x20DF; so, in binary, that should be 0010000011011111. For each of these bits, you would now turn the LED on and off corresponding to the on/off times defined above. Then, you can now send the command for the key. In this case, KEY_1 is 0x8877; which, in binary, should be 1000100001110111. Again, these get converted to IR timings using the values for 1 and 0 defined above. So, in total, the IR should be flipped on and off once for the header, thirty-two more times for all the "device" and "command" bits, then flipped on once more for the trailing bit and then turned off until the next command starts. Quote:
|
Re: Infrared over Headphones
I know that the infrared security is messed up but still don't understand why infrared is disappeared on de modern days cell phones. I got a Palm OS device that can read and write infrared signals. Now I'm happy to use Pierogi on the N900.
|
Re: Infrared over Headphones
Quote:
|
Re: Infrared over Headphones
Quote:
|
All times are GMT. The time now is 19:03. |
vBulletin® Version 3.8.8