Part Recommendation Request: 5V NPN Through-Beam Photoelectric Sensor & Optocoupler Module

I am looking for recommendations for specific components for a rapid item-detection system (interfaced with a Raspberry Pi 5). Could you please suggest suitable part numbers currently in stock for the following two items?

Item 1: Through-Beam Photoelectric Sensor Kit (Emitter + Receiver)

  • Sensor Type: Through-beam (Pair set including transmitter and receiver)

  • Supply Voltage : DC 5V (Must support 5V operation directly)

  • Output Type: NPN, Normally Open (NO)

  • Sensing Distance: 1m to 2m

  • Response Time: ≤2ms (High-speed detection required)

  • Wiring Configuration: Standard 3-wire system

    • Brown: Vcc (+5V)

    • Blue: GND

    • Black: Output / Signal (NPN)

Item 2: Optocoupler Isolation / Level Shifter Module (1-Channel)

  • Channels: 1-Channel

  • Input Voltage : DC 5V (Accepting 5V NPN signal from sensor)

  • Output Voltage: 3.3V Logic compatible (To safely interface with Raspberry Pi 5 GPIO pins)

  • Function: Signal optical isolation and level shifting (5V->3.3V)

Could you please recommend available DigiKey part numbers that match these specifications? If exact modular boards are not available for Item 2, standalone optocoupler IC solutions with basic reference circuits would also be appreciated.

Thank you for your time and assistance.

Best regards,

Hello jiangjyiw,
Welcome to the TechForum, the information you have cannot be narrowed down on our website you would need to search the datasheets to narrow to part level.

Hello @jiangjyiw,

Welcome to the TechForum.

Based on the project description. I recommend:

If this project is used for a production environment, I’d recommend you shift to a retroreflective sensor from the 24 VDC ecosystem. The industrial automation components are like industrial building block. There is more variety, the blocks work together as a system, and the individual components are electrically hardened.

Consider devices such as this Raspberry Pi-based PLC.

Sincerely,

APDahlen

@APDahlen Thank you so much for your recommendation. I will choose SEN0523 DFRobot.

I am considering two implementation options and would appreciate your technical advice and part recommendations.

Option A: Optocoupler Isolation Module

I intend to use an optocoupler/optoisolator module for signal isolation and level shifting to protect the Raspberry Pi 5 GPIO pins:

SEN0523 Signal Line (5V)\] ➔ \[5V-to-3.3V Optocoupler Module (IN)\] │ \[Raspberry Pi 5 GPIO 17 (3.3V)\] ⬅️ \[Optocoupler Module (OUT)

Requirements:

  • Input Signal: 5V logic from SEN0523

  • Output Signal: 3.3V logic compatible with Raspberry Pi 5 GPIO 17

  • Function: Optical isolation and 5V > 3.3V logic level shifting.

Inquiry: Could you recommend suitable in-stock optocoupler modules or level-shifting IC boards that support this configuration?

Option B: Resistor Voltage Divider

As a backup budget solution, I plan to drop the 5V signal down to approximately 3.3V using a standard resistor divider:

  1. Configuration:
    • A 10 KΩ resistor in series between the SEN0523 signal output and GPIO 17.

    • A 20 KΩ pull-down resistor connected between GPIO 17 and GND.

  2. Inquiry: Could you recommend suitable surface-mount (SMD) or through-hole (THT) precision resistors (e.g., 1% tolerance) for this application?

Could you please provide recommended DigiKey Part Numbers for both options, or let me know if Option A is strongly advised for protecting the Pi 5’s main chip?

Thank you for your guidance and assistance.

Best regards,

Tony

Sure thing, @jiangjyiw,

The 12009 SparkFun Electronics is popular level shifter.

As for the resistor, please search using DigiKey’s selection tools. It is a skillset that you will need going forward.

Let us know if you get stuck.

Sincerely,

Aaron

Hi jiangjyiw,

If you prefer the extra protection of opto-isolation in module form rather than just a level shifter, then the following module from Sparkfun might be worth a look:

1568-09118-ND Dual output optoisolator with integrated current-limiting input resistors and output inversion to replicate input polarity.

Schematic of 1568-09118-ND:

@APDahlen Thank you very much for your prompt response and detailed recommendations. The part numbers you provided perfectly match the specifications required for our project (SEN0523 DFRobot & 12009 SparkFun Electronics).

I will proceed with purchasing these components. Thank you again for your professional technical support and excellent assistance.

Best regards,

Tony