Please Help With Slotted Optical Switch For A Propeller Application (Solved)
idbruce
Posts: 6,197
I need to order and hookup a slotted optical switch to a Propeller, but before I place my order, I would like some feedback as to my selection, and any advice on properly hooking this switch to a Propeller.
First off, please allow me to describe the scenario. My project is utilizing two different size enclosures, the bottom enclosure houses the electronics, as well as having a machine attached to it, and the top enclosure simply acts as a lid and shield against rays from a UV laser. I want to put a slotted optical switch on the bottom enclosure and a blocking vane on the top enclosure, so that when the lid is lifted, output to the UV laser is disabled.
Out of the wide array of choices, I have narrowed my selection down to this part: OPB980T55Z Datasheet: https://ttelectronics.com/TTElectronics/media/ProductFiles/Optoelectronics/Datasheets/OPB960-990.pdf
Unless I am mistaken, it seems to me that the selection process has become more difficult, because I don't remember there being four choices in the past. These four choices are, as numbered in the datasheet: 0) Buffer Totem-Pole 1) Buffer Open-Collector 2) Inverter Totem-Pole 3) Inverter Open-Collector.
The device I selected, is the 0) Buffer Totem-Pole type. So question number one is, can I accomplish the desired task with the OPB980T55Z device?
Providing that this device will work and considering this device has a minimum supply voltage of 4.5V, my intent is to simply supply it with a regulated 5V, which I would then assume that I would need a 1K ~ 10K series resistor on the output of this device and going to a Propeller pin. I am fairly certain that this assumption is correct, if my memory serves me correctly.
Furthermore, I believe, if I am interpreting everything correctly, although not 100% certain, that I will also need a 100 Ohm series resistor going to the anode of this device.
Any guidance on this issue will be sincerely appreciated.
First off, please allow me to describe the scenario. My project is utilizing two different size enclosures, the bottom enclosure houses the electronics, as well as having a machine attached to it, and the top enclosure simply acts as a lid and shield against rays from a UV laser. I want to put a slotted optical switch on the bottom enclosure and a blocking vane on the top enclosure, so that when the lid is lifted, output to the UV laser is disabled.
Out of the wide array of choices, I have narrowed my selection down to this part: OPB980T55Z Datasheet: https://ttelectronics.com/TTElectronics/media/ProductFiles/Optoelectronics/Datasheets/OPB960-990.pdf
Unless I am mistaken, it seems to me that the selection process has become more difficult, because I don't remember there being four choices in the past. These four choices are, as numbered in the datasheet: 0) Buffer Totem-Pole 1) Buffer Open-Collector 2) Inverter Totem-Pole 3) Inverter Open-Collector.
The device I selected, is the 0) Buffer Totem-Pole type. So question number one is, can I accomplish the desired task with the OPB980T55Z device?
Providing that this device will work and considering this device has a minimum supply voltage of 4.5V, my intent is to simply supply it with a regulated 5V, which I would then assume that I would need a 1K ~ 10K series resistor on the output of this device and going to a Propeller pin. I am fairly certain that this assumption is correct, if my memory serves me correctly.
Furthermore, I believe, if I am interpreting everything correctly, although not 100% certain, that I will also need a 100 Ohm series resistor going to the anode of this device.
Any guidance on this issue will be sincerely appreciated.
Comments
Isn't this strictly a 4.5V or greater device?
The device needs 4.5V minimum to operate but the collector of the output transistor can be pulled up to 3.3V as long as the 5V and 3.3V have a common ground.
I used the QRB1114 Reflective Object Sensor on my Spring Bender CNC several years ago and it works quite well, but I am choosing the Optek OPB980 Series of slotted optical switch this time around, because I believe the "T" configuration will be easier to mount and adjust for this particular application.
Looks perfect to me. You might play a bit with 1k pullup, depending on the speed and noise immunity you want to achieve. Higher values will make it slower, but draw less power.
5V applied to 100 Ohm in series with LED...
Looks like 300 mA to me based on datasheet in first post, much higher than the rated 40 mA...
Okay.... Now I am getting confused
As mentioned, VCC will be 5 volts...
If I interpret the datasheet correctly... Vf = 1.7 (max) and If = 0.040....
Using Formula: R = (Vs - Vf) / If
So.... 82.5 = (5.0 - 1.7) / 0.04
If I round up to the nearest common resistor, I should have a 100 Ohm resistor. Am I misinterpreting something?
I shouldn't do math after bedtime...
I read a lot of your stuff, so I know you know what you are doing. We all have our moments Just want to make sure that I get it right the first time.
The circuit is fine, except for the 100 ohm resistor on the IR led. Typical forward voltage drop is about 1.2V and current is about 10mA so the resistor should be about 3.8V / 0.01mA = 380 ohms. I would suggest 390 ohms if low power is a priority, otherwise 330 ohms.