![]() |
![]() |
![]() |
|
|||||||
| Robotics Chat Specific to discussions about robots and the making of. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Experienced Member
|
Hi All,
Anyone of you all come across this device? http://www.optekinc.com/pdf/opb702.pdf And anyone can provide the simple connection diagram for this device? Thanks. |
|
|
|
|
|
#2 (permalink) |
|
Experienced Member
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The datsheet gives you the internal schematic- a photodiode with a photodetector. Wire up the photodiode with a current limiting resistor the same way you would wire up an LED, and simply wire up the photodetector as an open collector (with a pull-up resistor if you want to measure analog rather than digital).
__________________
Disclaimer: Avatar for entertainment purposes only. |
|
|
|
|
|
#4 (permalink) |
|
Experienced Member
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
You have the photo-diode pull the pin to ground whenver it triggers and have a pull-up resistor bring the pin high the rest of the time (like I described previously).
__________________
Disclaimer: Avatar for entertainment purposes only. |
|
|
|
|
|
#6 (permalink) |
|
Experienced Member
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Pin 3 should go to ground, while pin 4 should to your uC pin AND go to 5V through a resistor (to pull the pin high when the transistor is not on and not pulling the pin low).
Also, your 1K resistor is too small and would burn out the LED. THe datasheet says it has a 1.7V drop for 20mA if it is a IR LED and a 2.4V drop at 40mA if it is a red LED (do you know which one your device has?) You should size your resistor so that: R = (Vsupply-Vdiode)/Inominal (the extra voltage from the supply that isn't dropped across the diode must be dropped by the resistor, so if you use this extra voltage that is going to appear across your resistor in the equation in V=IR, you can figure out control how much current goes through the LED). just like when sizing a resistor for a normal LED.
__________________
Disclaimer: Avatar for entertainment purposes only. Last edited by dknguyen; 22nd April 2008 at 09:26 AM. |
|
|
|
|
|
#8 (permalink) | |
|
Experienced Member
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
__________________
Disclaimer: Avatar for entertainment purposes only. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Button Debounce Coding help | Suraj143 | Micro Controllers | 25 | 4th August 2007 09:49 AM |
| Please help me in writing code | abdosat2000 | Micro Controllers | 9 | 5th June 2007 01:41 PM |
| light operated switch application | ken_urriquia | Electronic Projects Design/Ideas/Reviews | 1 | 17th January 2007 12:04 PM |
| PIC Switch Management Techniques | Mike, K8LH | Micro Controllers | 2 | 28th September 2006 12:33 PM |
| wireless reflective switch | Scooter | Electronic Projects Design/Ideas/Reviews | 4 | 13th February 2004 01:27 AM |