5mm GL5549 LDR Photoresistor

2,00 DH 2,50 DH

Availability:

2925 in stock

SKU: 0172 Categories: ,

Description

5mm GL5549 LDR Photoresistor

This two-lead light-dependent resistor (LDR) changes resistance with illumination. It is a passive component and has no polarity. Use it with a fixed resistor in a voltage divider to obtain a voltage that an Arduino analog input can read.

🔧 Listing specifications and model discrepancy

  • Type named in the source listing: GL5549, 5 mm CdS photoresistor
  • Source-listing resistance at 10 lux: 8–20 kΩ
  • Source-listing dark resistance: up to 500 kΩ
  • Source-listing maximum voltage: 150 V DC
  • Source-listing maximum power: 90 mW
  • Operating temperature: −30 °C to +70 °C (listing)
  • Peak wavelength: 540 nm (listing)
  • Response time: 20 ms rise / 30 ms fall (listing)

Check the exact part before relying on these values: the source listing’s GL5549 resistance figures (8–20 kΩ at 10 lux and 500 kΩ dark) conflict with the manufacturer’s published GL5549 table, which specifies 100–200 kΩ at 10 lux and 10 MΩ dark resistance. The manufacturer also lists 150 V maximum voltage, 100 mW maximum power, −30 °C to +70 °C, 540 nm peak wavelength, and 20/30 ms response. The listed 8–20 kΩ value instead matches the manufacturer’s GL5528 row. Confirm the marking and actual component variant supplied.

⚙️ How it works

The CdS photoresistor’s resistance generally decreases as illumination increases. In a divider with a fixed resistor, the voltage at the junction changes with light level. The direction of the voltage change depends on which side of the divider contains the LDR.

💡 Applications

  • Automatic-lighting prototypes
  • Light-triggered alarms
  • Camera exposure experiments
  • Solar street-light prototypes
  • Photoelectric proximity and greenhouse projects
  • Ambient-light measurement

📌 Polarity and wiring

The bare LDR has two non-polarized leads. Do not connect it alone between 5 V and an Arduino analog input; use a fixed resistor to form a divider.

  • Connect one LDR lead to Arduino 5 V.
  • Connect the other LDR lead to the A0 junction and one side of a 10 kΩ resistor.
  • Connect the other end of the 10 kΩ resistor to GND.

🔌 Basic Arduino Uno example

The original code sample is preserved below. The 10 kΩ divider resistor is required for the wiring described above.

const int ldrPin = A0; // Broche analogique pour la photorésistance


void setup() {
  Serial.begin(9600); // Initialiser la communication série
}


void loop() {
  int ldrValue = analogRead(ldrPin); // Lire la valeur analogique de la photorésistance
  Serial.print("LDR value: ");
  Serial.println(ldrValue); // Afficher la valeur lue sur le moniteur série
  delay(500); // Attendre 500 ms avant de refaire une lecture
}

What the basic code does

The sketch reads the divider voltage at A0 and prints the ADC reading to the serial monitor every 500 ms.

Components for the basic example

  • Arduino Uno
  • 5 mm LDR photoresistor
  • 10 kΩ resistor
  • Connecting wires

📟 Advanced example: I2C LCD

The original LCD example is preserved below. Install a compatible LiquidCrystal_I2C library and check that its API matches the version installed in the Arduino IDE.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>


const int ldrPin = A0; // Broche analogique pour la photorésistance
LiquidCrystal_I2C lcd(0x27, 16, 2); // Adresse I2C 0x27, écran 16x2


void setup() {
  lcd.begin(); // Initialiser l'écran LCD
  lcd.backlight(); // Allumer le rétroéclairage de l'écran LCD
  Serial.begin(9600); // Initialiser la communication série
}


void loop() {
  int ldrValue = analogRead(ldrPin); // Lire la valeur analogique de la photorésistance


  lcd.setCursor(0, 0);
  lcd.print("Luminosite: ");
  lcd.print(ldrValue); // Afficher la valeur de luminosité sur l'écran LCD


  Serial.print("LDR value: ");
  Serial.println(ldrValue); // Afficher la valeur lue sur le moniteur série


  delay(500); // Attendre 500 ms avant de refaire une lecture
}

Components for the advanced example

  • Arduino Uno
  • 5 mm LDR photoresistor
  • 10 kΩ resistor
  • 1602 I2C LCD
  • Connecting wires

Connections

  • LDR/divider junction: Arduino A0
  • LCD SDA / SCL: Arduino A4 / A5 on the Uno
  • Ground: common GND

Readings depend on the exact LDR, fixed resistor, illumination, ADC reference and divider orientation. Calibrate thresholds in the finished circuit. Observe the component’s voltage and power limits; the manufacturer’s maximum component voltage is not a recommended Arduino operating voltage.

📚 Libraries

The basic divider does not require a library. The LCD example uses Wire and a compatible LiquidCrystal_I2C library, available through the Arduino IDE Library Manager.

Thank you for your loyalty!

EN