Reply
Posts: 4
Registered: ‎04-07-2017

SI1133 UV-Index Calculation and GIT HUB sample

Hello,

 

I'm refering to this git hub driver for Si1133 : https://siliconlabs.github.io/Gecko_SDK_Doc/efm32pg12/html/si1133_8c_source.html

 

And this design guide : 

https://www.silabs.com/documents/public/application-notes/AN968-Si1133-UV-Index-Sensor-Electrical-an...

 

I don't understand the relationship with the SI1133_calcEvalPoly() functions using these coefs : 

 

63 static SI1133_Coeff_TypeDef uk[2] = {
64 
65  { 1281, 30902 },
66  { -638, 46301 }
68 };
 
 
And this equation : 
 
UV index = 0.0187(0.00391 Input2 + Input)
 
And more precisely, how to change these coefficients for the different "assembly" mentioned in the Application Note (AN968) ?
 
Can someone help or send me a link to a more precise documentation ?
 
Thanks
Posts: 97
Registered: ‎04-09-2015

Re: SI1133 UV-Index Calculation and GIT HUB sample

Hi,

 

The example code provides a fixed point calculation for UV index. If your platform supports floating point calculation, you can simply use the equation in the application note to calculate UV index.

 

In terms of UV calibration, it's recommended to take multiple measurements at different UV index levels after the optical design is finalized in your system. You should log the UV raw data from the sensor as well as the UV index reading from a UV meter. Then fit the result to a second order polynomial equation like the one in the application note. If you want to save time and don't care too much about the accuracy, you can also use the default equation, but apply a scale factor to adjust the result.

 

Regards,

Tony

Posts: 4
Registered: ‎04-07-2017

Re: SI1133 UV-Index Calculation and GIT HUB sample

Thanks Tony for your quick answer !

 

I follow your suggest an used floating point, but cannot figure out what's the equivalent 'm' and 'k' to the code sample (poly coefs). See measures at the end, even the sign of the poly seems to indicate that this is not equivalent to 'm=0.00391'.

 

I understand the 'k' factor which has to be calibrated with the final setup which may be different from the "theorical setup". But what about 'm' factor ?

 

I saw in this post (https://community.silabs.com/t5/Optical-RH-Temp-Sensor/SI1133-UV-Index-calculation-with-multiple-sam...) that you suggested another 'm' value. How to define this value, was not clear for me on attached post ?

 

Note that I'm using a setup close to "7. Good Performance, Less Compact Assembly", with DECIM_RATE=3, ADCMUX=24, HSIG=0, SW_GAIN=7, HW_GAIN=2, 24BIT_OUT and POSTSHIFT=0.

 

Thanks for your help !

Thierry

 

Here's some measurement I made on ambient light (UVi with 'm' and 'k' and poly with calcEvalPoly)

 

m = 0.00391

k = 0.0104

 

poly coefs :

65  { 1281, 30902 },
66  { -638, 46301 }
 
 

UV : DEBUG raw -49, UVi -0.411966, poly 0.404541
UV : DEBUG raw -12, UVi -0.118944, poly 0.093994
UV : DEBUG raw 65, UVi 0.847805, poly 0.525146
UV : DEBUG raw 4, UVi 0.042251, poly 0.031250
UV : DEBUG raw 14, UVi 0.153570, poly 0.109131
UV : DEBUG raw 40, UVi 0.481062, poly 0.325928
UV : DEBUG raw -3, UVi -0.030834, poly 0.023682

Highlighted
Posts: 97
Registered: ‎04-09-2015

Re: SI1133 UV-Index Calculation and GIT HUB sample

[ Edited ]

Hi,

 

The default k&m in the application note assumes that you apply the diffuser in the optical design. The poly coefficients you found in GIT HUB example is used for the case without the diffuser.

 

Attached is an example code with the coefficients for m = 0.00391 and k = 0.0104. You should also follow the configuration in the example code as well. If you use a different configuration, you MUST calibrate both k&m. Like I said before, you can take multiple measurements and fit the result to a poly equation. That's how you can get both k&m.

 

Regards,

Tony