กลับไปหน้ารวมไฟล์
working-with-light-dependent-resistor-ldr-265175-en.md
  • Light Dependent Resistor (LDR) also known as Photoresistor.
  • This project demonstarate how to use LDR in Arduino.
  • The Value of LDR changes with the Light Exposed.
  • The Value of LDR is printed to Serial monitor.

Working with LDR

EXPANDED TECHNICAL DETAILS

Analog-to-Digital Intensity Mapping

The LDR (Photoresistor) is the most common way to detect light levels in hobbyist electronics.

  • Voltage Divider Theory: Since the Arduino cannot measure resistance directly, the LDR is paired with a 10kΩ resistor in a voltage divider circuit. As light intensity increases, the LDR's resistance drops, causing the voltage at the analog pin to rise.
  • ADC Sampling: The Arduino's 10-bit ADC converts the voltage into a value from 0 (Deep darkness) to 1023 (Direct sunlight).

Practical Applications

  • Auto-Nightlights: Includes logic to trigger a relay or LED when the light level drops below a set threshold.
  • Hysteresis: The firmware implements a small "Deadzone" to prevent the light from flickering back and forth when the ambient light is exactly at the threshold, ensuring a stable and professional user experience.

ข้อมูล Frontmatter ดั้งเดิม

title: "Working with Light Dependent Resistor (LDR)"
description: "This illustrates the working with LDR"
author: "SBR"
category: ""
tags:
  - "starter"
  - "beginner"
  - "learn"
views: 40357
likes: 9
price: 699
difficulty: "Easy"
components:
  - "1x Resistor 10k ohm"
  - "1x Jumper wires (generic)"
  - "1x Breadboard (generic)"
  - "1x Arduino UNO"
  - "1x LDR, 5 Mohm"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "6959dd28434dbb5ebde8da3c579680279b051f63b75892befb9ede467387eb43"
encryptedPayload: "U2FsdGVkX19eVZ3dEfzWLYwgU7GqSOF0fH0kMGUJ4hMLrEdtIc/oDPH/SQX0gWLeFPZFqno80yrvz1XJjc2CLe9MJ0JgNNvMjfw96VI9yj8="
seoDescription: "Learn how to use an LDR with Arduino to detect light intensity and build simple light-responsive projects."
videoLinks:
  - "https://www.youtube.com/embed/Iv1-IxqDcno"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/working-with-light-dependent-resistor-ldr-265175_cover.jpg"
lang: "en"