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. ›Photodiodes, Phototransistors and Photointerrupters

Component guide · Intermediate · 3 min read

Photodiodes, Phototransistors and Photointerrupters

How They Work and Wiring

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhich light sensorWiring each typeTypical usesTipsTry itCommon mistakesFAQsParts and next steps
Short answer

A photodiode turns light into a small current and is the fastest light sensor. A phototransistor amplifies that current, giving a bigger signal but a slower response. A photointerrupter pairs an LED and phototransistor in one housing to detect a slot being blocked, which is used for RPM and position sensing. All three need correct wiring: reverse bias for photodiodes and a pull-up for phototransistors.

Key specs at a glance

Photodiode
Fast, linear, small current; needs an amplifier
Phototransistor
Higher output, slower, easy to read with a pull-up resistor
Photointerrupter
Transmissive (slot) or reflective type, digital or transistor output
Wavelength
Silicon peaks near 850 to 950 nm (near infrared)
Supply
3.3 or 5 V for most
Vs LDR
Much faster than an LDR, less sensitive to ageing
01

Which light sensor

Choose by speed and signal level.

SensorSpeedOutputUse for
LDRSlow (tens of ms)ResistanceDay and night switches; see LDR sensor
PhotodiodeVery fastMicroampsOptical communication, precise light measurement
PhototransistorFast enough for kHzLarger currentIR detection, object sensing
PhotointerrupterFastDigital or transistorRPM, end stops, encoders
Ambient light ICSlowDigital lux valueSee ambient light sensors
LDR
Speed:
Slow (tens of ms)
Output:
Resistance
Use for:
Day and night switches; see LDR sensor
Photodiode
Speed:
Very fast
Output:
Microamps
Use for:
Optical communication, precise light measurement
Phototransistor
Speed:
Fast enough for kHz
Output:
Larger current
Use for:
IR detection, object sensing
Photointerrupter
Speed:
Fast
Output:
Digital or transistor
Use for:
RPM, end stops, encoders
Ambient light IC
Speed:
Slow
Output:
Digital lux value
Use for:
See ambient light sensors
02

Wiring each type

Phototransistor

connect the collector to the supply through a 10 kΩ resistor and read the voltage at the collector; the emitter goes to ground. More light pulls the output lower. Adjust the resistor to change sensitivity.

Photodiode

reverse-bias it and use a transimpedance amplifier: the photodiode current flows through the op-amp feedback resistor and gives a voltage. A 1 MΩ feedback resistor gives about 1 V per µA. See op-amps.

Photointerrupter

drive the LED through a resistor (about 220 Ω at 5 V) and read the transistor output with a pull-up resistor. The output goes low when the slot is blocked.

03

Typical uses

Counting and RPM

place a slotted wheel in the gap of a photointerrupter and count pulses.

Line and edge detection

reflective sensors detect black and white lines under a robot.

IR communication

a photodiode plus filter receives remote control signals (IR receivers).

Light meters

a calibrated photodiode and amplifier measure relative light level.

04

Tips

Shield the sensor from stray light with a tube or black paint. Use a filter that passes infrared if you want to ignore visible light. Keep the leads short for photodiodes to reduce noise, and use a stable reference voltage for analog readings. Remember that sunlight is a strong source of infrared and can saturate IR sensors outdoors.

05

Try it: Opamp gain calculator

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

06

Common mistakes to avoid

  • !Reading a photodiode directly with an ADC pin and getting nothing.
  • !Wiring a photodiode forward biased.
  • !Using no pull-up on an open-collector photointerrupter.
  • !Mounting a slot sensor without enough alignment.
  • !Using IR sensors in direct sunlight.
07

Frequently asked questions

Photodiode or phototransistor?

Photodiodes are faster and more linear, but need an amplifier. Phototransistors give a larger signal and are easier.

Is a photointerrupter the same as an optocoupler?

Similar internal parts, but a photointerrupter has a gap for an object to pass through.

Can I use an LED as a sensor?

Yes, an LED produces a small current under light, but a real photodiode is far better.

What resistor for a phototransistor?

Start with 10 kΩ and adjust for the light level you need.

Do I need a lens?

For long distances, yes. A lens or tube narrows the view and increases sensitivity.

Parts for this guide

  • SparkFun BOB-09322 Photo Interrupter Sensor Breakout – GP1A57HRJ00F
    ₹267View
  • Sharp Microelectronics GP2S60 Reflective Optical Sensor, 0.5mm Detection Range, Phototransistor Output, Compact SMT
    ₹61View
  • Sharp Microelectronics GP1S53VJ000F Transmissive Photointerrupter Sensor, 5mm Gap, 0.5mm Slit, Phototransistor Output
    ₹209View
  • SparkFun TEMT6000 Ambient Light Sensor Breakout – SMD Phototransistor
    ₹489View
Shop Photoelectric, Photodiode & Optocoupler Modules

Calculators

Opamp gain calculatorVoltage divider calculator

Terms in this guide

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.Transimpedance amplifierAn op-amp circuit that turns the tiny current from a photodiode into a usable voltage.OptocouplerA component that passes a signal through light between an LED and a phototransistor, electrically isolating two circuits.Pull-up resistorA resistor from a signal line to the supply that keeps the line high when nothing pulls it low.InfraredLight just beyond red that people cannot see, used by IR obstacle sensors, remote controls and line-following sensors.Op-ampOperational amplifier: an IC with two inputs and one output that amplifies the difference between them, used for sensor amplifiers, filters, buffers and comparators.

Projects that use it

Put this into practice: 34 step-by-step builds in our project library use parts from this guide.

Beginner · 45 minutesAutomatic dusk-to-dawn lightView projectBeginner · 1–2 hoursWi-Fi dusk light with manual overrideView projectBeginner · 45 minutesPico fading night light (MicroPython)View project
Browse all 34 projects

Keep learning

Component guideBeginnerLDR Light SensorsAn LDR (light-dependent resistor or photoresistor) has high resistance in the dark, about 1 MΩ, and low resistance in bright light, under 1 kΩ.3 min read · SensorsComparisonBeginnerAmbient Light SensorsAmbient light sensors such as the BH1750, TSL2591, VEML7700 and OPT3001 measure brightness in lux over I2C, so they give accurate readings that do not depend on how you wire a resistor.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 & ICsComponent guideIntermediateOp-Amps for BeginnersAn operational amplifier (op-amp) amplifies the voltage difference between its two inputs by a huge amount; feedback resistors turn that into a precise, useful gain.4 min read · Semiconductors & ICsComponent 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 · SensorsHow-toIntermediateLine Follower RobotA line follower uses a row of infrared reflective sensors (TCRT5000 type) under the robot to see a black line on a white floor, and steers two DC motors to keep the line centred.3 min read · Robotics

Sources

  • Sharp and Vishay photointerrupter data sheets
  • Texas Instruments application notes on photodiode amplifiers

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

On this page
Short answerWhich light sensorWiring each typeTypical usesTipsTry 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 · ₹1,026

SparkFun BOB-09322 Photo Interrupter Sensor Breakout – GP1A57HRJ00F · Sharp Microelectronics GP2S60 Reflective Optical Sensor, 0.5mm Detection Range, Phototransistor Output, Compact SMT · Sharp Microelectronics GP1S53VJ000F Transmissive Photointerrupter Sensor, 5mm Gap, 0.5mm Slit, Phototransistor Output · SparkFun TEMT6000 Ambient Light Sensor Breakout – SMD Phototransistor

Ask the Community

Ask a question