Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
LinkBack Thread Tools Display Modes
Old 22nd April 2008, 08:38 AM   #1 (permalink)
Experienced Member
 
Join Date: Oct 2004
Location: Malaysia
Posts: 93
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Smile OPB702 Optoelectronics Reflective switch Application

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.
mesamune80 is offline   Reply With Quote
Old 22nd April 2008, 08:43 AM   #2 (permalink)
Experienced Member
 
 
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
dknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to behold
Default

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.
dknguyen is online now   Reply With Quote
Old 22nd April 2008, 08:59 AM   #3 (permalink)
Experienced Member
 
Join Date: Oct 2004
Location: Malaysia
Posts: 93
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

thanks for the information given,but if i would like to give on /off signal to my pic micro controller which i need 5v for high logic how could i achieve that?
Thanks.
mesamune80 is offline   Reply With Quote
Old 22nd April 2008, 09:02 AM   #4 (permalink)
Experienced Member
 
 
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
dknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to behold
Default

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.
dknguyen is online now   Reply With Quote
Old 22nd April 2008, 09:15 AM   #5 (permalink)
Experienced Member
 
Join Date: Oct 2004
Location: Malaysia
Posts: 93
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

i just tried to connect pin 1 via a 1k resistor then to 12v pin 2 to GND ,
and pin 4 to 12V and pin 3 to my microcontroller and i got the reading just 0.92v?
mesamune80 is offline   Reply With Quote
Old 22nd April 2008, 09:20 AM   #6 (permalink)
Experienced Member
 
 
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
dknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to behold
Default

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.
dknguyen is online now   Reply With Quote
Old 22nd April 2008, 09:49 AM   #7 (permalink)
Experienced Member
 
Join Date: Oct 2004
Location: Malaysia
Posts: 93
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

ok,mine is IR LED so my R should be R=(5-1.7)/20mA=165ohms?

,i just tried to put 165ohm but when i block the photosensor the reading could not ground to 0V? Anything wrong ?
mesamune80 is offline   Reply With Quote
Old 22nd April 2008, 09:57 AM   #8 (permalink)
Experienced Member
 
 
Join Date: May 2006
Location: Alberta, Canada
Posts: 3,776
dknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to beholddknguyen is a splendid one to behold
Default

Quote:
Originally Posted by mesamune80
ok,mine is IR LED so my R should be R=(5-1.7)/20mA=165ohms?

,i just tried to put 165ohm but when i block the photosensor the reading could not ground to 0V? Anything wrong ?
WHen the photo-detector has light on it, the transistor turns ON. THat means when there is light it pulls the pin to ground. WHen there is no light, the resistor pull the pin to 5V.
__________________
Disclaimer: Avatar for entertainment purposes only.
dknguyen is online now   Reply With Quote
Reply

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


All times are GMT. The time now is 05:04 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 (Unregistered)