Shop OBEX P1 Docs P2 Docs Learn Events
Please Help With Slotted Optical Switch For A Propeller Application (Solved) — Parallax Forums

Please Help With Slotted Optical Switch For A Propeller Application (Solved)

idbruceidbruce Posts: 6,197
edited 2019-01-24 14:43 in Propeller 1
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.

Comments

  • I would use the open-collector version with a pullup to 3.3V. Then there will be no excessive voltages going to the prop pin.
  • I would use the open-collector version with a pullup to 3.3V. Then there will be no excessive voltages going to the prop pin.

    Isn't this strictly a 4.5V or greater device?
  • kwinnkwinn Posts: 8,697
    idbruce wrote: »
    I would use the open-collector version with a pullup to 3.3V. Then there will be no excessive voltages going to the prop pin.

    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.
  • How about the qrb1114
  • DigitalBob
    How about the qrb1114

    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.
  • Thanks kwinn & rbehm
  • Kool. I just remember that QRB from the basic stamp process control book
  • idbruceidbruce Posts: 6,197
    edited 2019-01-23 16:04
    I used one to index the bending head. Providing you have a shiny accurate and thin line on a flat black shaft, encased in flat black housing, that sensor is pretty darn accurate.
  • If I go with the Buffer Open-Collector type switch, does this look right?
    477 x 267 - 17K
  • idbruce wrote: »
    If I go with the Buffer Open-Collector type switch, does this look right?

    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.
  • RaymanRayman Posts: 14,643
    edited 2019-01-24 14:25
    That looks like a lot of current through the LED...
    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...
  • 5/100 = 0.05, but IR LEDs have 1.1V or more forward voltage, (5-1.1)/100 = 39mA
  • idbruceidbruce Posts: 6,197
    edited 2019-01-24 10:58
    That looks like a lot of current through the LED...
    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...
    5/100 = 0.05, but IR LEDs have 1.1V or more forward voltage, (5-1.1)/100 = 39mA

    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?
  • RaymanRayman Posts: 14,643
    edited 2019-01-24 14:24
    Oops, I did my math wrong... Never mind...
    I shouldn't do math after bedtime...
  • Rayman

    :)

    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. :)
  • rbehm, Rayman, kwinn, & Mark_T..... Thank you!
  • kwinnkwinn Posts: 8,697
    idbruce wrote: »
    If I go with the Buffer Open-Collector type switch, does this look right?

    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.
Sign In or Register to comment.