Shop OBEX P1 Docs P2 Docs Learn Events
Longer(er) Distance Infrared Transmission — Parallax Forums

Longer(er) Distance Infrared Transmission

SRLMSRLM Posts: 5,045
edited 2009-04-02 02:13 in General Discussion
I've been working towards building a simple beacon to track object, and decided to use an infrared LED (here or here, I used them alternately) on the beacon and matching receiver (here) on the mobile module.

Well, I got to do some testing tonight, and it didn't go as well as I hoped. I used two different LEDs that were suitable (correct wavelength) with similar results. I could only get reliable data out to about three feet, then it started to fall apart until at about 16 feet nothing more was sensed. I think (big step here) that the problem is weak LEDs. I viewed the LED through my digital camera, and I could barely make it out at about 5 feet, so it's unlikely that the IR detector could see it from there either. Granted, I was running at about 60 ma (out of 100 ma max), but I had hoped for better results of 20 feet at least.

The circuit that I used was a Darlington array (at 5v) pulsed by the Propeller. The Led has two 20 ohm resistors in series.

I'll probably give these high power LEDs a shot since they should be about 5 times as powerful if I run them at full tilt (300 ma).

I also tried shielding the receiver with a long tube, but it didn't seem to help (trouble aiming and holding probably contributed some).

So, the other option is a laser. I was thinking about getting the appropriate laser with a lens to make the dot a bar, but I'm wary of that option due to the danger (no blink reflex for IR). But with high power LEDs is it any different? I don't know...

Any suggestions?

Post Edited (SRLM) : 3/31/2009 5:41:00 AM GMT

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-31 05:37
    You should have gotten well over three feet. The detector you've cited operates at 56KHz. What did you modulate your IREDs with? What was your data rate?

    -Phil
  • SRLMSRLM Posts: 5,045
    edited 2009-03-31 05:45
    The Spin transmitter program
    CON
        _clkmode = xtal1 + pll16x
        _xinfreq = 5_000_000
    OBJ
        BS2 : "BS2_Functions"    ' Create BS2 Object
    PUB Start 
        BS2.start (31,30)        ' Initialize BS2 Object timing, Rx and Tx pins for DEBUG
        repeat
          BS2.FREQOUT(23, 1000, 56000) 'Freqout one second at 56 kHz
          waitcnt(clkfreq + cnt) 'Wait one second
    
    



    And the BS2 receiver program
    '   {$STAMP BS2}
    '   {$PBASIC 2.5}
    
    TX              PIN     12               ' serial output to LCD
    T9600           CON     84
    LcdBaud         CON     T9600
    LcdCls          CON     $0C             ' clear LCD (use PAUSE 5 after)
    LcdBLon         CON     $11             ' backlight on
    LcdOn1          CON     $16             ' LCD on; cursor off, blink off
    LcdLine1        CON     $80             ' move to line 1, column 0
    LcdLine2        CON     $94             ' move to line 2, column 0
    
    hightime VAR Word
    lowtime VAR Word
    
    HIGH TX                               ' setup serial output pin
    DIR7 = 0
    PAUSE 100                             ' allow LCD to initialize
    
    'Prepare LCD (clear it, backlight, turn off cursor)
    SEROUT TX, LcdBaud, [noparse][[/noparse]LcdCls]
    PAUSE 10
    SEROUT TX, LcdBaud, [noparse][[/noparse]LcdBLon]
    SEROUT TX, LcdBaud, [noparse][[/noparse]LcdOn1]
    
    
    DO
     'Find high time
      DO WHILE IN7 = 1 AND hightime < 1500
        hightime = hightime + 1
      LOOP
      'Display high time
      SEROUT TX, LcdBaud, [noparse][[/noparse]LcdLine1,"H:", DEC5 hightime]
      hightime = 0
      'Find low time
      DO WHILE IN7 = 0 AND lowtime < 1500
        lowtime = lowtime + 1
      LOOP
      'Display low time
      SEROUT TX, LcdBaud, [noparse][[/noparse]LcdLine2,"L:", DEC5 lowtime]
      lowtime = 0
    LOOP
    
    



    Basically, what my program does is to just 'toggle' the IR receiver alternately low and high. I know success by when the high and low times on my LCD match up, and failure when they are different. I've pulled out my Parallax oscilloscope and tested to make sure that I am indeed transmitting at 56kHz, and I am. One oddity that I noticed is that the oscilloscope software shows a peak to peak hight of <150 mV. It's odd, but I don't know what it means. I can't use a multimeter to check, since the meter is to slow (with the changes).

    I just tried transmitting with the second led (LED55CF) that says its rated for 10A pulsed. When I tried (with about 500 mA) by removing my resistors, it got really hot. I'm afraid that my lack of practical circuit knowledge is showing through...

    Post Edited (SRLM) : 3/31/2009 6:12:00 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-31 06:30
    The problem is likely your Darlington driver. Darlingtons switch too slowly to be used in this fashion. In your case, it's probably spending most of its time in its linear region, which would account for both the 150mV P-P readng and the overheating. Use a MOSFET instead. For interfacing with a Propeller, an IRF3708 should work well.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 3/31/2009 7:09:59 AM GMT
  • SRLMSRLM Posts: 5,045
    edited 2009-03-31 14:39
    Would a circuit like this work? I'd replace the switch with the Propeller output and a series resistor (1K or so), and remove the R1 pulldown.

    U-fig10.jpg
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-31 15:35
    That should work. Do not remove the pulldown, though. It will keep the transistor "off" during reset. I'd use a lower value for it, though — maybe 100K. Also, select a value for R2 that will yield the current you need for the IRED. (You can pretty much ignore VDS in your calculation, since it will be so low.)

    -Phil

    Addedum: The transistor I recommended has a fairly high gate capacitance (2.4nF). You may want to add a small series resistor between the Prop and the gate to limit the transient pin current. 75 ohms will help and will still gve you a sub-microsecond rise time.

    Post Edited (Phil Pilgrim (PhiPi)) : 3/31/2009 3:56:20 PM GMT
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2009-04-02 02:13
    What's the distance from the object, how fast is it moving and the desired accuracy and frequency of tracking?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent!
    Send $1 to CannibalRobotics.com.
Sign In or Register to comment.