Reply
Posts: 26
Registered: ‎03-25-2014

ambient light detect by si1132

hello,

 

i use the si1132 to detect the UV index and ambient light.

my question is :after the ambient light ADC complete,what the data in the register  ALS_VIS_DATA0,ALS_VIS_DATA1  represents ?

is it the sunlight  lux?

when i read the datasheet ,like this graph :i can't understand the item :Unit  ADC counts/lux?

that means :if  i  want the lux ,i must use the data in ALS_VIS_DATA0,ALS_VIS_DATA1 multiply 0.228(assuming the same test condition)?

 

thank you for your help!

isdatasheet

Posts: 203
Registered: ‎02-04-2013

Re: ambient light detect by si1132

You've got the right idea but be careful with your units. Assuming the value in the register is n you did:

 

n Counts * 0.282 Counts/Lux = n*0.282 Counts^2 / Lux.  (counts squared per Lux is probably not what you're after  Robot Happy

 

Instead divide by Counts/Lux so Lux is in the numerator and counts cancel out. 

 

n Counts / 0.282 Counts/Lux = n/0.282 Lux. 

 

I'm not sure why they gave the value in Counts per Lux instead of Lux per count (which would be 3.56 Lux/Count). Seems like the latter would be the more common use case. 

----------------------------
Josh Norem
Senior Applications Engineer
Silicon Labs
Posts: 267
Registered: ‎03-14-2014

Re: ambient light detect by si1132

Thanks that's also helped me, maths isnt my strongest

Posts: 2
Registered: ‎09-23-2014

Re: ambient light detect by si1132

hi.. the above answer was quite helpful for my use case also...

my concern is to implement a PWM output based on the ambient light value from si1132 sensor...

once after i read the sensor registers how could i go forward to create PWM output...

any help would be highly thankful...

 

Posts: 8,068
Registered: ‎08-13-2003

Re: ambient light detect by si1132

my concern is to implement a PWM output based on the ambient light value from si1132 sensor...

once after i read the sensor registers how could i go forward to create PWM output...

any help would be highly thankful...

 

do that in the processor driving the SI1132.  if this is a problem for you, post in the 8-bit 0r 32-bit forum if you are using a SILabs micro to drive the SI1132

erik
Posts: 2
Registered: ‎09-23-2014

Re: ambient light detect by si1132

thanks erikm .

I am using an FPGA to read from the sensor..

I read this value from registers (which is a success)

But the transformation to a 16 bit PWM value is my problem now...

I dont know how to related the ADC_counts/lux to duty cycle value for a 200Hz square wave , which is controlling backlight of a small LCD.

 

Posts: 307
Registered: ‎09-22-2009

Re: ambient light detect by si1132

As erikm suggested, it's likely best if you seek help in the MCU forums for help on making the PWM square wave output.

 

When it comes to associating your ALS reading to a brightness level, I've found it's good to work on a logarithmic scale depending on how many brightness settings you have. Typically you reach the max brightness level pretty soon on the curve which is expected behavior with backlight control.

Highlighted
Posts: 1
Registered: ‎12-09-2015

Re: ambient light detect by si1132

Hello,

 

This question and the answers have helped me understand the datasheet better.

I have the question that when I am using different range and gain values (other than ALS_VIS_ADC_GAIN=0 and VIS_RANGE=0), what should be the formula used for calculating the Lux from the count value?

 

Thanks.