Quantcast
Channel: Davide Gironi blog
Viewing all articles
Browse latest Browse all 196

Measure light (lux) with LDR on AVR Atmega using LDR library 01

$
0
0
A photoresistor or light dependent resistor (LDR) is a resistor whose resistance decreases with increasing incident light intensity; in other words, it exhibits photoconductivity.
The lux (symbol: lx) is the SI unit of illuminance and luminous emittance, measuring luminous flux per unit area.


This library implements a way to estimate lux given a LDR resistance value read from an ADC input pin of an AVR Atmega.
The estimation is based on this formula:
lux = A*((R/B)^C)
where R is the LDR resistance.
An Excel spreadsheet is provided to help the estimation of A, B and C values. You have to read lux values using a calibrated luxmeter, and the R values of your LDR, write it down on the Excel sheet, and estimate A, B and C, power regression can help you estimating values.

Code

Notes
  • read risk disclaimer
  • excuse my bad english

Viewing all articles
Browse latest Browse all 196

Trending Articles