Understanding and Interpreting Lux Values
The primary sensor data type for ambient light sensors is illuminance in lux (lumens per square meter). The principles outlined in this topic are based on taking lux values as input and reacting to that data in a program.
Lux readings are directly proportional to the energy per square meter that is absorbed per second. Human perception of light levels is not so straightforward. Human perception of light is complicated because our eyes are constantly adjusting and other biological processes are affecting our perception. However, we can think of this perception from a simplified perspective by creating several ranges of interest with known upper and lower thresholds.
The following example data set represents rough thresholds for common lighting conditions, and the corresponding lighting step. Here, each lighting step represents a change in lighting environment.
|Lighting condition||From (lux)||To (lux)||Mean value (lux)||Lighting step|
If we visualize this data by using the mean values from this table, we see that the lux-to-lighting-step relationship is not linear, as show in the following graph.
However, if we view this data by using a logarithmic scale on the x-axis, we can see that a roughly linear relationship emerges.
Based on the sample data set for ambient light sensors previously provided, you could arrive at the following equation to map lux values to human perception. In this example, the expected values range from 0 lux to 1,000,000 lux.
This equation results in values that vary in a roughly linear fashion between 0.0 and 1.0. This result indicates how human-perceived lighting changed based on the example data set that was shown previously.