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. ›LDR Photoresistor and Light Sensor Modules

Component guide · Beginner · 4 min read

LDR Photoresistor and Light Sensor Modules

5mm LDR, LM393 Digital LDR Boards, Keyestudio, ACEBOTT, Grove GL5528, Crowtail GL5516 and APDS-9002, DFRobot PT550 and HS-S20 Brightness Modules

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhat the LDR photoresistor and analog light sensor modules isLDR photoresistor and analog light sensor modules pinoutWiring the LDR photoresistor and analog light sensor modulesExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

An LDR is a resistor whose value drops as light increases: about 10 to 20 kilohms in room light and over a megaohm in darkness. Put it in a voltage divider with a 10k resistor and read the voltage on an analog pin. LM393 modules add a comparator and a pot so you also get a digital dark or bright output. APDS-9002 and PT550 modules give a more linear, eye-like response.

Key specs at a glance

Element
CdS LDR (GL5516, GL5528) or phototransistor (APDS-9002, PT550)
Outputs
Analog (AO), digital (DO) on LM393 boards
Supply
3.3V to 5V
Response
LDR is slow (tens of ms); phototransistors are faster
Range
Relative brightness, not calibrated lux
Connectors
Pins, PH2.0, Grove or Crowtail

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 15 mm LDR Light Dependent Resistor₹8
  • Option 2Digital LDR Light Sensor Module for Arduino – LM393 Comparator, Adjustable Sensitivity₹31
  • Option 3LM393 Light-Dependent Resistor Sensor Module – Digital/Analog Output₹29
  • Option 4Photosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR)₹28
  • Option 5Keyestudio Photoresistor Light Dependent Resistor Sensor Module – 5V DC₹189
  • Option 6ACEBOTT QB068 Photosensitive Sensor Module – Analog Output, Easy-Plug₹175
01

What the LDR photoresistor and analog light sensor modules is

LDR photoresistor light sensor modules change resistance with light, giving an analog voltage or a digital output from a comparator, for night lights and light-following robots.

Use these for night lights, day/night switching, line-of-sight trip beams and simple brightness feedback. Read the analog value and pick a threshold for your room; for real lux values use a digital lux sensor like the BH1750.

On LM393 boards turn the pot until the DO LED changes at the light level you want. Most boards pull DO LOW when it is bright, but check yours.

02

LDR photoresistor and analog light sensor modules pinout

The pins on the LDR photoresistor and analog light sensor modules and what each one does.

PinFunction
VCC3.3-5V
GNDGround
AOAnalog output
DODigital output (LM393 boards)
PotSets the DO threshold
PinFunction
VCC
3.3-5V
GND
Ground
AO
Analog output
DO
Digital output (LM393 boards)
Pot
Sets the DO threshold
03

Wiring the LDR photoresistor and analog light sensor modules

For a bare LDR: LDR from 5V to A0, 10k resistor from A0 to GND.

LDR photoresistor and analog light sensor modules pinConnectionNote
VCC5VOr 3.3V
GNDGNDCommon
AOA0Analog read
DOD2Optional
VCC
Connection:
5V
Note:
Or 3.3V
GND
Connection:
GND
Note:
Common
AO
Connection:
A0
Note:
Analog read
DO
Connection:
D2
Note:
Optional
04

Example code

If you put the LDR on the GND side of the divider, the reading goes the other way; flip the comparison.

Night light with an LDR · Arduino C++Verify & upload in Electrolark
const int LDR = A0;
const int LED = 9;
const int DARK = 300;   // tune for your room

void setup() {
  Serial.begin(9600);
  pinMode(LED, OUTPUT);
}

void loop() {
  int light = analogRead(LDR);   // higher = brighter with LDR on the 5V side
  Serial.println(light);
  digitalWrite(LED, light < DARK ? HIGH : LOW);
  delay(200);
}
05

Setup and tuning

Wiring

VCC to 3.3 or 5 V, GND, AO to an analog pin and DO to a digital pin.

Bare LDR

use a 10 kΩ resistor in a divider and read the middle point.

Threshold

turn the trimmer to set when DO switches.

Logic

many modules go LOW in bright light and HIGH in the dark.

Response

LDRs react slowly (tens of ms), fine for light levels but not data.

06

What you need

Shop this list18 of 19 found in our store · ₹2,579

  • 5 mm LDR Light Dependent Resistor: the part this guide covers5 mm LDR Light Dependent Resistor₹8
  • Digital LDR Light Sensor Module for Arduino – LM393 Comparator, Adjustable Sensitivity: another version this guide coversDigital LDR Light Sensor Module for Arduino – LM393 Comparator, Adjustable Sensitivity₹31
  • LM393 Light-Dependent Resistor Sensor Module – Digital/Analog Output: another version this guide coversLM393 Light-Dependent Resistor Sensor Module – Digital/Analog Output₹29
  • Generic Photosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR): another version this guide coversPhotosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR)₹28
  • Keyestudio Photoresistor Light Dependent Resistor Sensor Module – 5V DC: another version this guide coversKeyestudio Photoresistor Light Dependent Resistor Sensor Module – 5V DC₹189
  • ACEBOTT QB068 Photosensitive Sensor Module – Analog Output, Easy-Plug: another version this guide coversACEBOTT QB068 Photosensitive Sensor Module – Analog Output, Easy-Plug₹175
  • DFRobot Gravity Analog Ambient Light Sensor for Arduino – PT550 Photodiode, 1-6000 Lux: another version this guide coversDFRobot Gravity Analog Ambient Light Sensor for Arduino₹347
  • Elecrow Crowtail Light Sensor 2.0 Module w/ GL5516 Photoresistor & LMV358 Chip – Analog Output: another version this guide coversElecrow Crowtail Light Sensor 2.0 Module w/ GL5516 Photoresistor & LMV358 Chip – Analog Output₹147
  • Seeed Studio Studio Grove Light Sensor v1.2 – GL5528 Phototriode, Analog Output: another version this guide coversSeeed Studio Grove Light Sensor v1.2 – GL5528 Phototriode, Analog Output₹279
  • HS-S20-L Ambient Brightness Sensor Module – PH2.0 3P Terminal: another version this guide coversHS-S20-L Ambient Brightness Sensor Module – PH2.0 3P Terminal₹59
  • HS-S20B Ambient Brightness Sensor Module – PH2.0 Terminal: another version this guide coversHS-S20B Ambient Brightness Sensor Module – PH2.0 Terminal₹68
  • HS-S20L-B Ambient Brightness Sensor – PH2.0 3P Interface: another version this guide coversHS-S20L-B Ambient Brightness Sensor – PH2.0 3P Interface₹109
  • HS-S20P Ambient Brightness Sensor Module – PH2.0 Terminal: another version this guide coversHS-S20P Ambient Brightness Sensor Module – PH2.0 Terminal₹59
  • HS-S20P-B Ambient Brightness Sensor Module – PH2.0 Terminal Wire: another version this guide coversHS-S20P-B Ambient Brightness Sensor Module – PH2.0 Terminal Wire₹79
  • Elecrow Crowtail Luminance Sensor 2.0 Module w/ APDS-9002 – 3.3V/5V: another version this guide coversElecrow Crowtail Luminance Sensor 2.0 Module w/ APDS-9002 – 3.3V/5V₹196
  • Seeed Studio Studio Grove Luminance Sensor Module – APDS-9002 Analog Output: another version this guide coversSeeed Studio Grove Luminance Sensor Module – APDS-9002 Analog Output₹660Closest match, check the specs
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
  • Solderless breadboard: to build without solderingSolderless Breadboard₹68
07

Alternatives and when to choose them

  • ✓BH1750 light sensor: real lux readings.
  • ✓TEMT6000 light sensor: phototransistor module.
  • ✓Photocell street light switches: ready mains switches.
08

Common mistakes to avoid

  • !Expecting lux values.
  • !Reading AO on a digital pin.
  • !Powering at 5 V into ESP32.
  • !Placing the LDR where the lamp shines on it.
09

Frequently asked questions

Can an LDR measure lux?

Only roughly, because LDRs vary a lot; use a BH1750 or VEML7700 when you need real lux values.

Why is the digital output reversed?

Most modules pull DO LOW in bright light and HIGH in the dark, so invert the logic in your code.

Which resistor goes with a bare LDR?

A 10 kΩ fixed resistor in a divider suits most LDRs; use a larger value for dim rooms.

Why does it react slowly?

LDRs take tens of milliseconds to settle, so they suit light levels, not fast signals.

Can I use it with ESP32?

Yes. Power the module from 3.3 V so the outputs never exceed the ESP32 pin voltage.

Parts for this guide

  • 5 mm LDR Light Dependent Resistor
    ₹8View
  • Digital LDR Light Sensor Module for Arduino – LM393 Comparator, Adjustable Sensitivity
    ₹31View
  • LM393 Light-Dependent Resistor Sensor Module – Digital/Analog Output
    ₹29View
  • Photosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR)
    ₹28View
  • Keyestudio Photoresistor Light Dependent Resistor Sensor Module – 5V DC
    ₹189View
  • ACEBOTT QB068 Photosensitive Sensor Module – Analog Output, Easy-Plug
    ₹175View
  • DFRobot Gravity Analog Ambient Light Sensor for Arduino – PT550 Photodiode, 1-6000 Lux
    ₹349View
  • Elecrow Crowtail Light Sensor 2.0 Module w/ GL5516 Photoresistor & LMV358 Chip – Analog Output
    ₹147View
  • Seeed Studio Grove Light Sensor v1.2 – GL5528 Phototriode, Analog Output
    ₹279View
  • HS-S20-L Ambient Brightness Sensor Module – PH2.0 3P Terminal
    ₹59View
  • HS-S20B Ambient Brightness Sensor Module – PH2.0 Terminal
    ₹68View
  • HS-S20L-B Ambient Brightness Sensor – PH2.0 3P Interface
    ₹109View
  • HS-S20P Ambient Brightness Sensor Module – PH2.0 Terminal
    ₹59View
  • HS-S20P-B Ambient Brightness Sensor Module – PH2.0 Terminal Wire
    ₹79View
  • Elecrow Crowtail Luminance Sensor 2.0 Module w/ APDS-9002 – 3.3V/5V
    ₹196View
  • Seeed Studio Grove Luminance Sensor Module – APDS-9002 Analog Output
    ₹660View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
  • Solderless Breadboard
    ₹68View
Shop Ambient Light, Lux & UV Sensors

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 guideBeginnerBH1750 light sensorThe BH1750 is a digital ambient light sensor that reports brightness directly in lux over I2C, from 1 to 65,535 lux.3 min read · SensorsComponent guideBeginnerTEMT6000 Ambient Light SensorThe TEMT6000 is a small phototransistor from Vishay whose light response is close to the human eye.3 min read · SensorsComponent guideBeginnerPhotocell Street Light Switches and Daylight SensorsA photocell switch turns a light on at dusk and off at dawn by itself.4 min read · Sensors

Sources

  • GL55 series LDR data
  • Seeed and DFRobot wiki pages

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

On this page
Short answerWhat the LDR photoresistor and analog light sensor modules isLDR photoresistor and analog light sensor modules pinoutWiring the LDR photoresistor and analog light sensor modulesExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon 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 guide8 items · ₹1,125

5 mm LDR Light Dependent Resistor · Photosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR) · Keyestudio Photoresistor Light Dependent Resistor Sensor Module – 5V DC · DFRobot Gravity Analog Ambient Light Sensor for Arduino · Elecrow Crowtail Light Sensor 2.0 Module w/ GL5516 Photoresistor & LMV358 Chip – Analog Output · Seeed Studio Grove Light Sensor v1.2 – GL5528 Phototriode, Analog Output · HS-S20-L Ambient Brightness Sensor Module – PH2.0 3P Terminal · HS-S20B Ambient Brightness Sensor Module – PH2.0 Terminal

Run itChange the inputs and watch the output

Bright light gives a high reading here (LDR on the top of the divider). Below 300 the LED turns on.

Night light (pin 9) OFF
Serial monitor9600 baud
578

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question