Sony IR Remote


Closed Thread
Results 1 to 40 of 41

Thread: Sony IR Remote

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    Are you sure your IR LED lights? I mean of course you cannot see it. But with camera or your mobil phone maybe you can see if the LED is lighting.

    Do not trust this very much, since my SONY DSC-W17 does not see any IR at all! So test this first with a known IR transmitter to be sure.

    Ioannis

  2. #2
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default

    I test the function of my schematic with two phones camera (Nokia & S-E) ; and with InfraX soft too. I capture the signal with TSOP 1738 on serial port, for "original" remote and for "PIC" remote...Works fine...but without results on my RC ! Thanks for support !
    Attached Images Attached Images   

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    I see a 55us diffrence in the two shots. May be this is the problem.

    Ioannis

  4. #4
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Yes, I know...

    ...and I say in previous post :
    Code:
              Cycles = 102      ' 102 * 26 = 2652 uS
              CALL Pulse38
              
              Pauseus 2580      ' accurate pause of 2580 uS ?!?
              
              Cycles = 25       ' 25 * 26 = 650 uS ; maybe must EXACTLY 660 uS - how ?!?
    Suggestions ? Thank You for attention !

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    You may very well declare a 1234usec delay but this depends on the accuracy of the System Clock (Crystal resonator or what ever).

    So you may have to trim a little the value of the pauseus to get exactly the time you want.

    In general IR systems I eel are able to tolerate such skews...

    Ioannis

  6. #6
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default YES ! Finally I have results !

    After thousands of re-writing this code, I've got finally results :
    Code:
    @ DEVICE PIC12F675, INTRC_OSC_NOCLKOUT, wdt_off, pwrt_off, mclr_off, bod_off
    DEFINE OSC 4
    
    CMCON = 7               ' Comparators disabled
    ANSEL = 0               ' A/D disabled
    
    @ #define IRTX GPIO     ; Define port to use for IR out
    @ #define PIN 1         ; Define port pin for IR out
    
    
     Puls_a         CON 112  ' 112 x 26uS = 2912 mS ( pulse with carrier ON)
    
    InterPulse  CON 2800 ' 2.80mS (delay between pulses with carrier OFF)
    
    Puls_b        CON 28   ' 28 x 26uS = 728 uS   ( pulse with carrier ON)
    
    
    
    
    
    X        VAR BYTE ' Data bit loop counter & bit index pointer
    Duration VAR BYTE ' Duration of button press
    Loops    VAR BYTE ' Loop count
    Cycles   VAR BYTE BANK0 SYSTEM' Number of carrier cycles to generate
    
    
    trisio=%11111101
    option_reg.7=0
    wpu	=%11111101
    
    but  var gpio.5
    
                            
    
        GOTO Main       ' Jump over pulse routine to Main
        
    Pulse:              ' Generate "Cycles" number of 40kHz pulses
    ASM                 ; Keep this routine in code page 1, and jump over to Main
       	BSF	IRTX,PIN		      ; 1 MAKE IR HIGH 35% Duty cycle = 9 uS
    	GOTO	$+1
    	GOTO	$+1
    	GOTO	$+1
    	GOTO	$+1
    	BCF	IRTX,PIN		      ; 1 MAKE IR LOW 17 uS
    	GOTO	$+1
    	GOTO	$+1
    	GOTO	$+1
    	GOTO	$+1
    	GOTO	$+1
    	GOTO	$+1
    	DECFSZ	Cycles,F	
    	GOTO	_Pulse	      ; 2    26 uS
    ENDASM
       return           ' Return to caller    
        
    Main:
    
    Duration = 2    ' Send it twice
    
    IF BUT=0 THEN    
    For Duration = 1 to 2
            Cycles = Synch         ' carrier on
            Call Puls_a             ' Send pulse
    
            PAUSEUS InterPulse    ' Pause (carrier off)
    
            Cycles = Logic0        ' carrier on
            Call Puls_b             ' Send pulse
    
    		Pauseus 50000
    		Pauseus 50000
    Next Duration
    
    ENDIF    
        GOTO Main                  ' Return for more
    
        END
    This is command for Volume Up only ; instead 102 cycles * 26 uS = 2650 uS, I put 112 * 26 = 2912, etc. So, the lenght of one pulse is 23.5 uS ?! Maybe with this PIC... Anyway, it's good to see that working, after hard work... Thank You all for support; every advice it's further wellcome !

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default

    It seems that the internal RC oscilator is not precise at least for the receiver you use.

    It cannot tolerate small differencies of the transmission pulse width.

    Either use a crystal oscillator or trim your delays so that they get precisely the value needed.

    Ioannis

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts