Menu

Detecting Break in Beam

Help
2006-12-28
2013-05-30
  • Nobody/Anonymous

    Hello!

    I really like GCBASIC, it is very easy for my to grasp-- I must congratulate you on that!

    I want to spice up my bedroom, when I walk in through the door I want some LEDs to turn on in a pattern and then turn off.

    I am thinking of setting up some kind of transmitter / reliever with an IR phototransistor and an IR LED. Basically, I want to detect if the beam is broken-- and if so then start flashing the LEDs.

    I am not really sure how to detect this. I am thinking of using the 16F628A or the 16F819.

    Any help would be appreciated,
    Omar

     
    • Russ Hensel

      Russ Hensel - 2007-01-03

      Basically you need to feed the voltage from the photo detector to an input port on the PIC.  So the PIC port needs to be defined as an input.  The bigger issue is probably how to right the hardware on the photo detector.  You need 2 states one with an output close to 0 and one close to 5 volts.  That suggests that the power supply can/should be the same as the PIC.  Detectors often need some amplification to switch all the way from 0 to 5 volts ( and which corresponds to blocked and not blocked will depend on  the circuit you use )  Google <photo detector circuits> and <photodetector circuits> for some options.

      Russ

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.