ir circuit
hokeyk
Posts: 10
could someone help me! i have to build a ir circuit driven by bs2 to controll a tv. which circuit should i use to transmit the signal and should i train the control signal or learn what they are and generate them from code. thanks for your hel;p
Comments
Please don't cross-post your messages - it results in redundant effort from people who wish to help you out. Here is a start:
http://forum.parallax.com/forums/default.aspx?f=6&m=4192
Download our new infrared remote control educational text.
Ken Gracey
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Well it seems I am getting the same error messages. It's not the fault of the local computer. Its the fault of the fact that the Internet can't find the server. I might also add that the forums server might be taking a break.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buck Rogers
www.gregg.levine.name
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
http://forum.parallax.com/forums/default.aspx?f=6&m=4192
······ http://forum.parallax.com/forums/?f=6&m=4192
and it worked just fine -- remove the "default.aspx/"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rusty-
--
Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
**Out yonder in the Van Alstyne (TX) Metropolitan Area**
Microsoft is to software what McDonalds is to gourmet cooking
Should be forums not forum.
Then the original link will work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards
Rohan Hamer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
There are MANY protocols used in IR remote controls.· They are built out of some basics.
Most TV's have an IR demodulator built-in, which is sensitive to a 38Khz to 42 Khz signal.· When it sees a 'pulse' of this frequency, it outputs a 0.· When the signal goes away, it outputs a 1.· You can easily get one of these three-terminal devices from Parallax or Radio-Shack -- 38Khz or 40 Khz work well.
1.· The typical 'pulse' signal is a 36Khz or 38Khz or 40 Khz or 42 Khz signal for some short period of time.· This can be generated by the BS2 with a 'pulsout IRPIN, 36000'.· You drive·a simple IR-LED (with current limiting resistor) with this signal.· The 'pulsout' signal does not actually generate the proper square wave -- but the harmonics in the signal will trigger the IR-Demodulator anyway.
2.· Now, the protocols specify what makes a 'start' pulse, how long a '1' and a '0' time should be, if a '0' is the presence or absence of the 'pulse',·how many bits there are in a complete 'message', and if a 'message' is send once or many times.
The IR-Buddy 'speaks' the Phillips RC-5 protocol, so if your TV was a Phillips the IR-Buddy could control it.
The Sony protocol can be generated by a BS2.· Many protocols cannot be generated by the BS2, because of tighter timing constraints.· You might 'google' the brand of TV you have· + "IR" to find out if the IR-protocol has been published, and what it is.
3.· The 'Trainable' remotes record the bit-patterns (sent from an existing remote that works).· It would be MUCH easier for you to program the BS2 to generate a message, than to try to create a 'trainable' remote out of a BS2.
>·pulse coded or in other words low for 1.2ms (for logic 1) or .6 ms (logic 0)
> and then goes high for .6 ms > and this process repeats until the
> whole control 'word' has been sent
OK, so FREQOUT is:
FREQOUT IRPin, <Duration>, <Freq>
Now, Duration is in milli-seconds for a BS2, so you can't use a BS2 to·generate Sony bits.
Duration is in 400 uSec steps for a BS2sx, so you can use that.
SendOne:
FREQOUT IRPin, 3, 32000 -- This will send a '1' for 1.2 msec on the SX
PULSOUT PausePin, 1····· -- This will delay for .8 uSec (close enough?· try it).
Return
SendZero:
FREQOUT IRPin, 2, 32000 -- Hopefully this will send a short-enough pulse to be recognized
PULSOUT PausePin, 1
RETURN
Well, that's the approach, anyway.· As Jon has said, the BS2sx timing may not work for the Sony protocol.· Parallax makes an IR lab kit, but it uses 1 and 2 mSec pulse widths, which work great if you are talking from a BOE to a BOE.
Use a 555 timer to generate the IR requency.· Apply it to the positive lead of your IR LED.· Connect the negative lead of the IR LED to the collector of a 2N2222A or equivalent.· Now you can apply a positive-going pulsout of any duration in 2us increments to the base of the transistor and generate very precise IR pulses that will meet the Sony protocol.
You could also use a second Stamp to generate the IR frequency if you have one.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Try the Stamp Tester
http://hometown.aol.com/newzed/index.html
·
The BS2 requires about 250us to execute an instruction so if you wanted to "kill" 600us you could write:
pulsout deadpin, 175
175 = 350us plus execution time would give you very close to 600us.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Try the Stamp Tester
http://hometown.aol.com/newzed/index.html
·
·
Why is the IR Buddy showing as "limited supply"? Will it be discontinued?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
for a control 1:
a logic 0 for 600 us(?) followed by a logic 1 for 1200us(accomplished by pulsout irpin, 600)
for a control 0:
a logic 0 for 600 us(?) followed by a logic 1 for 600us(accomplished by pulsout irpin, 300)
what code genrates a logic zero for the required 600us, maybe inserting two "time sucking instructions" like arithmatic to some dummy variable taking 250us each maybe close enough to 600us