Light sensor


Use this online light sensor to measure and plot illuminance in units of lux.

Physics Light Radiation




Introductory information
Please note, this demo uses cutting edge browser technology - the Generic Sensor API - which needs to be manually switched on before using for the first time. To enable the ambient light sensor, in Chrome, type chrome://flags in your address bar and enable the "Generic Sensor Extra Classes" flag, as demonstrated in the video below.

You may notice that the lux values displayed by the tool are always given to the nearest 50. This is an intentional restriction implemented by browser vendors and the reasons why that is necessary can be found on the W3.org website.


On a bright sunny day, think how a device such as a tablet or smartphone will commonly automatically adjust the screen's brightness to its maximum value to help you see the screen in the bright light.

And conversely, when using a device at night in a dark room, the device's display automatically dims, otherwise it would be too dazzling to the user's eyes.

How does the device "know" how to do this? The answer lies in a component called an ambient light sensor. This device measures the amount of light (in a unit called lux) hitting the detector and when that value is high, the device increases the brightness of the screen accordingly, and similarly when the value is low, it lowers the brightness of the screen.

Common lux values

Illuminance in lux Scenario
0.00005 Starlight
0.0001 Overcast, moonless night sky
0.01 Quarter moon
0.1 Full moon on a clear night
10 Candle at a distance of 30cm
50 Living room in a house
150 Typical office environment
400 Sunrise or sunset
1,000 Shopping mall
100,000 Maximum sunlight at noon

The tool above allows you to view the level of lux being recorded at any given moment, indicated by the large "Current illuminance" display. Additionally, these values can be plotted on the chart. If you would like to plot the value once every second, you should set the samples per second value to 1.

Suggested ideas for investigation

Try shining a torch into your sensor. Does it make a difference how close to the sensor you get? Do different torches give different values?

Take your laptop outside on a bright sunny day. Is it different depending on the time of day?

Do different devices give different readings even if the conditions are the same?


List of Lux values referenced from: Axis, C., Nilsson, F. (2008). Intelligent Network Video: Understanding Modern Video Surveillance Systems (page 56). United States: Taylor & Francis.