Shop OBEX P1 Docs P2 Docs Learn Events
IR remote for Sony DVD player — Parallax Forums

IR remote for Sony DVD player

Cwiber92Cwiber92 Posts: 4
edited 2011-06-05 10:11 in BASIC Stamp
Hello I'm trying simulate my own IR remote control for a Sony DVD player using the bs2. I've been using the "IR Remote for the Boe-Bot" text: http://www.parallax.com/Portals/0/Downloads/docs/prod/sic/WebIR-%20v1.1.pdf
I'm using a 555 timer exactly as in fig. C-1 pg.191 - an oscillator. From the early experiments in the text I've figured out the 5 MSB code for a Sony DVD player is 11010. (TV is 00001) My attached program simply takes in one button code from the actual DVD remote and sends it out with the press of a button. I can't get it to work. I've tried using different carrier frequencies - 40kHz, 45kHz, 50kHz, etc. Strangely enough, when I change the 5 MSB code to 00001 @ 38kHz, everything works perfectly with my Sony TV. (using the TV remote) I've compared the binary-1/0, start, and in between pulses using PULSIN, but both the TV remote and DVD remote yield the same pulse lengths. I've tried boosting the current through my IR LED with a transistor. I have 2 Sony DVD players, neither work with my program. (also, the remotes won't work on the DVD player it's not intended for). Is there a way to measure the carrier frequency of the DVD remote? I've tried using COUNT on the IR module input, but that doesn't really work - the DVD remote does seem to have a higher frequency than the TV remote. So perhaps the only problem is the wrong carrier frequency? Or is the timing different/more sensitive when using a DVD player?

Any help would be greatly appreciated.
Thanks,
Charlie

Comments

  • ercoerco Posts: 20,256
    edited 2011-05-31 01:38
    See my last post at http://forums.parallax.com/showthread.php?102444-Infrared-Remote-controll-Help&highlight=build+IR+remote+control , where I got a BS2 to send the Sony "power" code 21 using an external 555 oscillator. To get a brief pause between pulses, I did a short dummy pulsout on an unused pin (PULSOUT 14,1) . I don't see any such pauses in your program, I wonder if that may be part of the problem.

    You're using very specific pulsouts: 1250 and n*300+345. I assume you've used a scope to measure the original remote's output and you're matching that on your BS2?
  • Cwiber92Cwiber92 Posts: 4
    edited 2011-05-31 16:37
    Does your code work with a Sony DVD player? I have no trouble using my program on my Sony TV. The reason for the "... + 345" was because I measured the binary-1/0 pulses to be around 645 and 345 (in 2-us-units) respectively using the code on pg. 26. Regardless, I tried changing them to 300 and the 1250 start pulse to 1200. No luck. Also tried adding the dummy PULSOUT. According to the text the arithmetic in the PULSOUT commands of my program should take around .5 ms anyways, so that's supposed to act as a dummy pause. Is the problem maybe with the carrier frequency?

    Thanks
  • ercoerco Posts: 20,256
    edited 2011-05-31 16:40
    Hmmm. Never had a Sony DVD player to try. Best bet is to use a scope to compare output from a working remote to your stamp. You can measure & match the carrier and pulseouts that way.
  • Cwiber92Cwiber92 Posts: 4
    edited 2011-06-01 21:13
    Unfortunately I don't have an oscilloscope. Any other suggestions?
  • ercoerco Posts: 20,256
    edited 2011-06-01 22:20
    38 kHz is pretty standard. At close range, any carrier frequency from 37-40 kHz has worked on IR modules I have tried.

    No scope, huh? Can you use someone else's? Do you have a frequency counter to set your carrier frequency?

    Do you have 2 Stamps? If so, configure the second one to receive & decode the output signal from your first one to verify.

    I wonder if that math in your PULSOUTs is slowing things down, if it's burning 0.5 ms as you say. Try writing a version of code with no math, just hard code the pulses as 300 or 600 uS and do the dummy pulseout trick as shown in my Sony TV program that sent code 20 (although I only tested it on a Basic Stamp reading the code, as I didn't have a Sony TV).

    I'm sure you have seen the Sony code list at http://www.hifi-remote.com/sony ?
  • ercoerco Posts: 20,256
    edited 2011-06-02 08:15
    Arduino-based but useful info at http://www.arcfn.com/2010/03/understanding-sony-ir-remote-codes-lirc.html

    Make sure you have the proper device code for your DVD.
  • Cwiber92Cwiber92 Posts: 4
    edited 2011-06-05 01:05
    Yay! Finally solved it. The only big problem was the device code. I was completely thrown off track by how the manual said, "The last five pulses contain a binary value that specifies whether the message is intended being sent to a TV, VCR, CD, DVD player, etc." The DVD device code is actually 13 bits long, 2362.

    Thanks for your help erco
  • ercoerco Posts: 20,256
    edited 2011-06-05 07:46
    XLNT! AFAIK, Parallax's readIR program ignores the device code. It assumes Sony TV (only) and only reads the key code. So in this case, you had to dig a bit deeper! Thanks for the update.
  • bill190bill190 Posts: 769
    edited 2011-06-05 10:11
    FYI - Here are many different remote code specifications...
    http://lirc.sourceforge.net/remotes/

    This explains the fields in each specification...
    http://winlirc.sourceforge.net/technicaldetails.html

    Also you can get the "IR Kit" for the Propeller microcontroller (from Propeller object exchange) and that will read remote codes. That is a handy tool to compare your IR codes with a factory remote for example.
Sign In or Register to comment.