TSOP1738 versus PNA4602?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    ra68gi's Avatar
    ra68gi Guest

    Question TSOP1738 versus PNA4602?

    Hi Guys,
    Ihave been constructing IR object detector for my robotic projects. Iam using
    TSOP1738 IR receiver module to receive the reflected IR signal. Iam using a 555 IC to generate the 38Khz carrier signal. I first used the carrier signal to fire the IR LEDs directly without any modulating data. I did'nt receive any signal at the 3rd pin of the tsop1738. Later i modulated the carrier with data generated by the PIC16F84. I could immediately read the low output in pin3 of TSOP. I made a LED to light when it detected an object. It worked fine so far, but when i tried to move my hand very slowly in front of the detector it did not detect my hand. If i moved my hand fast or switch off & on the power supply it detected my hand.
    I found that the TSOP does not respond to unmodulated carrier signal,also i found it to reject signals that has a constant periodicity or frequency.
    I inserted a pause 250 in the program after every 30 counts of reading the TSOP and it worked fine.
    My questions are
    1) Is there a better way then to pause for such a long period. (my Robot is not expected to do anythig that fast so there is no problem).
    2)can any one say if PNA4602M is better choice and is deviod of the above mentioned problems.
    3)Will i also face the same problem if i tried serial ir communication(N2400 bauds) with out a pause.
    It will be great if Bruce (Proprietor Rentron) can throw some light on this.
    Thanks.
    Raghunathan.

  2. #2
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    If I remember right, the TSOP has an AGC circuit, so you can not send continuous unmodulated carrier (which you discovered by experiment - it's also buried in the data sheet somewhere).

    Never played around with the PNA4602M - but the TSOP series seems to have the lowest power consumption (or at least it did several years back) - so that might be an issue.

    Arch

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    For object detection you don't really need to send any data. Just turn ON the carrier, pause for a minimum of 10 cycles (or whatever time the data sheet indicates as minimum burst period), sample the detector output, and turn the carrier back OFF.

    Don't turn the carrier on and leave it on. The detector will assume the continuous carrier signal is noise, and ignore it.

    The TSOP brand is much better than the Panasonic, but they will both fail if you leave the carrier on for long periods, or if you do not provide a carrier burst long enough to meet the minimum burst period.

    Look at the TSOP17xx data sheet in the Suitable Data Format section.

    Turn the carrier on for a minimum of 10 cycles per burst, sample the detector output, then turn the carrier off.

    These types of IR modules are designed to ignore carrier bursts that are too short, and continuous bursts. It assumes these signals are noise.

    Also, it's important that you're using an IR LED matched for the detector. For the PNA4602M & TSOP1738 you'll want an IR LED with a wavelength of ~940nm. This is the peak spectral sensitivity region of these detectors. Using one that's way off the wavelength of your detector, you will definitely see odd results. If it works at all.

    For object detection where the LED is located in close proximity to the detector, use a large value series resistor, and cover the LED with heat shrink or some material the blocks side emissions from the LED to detector. That will help.
    Last edited by Bruce; - 13th May 2006 at 23:01.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    ra68gi's Avatar
    ra68gi Guest


    Did you find this post helpful? Yes | No

    Question

    Hello Bruce,
    The TSOP17.. data sheet places the following conditions:
    1) Carrier frequency should be close to center frequency of the bandpass(eg.38Khz).
    2) Burst length should be 10 cycles/burst or longer.
    3) After each burst which is between 10 cycles and 70 cycles a gap time of atleast 14 cycles is necessary.
    4)For each burst which is longer than 1.8ms a corresponding gap time is necessary at some time in the data stream. This gap time should have at least same length as the burst.
    5) Up to 1400 bursts per second can be received continuously.

    I wish to write here my code for the ir sensor which iam using for my robots eye.
    Iam using 3 IR leds and 3 TSOP1738 for left, center & right eye. Iam using a 555 to generate a 38Khz carrier signal which is connected to the 3 IR leds via a transistor whose base is controlled by portb.0 of pic16f84. The pin connections and code are as follows.

    'RB0 -Transistor base driving IR leds
    'RB1-LEFT TSOP 3RD PIN
    'RB2-CENTER TSOP 3RD PIN
    'RB3-RIGHT TSOP 3RD PIN
    'RB6-INDICATION LED FOR LEFT OBJECT DETECTED
    'RB5-INDICATION LED FOR CENTER OBJECT DETECTED
    'RB4-INDICATION LED FOR RIGHT OBJECT DETECTED
    'PIN1 OF TSOP-GND, PIN2-Vss

    B0 VAR BYTE
    LEFT_COUNT VAR BYTE
    CENTER_COUNT VAR BYTE
    RIGHT_COUNT VAR BYTE
    IR_LEFT VAR BYTE
    IR_RIGHT VAR BYTE
    IR_CENTER VAR BYTE

    TRISB=%00001110
    PORTB=0

    MAIN:
    PAUSE 100
    GOSUB SEE
    IF IR_LEFT=1 THEN
    PORTB.6=1
    ELSE
    PORTB.6=0
    ENDIF
    IF IR_CENTER=1 THEN
    PORTB.5=1
    ELSE
    PORTB.5=0
    ENDIF
    IF IR_RIGHT=1 THEN
    PORTB.4=1
    ELSE
    PORTB.4=0
    ENDIF

    SEE:
    LEFT_COUNT=0
    CENTER_COUNT=0
    RIGHT_COUNT=0
    IR_LEFT=0
    IR_CENTER=0
    IR_RIGHT=0

    FOR B0=0 TO 30
    PORTB.0=1 'Switch on the transistor connected to IR leds.
    PAUSEUS 290 ' burst time as specified by data sheet
    IF PORTB.1=0 THEN 'Read TOSP
    LEFT_COUNT=LEFT_COUNT+1
    ENDIF
    IF PORTB.2=0 THEN
    CENTER_COUNT=CENTER_COUNT+1
    ENDIF
    IF PORTB.3=0 THEN
    RIGHT_COUNT=RIGHT_COUNT+1
    ENDIF
    PORTB.0=0 'Swith off transistor connected to IR leds.
    PAUSEUS 390 'time gap between bursts as specified by data sheet.
    NEXT B0

    IF LEFT_COUNT>=15 THEN 'take average to get flicker free or schmitt trigger
    IR_LEFT=1 'like clean output at the output pin RB6
    ENDIF

    IF CENTER_COUNT>=15 THEN
    IR_CENTER=1
    ENDIF

    IF RIGHT_COUNT>=15 THEN
    IR_RIGHT=1
    ENDIF
    RETURN

    Bruce, when i compiled the above program it worked fine.
    But if i change the pause 100 to any where less than 50 in the code just belo
    label main the detector does not detect properly. It ony detects fast movements & not slow moving objects as i mentioned earlier.
    Can you please let me if iam violating any of the data sheet conditions of TSOP.
    Raghunathan.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Raghunathan,

    Yor code looks fine for the IR detector, but when program execution reaches
    the end of Main, it will fall-through to the lower sub routines, land on RETURN,
    and eventually crash since no valid return address has been pushed on the
    stack.

    Place a GOTO Main at the end of Main.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    ra68gi's Avatar
    ra68gi Guest


    Did you find this post helpful? Yes | No

    Default

    Bruce,
    sorry it was my mistake in copying the code here. my original code did have the goto main at the end. For the convenience of those interested in this code i shall rewrite it here.

    Please answer my question as to what happens when the pause is reduced below 50ms.

    'RB0 -Transistor base driving IR leds
    'RB1-LEFT TSOP 3RD PIN
    'RB2-CENTER TSOP 3RD PIN
    'RB3-RIGHT TSOP 3RD PIN
    'RB6-INDICATION LED FOR LEFT OBJECT DETECTED
    'RB5-INDICATION LED FOR CENTER OBJECT DETECTED
    'RB4-INDICATION LED FOR RIGHT OBJECT DETECTED
    'PIN1 OF TSOP-GND, PIN2-Vss

    B0 VAR BYTE
    LEFT_COUNT VAR BYTE
    CENTER_COUNT VAR BYTE
    RIGHT_COUNT VAR BYTE
    IR_LEFT VAR BYTE
    IR_RIGHT VAR BYTE
    IR_CENTER VAR BYTE

    TRISB=%00001110
    PORTB=0

    MAIN:
    PAUSE 100
    GOSUB SEE
    IF IR_LEFT=1 THEN
    PORTB.6=1
    ELSE
    PORTB.6=0
    ENDIF
    IF IR_CENTER=1 THEN
    PORTB.5=1
    ELSE
    PORTB.5=0
    ENDIF
    IF IR_RIGHT=1 THEN
    PORTB.4=1
    ELSE
    PORTB.4=0
    ENDIF
    GOTO MAIN

    SEE:
    LEFT_COUNT=0
    CENTER_COUNT=0
    RIGHT_COUNT=0
    IR_LEFT=0
    IR_CENTER=0
    IR_RIGHT=0

    FOR B0=0 TO 30
    PORTB.0=1 'Switch on the transistor connected to IR leds.
    PAUSEUS 290 ' burst time as specified by data sheet
    IF PORTB.1=0 THEN 'Read TOSP
    LEFT_COUNT=LEFT_COUNT+1
    ENDIF
    IF PORTB.2=0 THEN
    CENTER_COUNT=CENTER_COUNT+1
    ENDIF
    IF PORTB.3=0 THEN
    RIGHT_COUNT=RIGHT_COUNT+1
    ENDIF
    PORTB.0=0 'Swith off transistor connected to IR leds.
    PAUSEUS 390 'time gap between bursts as specified by data sheet.
    NEXT B0

    IF LEFT_COUNT>=15 THEN 'take average to get flicker free or schmitt trigger
    IR_LEFT=1 'like clean output at the output pin RB6
    ENDIF

    IF CENTER_COUNT>=15 THEN
    IR_CENTER=1
    ENDIF

    IF RIGHT_COUNT>=15 THEN
    IR_RIGHT=1
    ENDIF
    RETURN
    Raghunathan.

  7. #7
    narendra's Avatar
    narendra Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ra68gi View Post
    Hi Guys,
    Ihave been constructing IR object detector for my robotic projects. Iam using
    TSOP1738 IR receiver module to receive the reflected IR signal. Iam using a 555 IC to generate the 38Khz carrier signal. I first used the carrier signal to fire the IR LEDs directly without any modulating data. I did'nt receive any signal at the 3rd pin of the tsop1738. Later i modulated the carrier with data generated by the PIC16F84. I could immediately read the low output in pin3 of TSOP. I made a LED to light when it detected an object. It worked fine so far, but when i tried to move my hand very slowly in front of the detector it did not detect my hand. If i moved my hand fast or switch off & on the power supply it detected my hand.
    I found that the TSOP does not respond to unmodulated carrier signal,also i found it to reject signals that has a constant periodicity or frequency.
    I inserted a pause 250 in the program after every 30 counts of reading the TSOP and it worked fine.
    My questions are
    1) Is there a better way then to pause for such a long period. (my Robot is not expected to do anythig that fast so there is no problem).
    2)can any one say if PNA4602M is better choice and is deviod of the above mentioned problems.
    3)Will i also face the same problem if i tried serial ir communication(N2400 bauds) with out a pause.
    It will be great if Bruce (Proprietor Rentron) can throw some light on this.
    Thanks.
    Raghunathan.
    ....

    hi Raghunathan,
    can u please help me how u people overcome those problems mentioned above.i am also getting same problems.
    as i am working to get the same result.
    thanks.
    narendra

Similar Threads

  1. BYTE versus WORD and time
    By RussMartin in forum General
    Replies: 2
    Last Post: - 5th February 2010, 03:20
  2. PULSOUT versus toggling a pin
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th January 2010, 15:59
  3. SPI configuration PIC versus Atmel
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th July 2007, 19:17
  4. HIDMakerFS versus EasyHID
    By Demon in forum USB
    Replies: 4
    Last Post: - 15th August 2006, 08:01
  5. Hserout Versus Serout2
    By bethr in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 20th July 2006, 23:46

Members who have read this thread : 0

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