Shop OBEX P1 Docs P2 Docs Learn Events
Thread porting test - nothing to see here - move right along! — Parallax Forums

Thread porting test - nothing to see here - move right along!

Ken GraceyKen Gracey Posts: 7,401
edited 2010-08-09 17:57 in General Discussion
Introduction
_
Like the blue enhanced photodiode from Applied Sensors, light emitting diodes (LEDs) also conduct current at different rates with different levels of light exposure._ Since the currents are very small for ambient light levels, it turns out that the stray capacitance in the I/O pin, the metal clip under the breadboard row, and the LED's silicon junction store enough charge to make the RCTIME measurement work._ Try the attached circuit and code under controlled conditions._
_
Circuit
_
_
Source Code
_
' TestIrLedFlameDetect.bs2

' See TestIrLedFlameDetect.PDF for Schematic.
_' This is a novel application that uses the Boe-Bot
' robot's IR LEDs to detect flame in an area devoid
' of other sources of IR such as sunlight and halogen
' lamps.
_
' {$STAMP BS2}
' {$PBASIC 2.5}
_
time VAR Word
_
DO
_ HIGH 8
_ RCTIME 8, 1, time
_ DEBUG HOME, CLREOL, ? time
_ PAUSE 100
LOOP

_
Procedure
_
Make sure to keep the blinds drawn and eliminate other sources of IR such as incandescent lights._ Try the schematic and source code that begin with the word Test first, and make sure the Debug Terminal reports significantly lower measurements when a flame is shown to the dome on the LED._ Under these conditions, I've been able to discern an open (candle) flame up to a meter away._ Mind your cathodes and anodes too._ The IR LED is connected backwards from the way we usually connect it to emit IR for object detection._
_
Your Turn
_
You can also try colored LEDs (red, green, yellow, blue) for detecting ambient light, or even use some colored LEDs_and IR LEDs to better discern flame from ambient light sources.



___________________________________

Andy Lindsay
Education Department
Parallax, Inc.

Post Edited (Andy Lindsay (Parallax)) : 1/23/2008 4:22:42 AM GMT




Image Attachment :
thumb.aspx?a=19732&ImageID=9335
Flame Detect Test Circuit.jpg
_ 16KB (image/pjpeg)This image has been viewed 2757 time(s).






File Attachment :
TestIrLedFlameDetect.pdf _ 30KB (application/pdf)This file has been downloaded 370 time(s).
File Attachment :
TestIrLedFlameDetect.bs2 _ 1KB (application/octet-stream)This file has been downloaded 357 time(s).

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-08-09 10:56
    When Ken Gracey posts, I have to look...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 11:23
    Copy the code below the dotted line and paste it into the same forum posting in the new forum, replacing the old one.
    IMPORTANT: Be sure to do a 'Preview Changes' first to make sure it's what you want!
    .........................................................................

    Introduction
    _
    Like the blue enhanced photodiode from Applied Sensors, light emitting diodes (LEDs) also conduct current at different rates with different levels of light exposure._ Since the currents are very small for ambient light levels, it turns out that the stray capacitance in the I/O pin, the metal clip under the breadboard row, and the LED's silicon junction store enough charge to make the RCTIME measurement work._ Try the attached circuit and code under controlled conditions._
    _
    Circuit
    _attach.aspx?a=19732
    _
    Source Code
    _
    ' TestIrLedFlameDetect.bs2

    ' See TestIrLedFlameDetect.PDF for Schematic.
    _' This is a novel application that uses the Boe-Bot
    ' robot's IR LEDs to detect flame in an area devoid
    ' of other sources of IR such as sunlight and halogen
    ' lamps.
    _
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    _
    time VAR Word
    _
    DO
    _ HIGH 8
    _ RCTIME 8, 1, time
    _ DEBUG HOME, CLREOL, ? time
    _ PAUSE 100
    LOOP

    _
    Procedure
    _
    Make sure to keep the blinds drawn and eliminate other sources of IR such as incandescent lights._ Try the schematic and source code that begin with the word Test first, and make sure the Debug Terminal reports significantly lower measurements when a flame is shown to the dome on the LED._ Under these conditions, I've been able to discern an open (candle) flame up to a meter away._ Mind your cathodes and anodes too._ The IR LED is connected backwards from the way we usually connect it to emit IR for object detection._
    _
    Your Turn
    _
    You can also try colored LEDs (red, green, yellow, blue) for detecting ambient light, or even use some colored LEDs_and IR LEDs to better discern flame from ambient light sources.



    ___________________________________

    Andy Lindsay
    Education Department
    Parallax, Inc.

    Post Edited (Andy Lindsay (Parallax)) : 1/23/2008 4:22:42 AM GMT




    Image Attachment :
    thumb.aspx?a=19732&ImageID=9335
    Flame Detect Test Circuit.jpg
    _ 16KB (image/pjpeg)This image has been viewed 2759 time(s).






    File Attachment :
    TestIrLedFlameDetect.pdf _ 30KB (application/pdf)This file has been downloaded 370 time(s).
    File Attachment :
    TestIrLedFlameDetect.bs2 _ 1KB (application/octet-stream)This file has been downloaded 357 time(s).
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 11:37
    Introduction
    _
    Like the blue enhanced photodiode from Applied Sensors, light emitting diodes (LEDs) also conduct current at different rates with different levels of light exposure._ Since the currents are very small for ambient light levels, it turns out that the stray capacitance in the I/O pin, the metal clip under the breadboard row, and the LED's silicon junction store enough charge to make the RCTIME measurement work._ Try the attached circuit and code under controlled conditions._
    _
    Circuit
    _attach.aspx?a=19732
    _
    Source Code
    _
    ' TestIrLedFlameDetect.bs2

    ' See TestIrLedFlameDetect.PDF for Schematic.
    _' This is a novel application that uses the Boe-Bot
    ' robot's IR LEDs to detect flame in an area devoid
    ' of other sources of IR such as sunlight and halogen
    ' lamps.

    _
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    _
    time VAR Word
    _
    DO
    _ HIGH 8
    _ RCTIME 8, 1, time
    _ DEBUG HOME, CLREOL, ? time
    _ PAUSE 100
    LOOP

    _
    Procedure
    _
    Make sure to keep the blinds drawn and eliminate other sources of IR such as incandescent lights._ Try the schematic and source code that begin with the word Test first, and make sure the Debug Terminal reports significantly lower measurements when a flame is shown to the dome on the LED._ Under these conditions, I've been able to discern an open (candle) flame up to a meter away._ Mind your cathodes and anodes too._ The IR LED is connected backwards from the way we usually connect it to emit IR for object detection._
    _
    Your Turn
    _
    You can also try colored LEDs (red, green, yellow, blue) for detecting ambient light, or even use some colored LEDs_and IR LEDs to better discern flame from ambient light sources.



    ___________________________________

    Andy Lindsay
    Education Department
    Parallax, Inc.

    Post Edited (Andy Lindsay (Parallax)) : 1/23/2008 4:22:42 AM GMT




    Image Attachment :
    thumb.aspx?a=19732&ImageID=9335
    Flame Detect Test Circuit.jpg
    _ 16KB (image/pjpeg)This image has been viewed 2760 time(s).






    File Attachment :
    TestIrLedFlameDetect.pdf _ 30KB (application/pdf)This file has been downloaded 370 time(s).
    File Attachment :
    TestIrLedFlameDetect.bs2 _ 1KB (application/octet-stream)This file has been downloaded 357 time(s).
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-09 17:57
    Introduction
    _
    Like the blue enhanced photodiode from Applied Sensors, light emitting diodes (LEDs) also conduct current at different rates with different levels of light exposure._ Since the currents are very small for ambient light levels, it turns out that the stray capacitance in the I/O pin, the metal clip under the breadboard row, and the LED's silicon junction store enough charge to make the RCTIME measurement work._ Try the attached circuit and code under controlled conditions._
    _
    Circuit
    _attach.aspx?a=19732
    _
    Source Code
    _
    ' TestIrLedFlameDetect.bs2

    ' See TestIrLedFlameDetect.PDF for Schematic.
    _' This is a novel application that uses the Boe-Bot
    ' robot's IR LEDs to detect flame in an area devoid
    ' of other sources of IR such as sunlight and halogen
    ' lamps.

    _
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    _
    time VAR Word
    _
    DO
    _ HIGH 8
    _ RCTIME 8, 1, time
    _ DEBUG HOME, CLREOL, ? time
    _ PAUSE 100
    LOOP

    _
    Procedure
    _
    Make sure to keep the blinds drawn and eliminate other sources of IR such as incandescent lights._ Try the schematic and source code that begin with the word Test first, and make sure the Debug Terminal reports significantly lower measurements when a flame is shown to the dome on the LED._ Under these conditions, I've been able to discern an open (candle) flame up to a meter away._ Mind your cathodes and anodes too._ The IR LED is connected backwards from the way we usually connect it to emit IR for object detection._
    _
    Your Turn
    _
    You can also try colored LEDs (red, green, yellow, blue) for detecting ambient light, or even use some colored LEDs_and IR LEDs to better discern flame from ambient light sources.



    ___________________________________

    Andy Lindsay
    Education Department
    Parallax, Inc.

    Post Edited (Andy Lindsay (Parallax)) : 1/23/2008 4:22:42 AM GMT




    Image Attachment :
    thumb.aspx?a=19732&ImageID=9335
    Flame Detect Test Circuit.jpg
    _ 16KB (image/pjpeg)This image has been viewed 2774 time(s).






    File Attachment :
    TestIrLedFlameDetect.pdf _ 30KB (application/pdf)This file has been downloaded 371 time(s).
    File Attachment :
    TestIrLedFlameDetect.bs2 _ 1KB (application/octet-stream)This file has been downloaded 358 time(s).
Sign In or Register to comment.