logo elektroda
logo elektroda
X
logo elektroda

OPTEK 0PB705 Optical Switch – Reflective, Phototransistor Output Reflective Sensor

162 18
ADVERTISEMENT
  • #1 21682725
    Michelle OBrien
    Anonymous  
  • ADVERTISEMENT
  • #2 21682726
    Rick Curl
    Anonymous  
  • ADVERTISEMENT
  • #3 21682727
    Aubrey Kagan
    Anonymous  
  • #4 21682728
    Michelle OBrien
    Anonymous  
  • #5 21682729
    David Ashton
    Anonymous  
  • #6 21682730
    Michelle OBrien
    Anonymous  
  • #7 21682731
    Rick Curl
    Anonymous  
  • #8 21682732
    Michelle OBrien
    Anonymous  
  • #9 21682733
    David Ashton
    Anonymous  
  • #10 21682734
    Michelle OBrien
    Anonymous  
  • ADVERTISEMENT
  • #11 21682735
    David Ashton
    Anonymous  
  • #12 21682736
    Michelle OBrien
    Anonymous  
  • #13 21682737
    David Ashton
    Anonymous  
  • #14 21682738
    Michelle OBrien
    Anonymous  
  • #15 21682739
    David Ashton
    Anonymous  
  • #16 21682740
    Michelle OBrien
    Anonymous  
  • ADVERTISEMENT
  • #17 21682741
    David Ashton
    Anonymous  
  • #18 21682742
    Michelle OBrien
    Anonymous  
  • #19 21682743
    David Ashton
    Anonymous  

Topic summary

✨ The discussion focuses on wiring and using the OPTEK OPB705 reflective optical sensor with phototransistor output. Key advice includes limiting current to the sensor's internal LED with an appropriate series resistor (e.g., ~140Ω for 5V supply) and connecting the phototransistor emitter to ground with a pull-up resistor (1kΩ to 10kΩ) on the collector to the supply voltage. The sensor's analog output can be cleaned using a Schmitt trigger or a transistor stage to drive an external test LED safely. A recommended circuit involves the OPB705 pins: LED anode and cathode with current-limiting resistor, phototransistor emitter to ground, collector connected via pull-up resistor and to the base of a BC547/BC548 transistor, which then drives the test LED with its own resistor. Reflective surfaces such as the shiny side of an old CD work well for testing. The sensor requires close proximity (about 0.2 inches) to the reflective surface. For counting applications, debouncing may not be necessary if the reflective/dark edges are sharply defined; otherwise, adding a capacitor across the transistor base resistor or using a Schmitt trigger input can help. The OPB705 output can be interfaced with counters or timers (e.g., 555 timer, 4029 counter) with appropriate signal conditioning. The discussion also touches on using two OPB705 sensors for quadrature encoding to detect motor direction and speed, with options for hardware or software decoding. Practical tips include careful mechanical setup to minimize wobble and maintain consistent sensor distance from the rotating reflective pattern.

FAQ

TL;DR: The OPB705’s IR LED is rated 40 mA; “First, it’s important to limit the current to the LED.” Wire the emitter to ground, add a pull‑up on the collector, and use a Schmitt trigger for a crisp output. [Elektroda, Rick, post #21682726]

Why it matters: This FAQ helps hobbyists quickly wire, test, and digitize the OPB705 reflective sensor for LED indicators, counters, 555 timers, and Arduino inputs.

Quick Facts

How do I wire the OPB705 to switch a separate LED on and off?

Power the OPB705’s LED through a series resistor. Tie phototransistor emitter to ground. Pull up the collector to +5 V with 1–10 kΩ. Drive your indicator LED via an NPN (e.g., BC548/BC547): collector to LED cathode, LED anode to +5 V through a resistor. Add a base resistor and a base pull‑down to keep it off in darkness. [Elektroda, David, post #21682729]

Which OPB705 pins are what, and where do they connect?

Internal IR LED: anode goes to +V through a resistor; cathode to ground. Phototransistor: emitter to ground, collector up to +5 V through a pull‑up. In the referenced build, pin 2 is ground and pin 4 is collector; measure your package to confirm. [Elektroda, David, post #21682729]

Do I really need a series resistor for the OPB705’s LED?

Yes. Size it for the current you want and stay at or below 40 mA. Example at 5 V: about 140 Ω gives ~30 mA with ~1.7 V forward drop. Skipping the resistor can destroy the sensor’s LED. “If you tried the LED without a resistor… you’re going to need a new OPB705.” [Elektroda, Aubrey, post #21682727]

What pull‑up value should I use on the phototransistor output?

Use 1 kΩ–10 kΩ to +V on the collector. The exact value sets speed and noise margin. Emitter goes to ground. You can watch the analog voltage change between collector and emitter as reflectivity changes, then square it up with a Schmitt trigger if needed. [Elektroda, Rick, post #21682726]

How do I get a clean digital edge from the OPB705?

Insert a Schmitt‑trigger stage. A CD40106 powered at 5 V or 12 V cleans the analog phototransistor output. Without it, an LED driven directly will vary in brightness instead of switching crisply. Connect the collector (with pull‑up) to a CD40106 input, then use its output to drive loads. [Elektroda, Rick, post #21682726]

What sensor‑to‑target distance should I design for?

Keep the reflective surface close—about 0.2 inches maximum for a strong signal. Start by bringing a bright, flat reflector near the window and watch the output rise. Maintain a stable mechanical gap in rotating setups to avoid missed counts. [Elektroda, David, post #21682729]

Will the shiny side of a CD work as the reflector?

Yes. “The shiny side of an old CD should work fine.” Note that IR response can differ from visible reflectivity, so verify with your materials. Users reported reliable on/off indication using CD segments as alternating reflective targets for counting. [Elektroda, Rick, post #21682731]

Can I substitute a BC547 for the suggested BC548 driver?

Yes. In this circuit the small differences are negligible. A BC547 worked identically in testing when a BC548 was unavailable. Keep the base resistor and pull‑down in place to control switching and avoid leakage turn‑on. [Elektroda, David, post #21682733]

Do I need debouncing when counting edges from the OPB705?

Often no, if your black/reflective boundaries are sharp and alignment is solid. If you see extra counts, place about 0.1 µF across the 10 kΩ base resistor to ground as a simple RC filter. Escalate to a Schmitt trigger input if needed. [Elektroda, David, post #21682735]

How do I feed the OPB705 into a 555 timer or a CD4029 counter?

Buffer and lightly filter the transistor output. Add about 10 nF from the output node to ground to tame glitches, then drive the 555 trigger or the 4029 clock. If the level or edge is marginal, use the earlier transistor buffer or a Schmitt trigger stage. [Elektroda, David, post #21682741]

Quick 3‑step: How do I bench‑test the OPB705 safely?

  1. Drive the internal LED from +5 V through a calculated resistor to limit current.
  2. Tie emitter to ground; pull up the collector to +5 V with 1–10 kΩ.
  3. Move a reflector near the window and watch the collector voltage or an LED via a transistor. [Elektroda, David, post #21682729]

Can I build a DIY quadrature encoder with two OPB705s?

Yes. Mount two sensors offset over alternating reflective/black segments. Read both channels with an MCU or use a hardware quadrature decoder. Software decoders for Arduino are common; hardware decoders output count and direction cleanly. [Elektroda, David, post #21682739]

What leakage (dark) current should I expect, and how do I handle it?

Design for up to about 250 nA dark current at the phototransistor. Add a base pull‑down (e.g., 10 kΩ) in the LED driver transistor stage to prevent unintended turn‑on in darkness. This improves idle stability. [Elektroda, David, post #21682729]

What if my counts double at transitions?

Sharpen the signal path. Ensure crisp black/reflective edges and stable gap. Add an RC (e.g., 0.1 µF with 10 kΩ) or switch to a Schmitt‑trigger input. If issues persist, increase contrast or improve mechanical wobble and alignment. [Elektroda, David, post #21682735]
ADVERTISEMENT