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
- Phototransistor: emitter → GND; collector → pull‑up (typ. 1 kΩ–10 kΩ); CD40106 recommended for clean switching. [Elektroda, Rick, post #21682726]
- IR LED inside OPB705: Vf ≈ 1.7 V, limit to ≤40 mA; example resistors: 140 Ω @5 V (~30 mA), 380 Ω @12 V. [Elektroda, Rick, post #21682726]
- Working gap: keep reflective target within approx. 0.2 in for strong response. [Elektroda, David, post #21682729]
- Reflector choice: shiny CD works; note IR reflectivity may differ from visible. [Elektroda, Rick, post #21682731]
- Dark current can reach ~250 nA; add a base pull‑down to avoid false triggers. [Elektroda, David, post #21682729]
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?
- Drive the internal LED from +5 V through a calculated resistor to limit current.
- Tie emitter to ground; pull up the collector to +5 V with 1–10 kΩ.
- 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]