Infrared Led Object Detection


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Posts
    6

    Smile Infrared Led Object Detection

    hi all

    how we can turn on infrared led using PIC16F84A
    and ir reciver "Object Detection"

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i would suggest to use something else than a 16F84 for that. At least a 16F628.

    PWM to the LED, and read the receiver signal frequency. Later you compare the PWM frequency and the receiver frequency. If the receiver < PWM (by a safety margin), your iR beam have been broken, thus object detection.

    Sure it's possible with grandpa f84, with a bit of pain thought!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default www.rentron.com


  4. #4
    Join Date
    Jan 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    i would suggest to use something else than a
    Sure it's possible with grandpa f84, with a bit of pain thought!
    like how? to generate pulses and measure them at same time ? there is many situations when you need to do something similar(control couple H-bridges + response to RF+something else) and let not forget that usually there is no more than 2 hardware pwm in most PICs, so any program solution suggestions ?. first what came to my mind is to use 2 pics, one as many pwm's generator and other for everything else.
    Last edited by therian; - 9th March 2007 at 04:32.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    yes you could use many different PIC or mess around a timer interrupt routine.

    Depending of the wanted frequency it could work pretty well. If you're using the hardware PWM, YES you can do something else as the PWM run in background.

    A timer interrupt will be a bit more tricky to implement, but doable for sure.

    a 16F628, 16F88 are nice for that. for 2 or more PWM output (2 ccp module), you probably have to jump to a 28 pin device like 16F876 or many 18F.

    The Bruce example is pretty nice, you just need 1 PWM and few channel, then you sample one channel by one.
    Last edited by mister_e; - 9th March 2007 at 04:45.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Feb 2007
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Hey, I actually asked this question a while back but it was dealing with PWM - If you do a search on PWM my post should come up. Mister E and Skimask both helped me out on it -

    I actually got it working perfectly, I used the 16F877A and the two PWM modules on it to output a 38Khz wave on two IR leds - the IR receiver modules were made by Panasonic.

    If the IR receiver module picks up a 38Khz signal it goes low otherwise its high. So simply put them facing the same direction and if an object is there it will reflect the IR signal.

    Also I would wrap each IR led with black shrink tubing so the IR signal is more directed to a certain area.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 04:59
  3. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. can't even flash an LED
    By bruno333 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2005, 13:27

Members who have read this thread : 2

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