Detect fast movement using photodiode


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    No need for analog.

    Tie the cathode of the photo diode to the PIC pin with a 10M ohm pull up. The anode of the photo diode to zero(ground). When no light is detected the PIC pin will go LOW.

    Used an IR diode for a dedicated light source.

    You will have to shield from ambient light to keep from having false readings.

    This is very similar to how a mouse works. Very fast and reliable.

    I have used this setup to detect parts moving in excess of 6 inches per second.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Aug 2008
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    That means I just connect the IR LED continously to 5V with series resistor , no need to modulate the IR Tx?

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic2008 View Post
    That means I just connect the IR LED continously to 5V with series resistor , no need to modulate the IR Tx?
    Correct.
    As long as you do a little shielding for ambient light. Basically you can look at the modulation used in IR remote control applications as a way of electronically shielding.

    Ty it. Take a photodiode, put a piece of heat shrink or something else around it so only the end can receive light. Connect it to a meter instead of the PIC, have sitting in a shadow. Hit the end of the photodiode with IR or some other light source and test.

    You can also reverse the photodiode connection and have it detect light instead of dark.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Word on the street is: Use a PIC with Schmitt trigger inputs for better results. Better results due to Schmitt triggers hysteresis's gives input port a snap action, dampens analog effect.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Joe S. View Post
    Word on the street is: Use a PIC with Schmitt trigger inputs for better results. Better results due to Schmitt triggers hysteresis's gives input port a snap action, dampens analog effect.

    Yesss Joe ...

    Much better, as comparators directly can generate the interrupt ...

    Over that I'd try to use a compensation stage to correct for ambiant light ... look at the attached scheme ... left side of Transistor T2.

    Alain
    Attached Images Attached Images  
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Along the same lines, the data sheet for the part Alain points out has on page 11 another nice way of doing it.
    http://www.google.com/url?sa=t&sourc...SILdHEv5RRcHYQ
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Along the same lines, the data sheet for the part Alain points out has on page 11 another nice way of doing it.
    http://www.google.com/url?sa=t&sourc...SILdHEv5RRcHYQ
    Hi, Dave

    Not so nice ...

    as the goal, here, is to take care the detectors are not saturated by light ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Replies: 1
    Last Post: - 7th November 2007, 21:36
  2. Possible to detect I2C Device?
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th March 2007, 11:13
  3. code conversion
    By saturnX in forum mel PIC BASIC
    Replies: 19
    Last Post: - 3rd October 2005, 18:17
  4. Detect baud rate
    By Dick M in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd July 2005, 22:10
  5. A/D on 16F877. How fast can I go?
    By atomski in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th April 2004, 07:51

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