Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›Photoelectric Sensors

Comparison · Intermediate · 3 min read

Photoelectric Sensors

Through-Beam, Retro-Reflective, Diffuse and Background Suppression

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerSensor typesNPN, PNP and light-on/dark-onConnecting to Arduino or ESP32Installation tipsTry itCommon mistakesFAQsParts and next steps
Short answer

Photoelectric sensors detect objects with a light beam. Through-beam sensors have the longest range and most reliable detection, retro-reflective sensors use a reflector, and diffuse sensors detect light bounced back from the object. Pick the type for your range, check the NPN or PNP output and supply voltage, and use a level shifter or optocoupler when connecting to a microcontroller.

Key specs at a glance

Through-beam
Separate emitter and receiver, longest range, most robust
Retro-reflective
Emitter and receiver together, with a reflector
Diffuse
Detects light reflected from the target; short range
Background suppression
Ignores objects beyond a set distance
Supply
10 to 30 V DC typical
Output
NPN or PNP transistor, light-on or dark-on
01

Sensor types

Choose by range and mounting.

TypeRangeStrengthsLimits
Through-beamMetres to tens of metresReliable; detects any opaque objectNeeds wiring on both sides
Retro-reflectiveA few metresOne-side wiringShiny objects may fool it; use polarised types
DiffuseCentimetres to a metreSingle unit, no reflectorColour and surface affect range
Background suppressionFixed cut-off distanceIgnores the backgroundSetting needs care
Through-beam
Range:
Metres to tens of metres
Strengths:
Reliable; detects any opaque object
Limits:
Needs wiring on both sides
Retro-reflective
Range:
A few metres
Strengths:
One-side wiring
Limits:
Shiny objects may fool it; use polarised types
Diffuse
Range:
Centimetres to a metre
Strengths:
Single unit, no reflector
Limits:
Colour and surface affect range
Background suppression
Range:
Fixed cut-off distance
Strengths:
Ignores the background
Limits:
Setting needs care
02

NPN, PNP and light-on/dark-on

A PNP output switches the positive supply to the load; an NPN output switches the load to ground. Use the type your controller expects (PLCs in Europe usually use PNP). Light-on means the output turns on when the receiver sees light; dark-on when the beam is blocked. Many sensors can be set either way.

03

Connecting to Arduino or ESP32

Industrial sensors run from 10 to 30 V, so their output may exceed a microcontroller's input limit. Use an optocoupler or a voltage divider so the pin sees 3.3 or 5 V. A PNP sensor with a divider to ground works with a normal input. An NPN sensor needs a pull-up. See optocouplers and level shifting. Use a separate supply for the sensor and connect the grounds.

04

Installation tips

  • ✓Align through-beam pairs carefully and use the indicator LED to confirm.
  • ✓Keep lenses clean; dust reduces range.
  • ✓Use polarised retro-reflective sensors for shiny targets.
  • ✓Shield from ambient light and strong sun.
  • ✓Respect the IP rating in wet or dusty places.
05

Try it: Voltage divider calculator

Change the values and the diagram and results update as you type.

06

Common mistakes to avoid

  • !Feeding a 24 V output straight into a microcontroller pin.
  • !Mixing NPN and PNP inputs.
  • !Using a diffuse sensor on dark or shiny parts without testing.
  • !Misaligning a through-beam pair.
  • !Forgetting a common ground between supplies.
07

Frequently asked questions

Which type is the most reliable?

Through-beam, because the target must block the beam.

How do I tell NPN from PNP?

Check the data sheet. A PNP output is high when active; NPN is low.

Can I run it from 5 V?

Most industrial types need 10 to 30 V. Use a 12 or 24 V supply.

What is background suppression?

A diffuse sensor that ignores anything behind a set distance.

Is a photoelectric sensor the same as a photointerrupter?

Similar idea at a different scale; see photointerrupters.

Parts for this guide

  • Pepperl+Fuchs MD17/73 Thru-Beam Photoelectric Sensor, Infrared LED 950nm, 0-15m Range, 10-30V DC, IP67
    ₹10,389View
  • Banner Engineering QS18VP6LV WORLD-BEAM Retro Sensor, 6.5m Range, 10-30V DC, PNP Output, 2m Cable
    ₹2,689View
  • Omron E3Z-T61 Through-Beam Photoelectric Sensor, NPN Open-Collector, 12-24 VDC, 15 m Sensing, IP67
    ₹1,249View
  • Banner Engineering QS18VP6W WORLD-BEAM Divergent Diffuse Sensor, 100mm Range, 10-30V DC, PNP Output, 2m Cable
    ₹2,579View
Shop Photoelectric, Photodiode & Optocoupler Modules

Calculators

Voltage divider calculator

Terms in this guide

PNP and NPN outputsIndustrial sensor outputs that switch the positive supply (PNP) or ground (NPN) to the load. The type must match your input.OptocouplerA component that passes a signal through light between an LED and a phototransistor, electrically isolating two circuits.IP ratingIngress Protection rating (IEC 60529), such as IP65: the first digit rates protection against dust and solids, the second against water.Open-collectorAn output that can only pull LOW; it needs a pull-up resistor to go HIGH. Many sensor modules and the LM393 comparator work this way.PhotodiodeA diode that produces a small current in proportion to light. Faster and more linear than an LDR, used in IR receivers and light meters.

Keep learning

Component guideIntermediatePhotodiodes, Phototransistors and PhotointerruptersA photodiode turns light into a small current and is the fastest light sensor.3 min read · SensorsComponent guideIntermediateInductive and Capacitive Proximity Sensors (NPN, PNP)An inductive proximity sensor detects metal without touching it, using a magnetic field from a coil in its tip.3 min read · SensorsComponent guideBeginnerIR Obstacle Sensor ModuleAn IR obstacle sensor module shines infrared light from an LED and watches for its reflection with a photodiode; when something is within about 2 to 30 cm, its OUT pin goes LOW.3 min read · SensorsComponent guideIntermediateOptocouplersAn optocoupler contains an LED and a light-sensitive transistor in one package with no electrical connection between them.3 min read · Semiconductors & ICsHow-toIntermediate3.3 V vs 5 V LogicYou need level shifting when a 5 V device sends signals to a 3.3 V board such as an ESP32 or Raspberry Pi Pico, because 5 V on their pins can damage them.4 min read · Prototyping & Wiring

Sources

  • Banner Engineering and Omron photoelectric sensor catalogues
  • IEC 60947-5-2 proximity switch standard

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerSensor typesNPN, PNP and light-on/dark-onConnecting to Arduino or ESP32Installation tipsTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide4 items · ₹16,906

Pepperl+Fuchs MD17/73 Thru-Beam Photoelectric Sensor, Infrared LED 950nm, 0-15m Range, 10-30V DC, IP67 · Banner Engineering QS18VP6LV WORLD-BEAM Retro Sensor, 6.5m Range, 10-30V DC, PNP Output, 2m Cable · Omron E3Z-T61 Through-Beam Photoelectric Sensor, NPN Open-Collector, 12-24 VDC, 15 m Sensing, IP67 · Banner Engineering QS18VP6W WORLD-BEAM Divergent Diffuse Sensor, 100mm Range, 10-30V DC, PNP Output, 2m Cable

Ask the Community

Ask a question