Thanks for the answer but I still don’t understand why I have two different lux values with the same maximum light detection range and the same resolution ( Lux/Bit).
I will try to explicate my situation. I have vials with a liquid inside. The vials are numbered. The vial 0 is related with the brightest liquid and the vial 15 is related with the darkest liquid. The vial is posed between the led which emits light and the sensor (VEML6030). More the number of vial is low, more the lux value detected by the sensor is strong. More the number of vial is high, more the lux value detected by the sensor is low.
I made 10 acquisitions of the lux value with the function light.readLigth () of the library Sparkfun_Ambient_Ligth_Sensor_Arduino_Library v1.0.2. With the 10 acquisitions, I obtain the mean value of the lux value, by summing the 10 values and dividing by 10.
I made measurements with the vials which are below. The following measurements are the mean lux values linked with the gain and the integration time for a vial.
Integration time =Integtime
For vial 1 :
Integtime/gain 2 1 1/4 1/8
800
400
200
100 13661.4
50 4686.9 897221.5 11928.6
25 4880 4650.5 825771.68 11962.5
For vial 8 :
Integtime/gain 2 1 1/4 1/8
800
400
200
100 9779.8
50 4079.9 180811.9 8413.1
25 4206.9 4023 190770.09 8630.8
For vial 14 :
Integtime/gain 2 1 1/4 1/8
800
400
200
100 1571.1
50 1780.7 10156.6 1556.4
25 1956.8 1638.2 9860.3 1574.7
We can see that for vial 1, with the gain=1/4 and the integration time=25ms we have 825771.68 lux and with the gain=1/8 and the integration time=50ms we have 11928.6 lux.
After this measurements I have some question.
First of all why the lux value isn’t the same for the same resolution and the same maximum light detection range?
Why the lux values don’t increase or decrease in function of the gain for the same integration time ? (there is no correlation between the gain and the lux values).
Why can I read higher values than the maximum light detection range? (For example for the vial 1 with the gain=1/4 and the integration time=50ms)
Thanks for the help.