Shop OBEX P1 Docs P2 Docs Learn Events
Problems with IR Receptor 38KHz — Parallax Forums

Problems with IR Receptor 38KHz

Soporte IT + DSoporte IT + D Posts: 1
edited 2010-12-20 23:02 in Accessories
I have the following problem, i'm using 2 board of education both with BS2SX. In one of this board i wire a IR emitter to generate a signal of 38KHz using FREQOUT command, in the other board i wire an 38KHz IR receiver (Sharp part number of digikey 425-2528-ND). The problem is that i don't get de signal with the IR receiver.
To see if the receiver it's OK, in one board wire the IR emmiter and de IR receiver with the following programming.


' {$STAMP BS2sx}
' {$PBASIC 2.5}

INPUT 1
OUTPUT 0

inicio:

FREQOUT 0, 2, 15200

IF IN1=0 THEN

HIGH 2

ELSE

LOW 2

ENDIF

GOTO inicio

with this test I could see that the receiver worked fine, but when they use in different boards don't work.

Board Nº1 has the following programming

' {$STAMP BS2sx}
' {$PBASIC 2.5}

OUTPUT 0

inicio:

FREQOUT 0, 2, 15200

GOTO inicio

Board Nº2 has the following programming


' {$STAMP BS2sx}
' {$PBASIC 2.5}

INPUT 1

inicio:

IF IN1=0 THEN

HIGH 2

ELSE

LOW 2

ENDIF

GOTO inicio

Comments

  • dandreaedandreae Posts: 1,375
    edited 2010-12-13 10:34
    What is different with the boards? Can you attach a couple of pictures?

    Dave
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2010-12-13 11:45
    Hello!

    When working with IR emitter and receiver pairs, it's important to keep both close to one another. The beam of IR light emitted from an IR LED doesn't have a wide visibility angle, and the light is best detected when the receiver is directly in front or behind the emitter.

    You may have better results when they're wired on the same board because they're closer to one another, and when mounted on different boards, the receiver might be too far from the emitter to get a response.

    Take a look at how you had the hardware wired on the same board, and try to replicate the proximity when using two boards.

    Hope this helps,
    Jessica
  • ercoerco Posts: 20,255
    edited 2010-12-20 23:02
    Try a brief pause in your transmitter program and report back if the LED on your receiver flashes. Not all 38kHz units are continuous signal compatible. Your first program (which worked) had an IF THEN ENDIF check that took some finite time to execute and break up the IR output.

    ' {$STAMP BS2sx}
    ' {$PBASIC 2.5}

    OUTPUT 0

    inicio:

    FREQOUT 0, 2, 15200

    PAUSE 200

    GOTO inicio
Sign In or Register to comment.