Reply
Posts: 4
Registered: ‎05-09-2017

Si1133 Bring up issues

We have build a proto with the Si1133 to measure UVI, and are having a tough time getting it stable. I have built two optical paths to match the geometries in AN968, for the "Simplest" as well as the "Good Performance" configurations. I was able to calibrate the system with a Solarmeter Model 6.5, and match it's reading well over several hours yesterday. Today the readings are way off and I am not sure why. Are you aware of any stability issues with the Si1133?

 

Also, sitting at my desk by the window and double checking the configuration, took a reading of 2.3 UVI (which is similar to what it is reading outside right now) through standard window glass. The Solarmeter 6.5, of course, reads 0.00 as it should since no significant erythemally active UV penetrates standard window glass. I am wondering again if you have encountered an issue like this? Are we perhaps getting some output from the ambient light sensor? Is the UV sensor actually reading ambient light as well as UV?

 

Thanks for any thoughts you have.

Andrew

Posts: 97
Registered: ‎04-09-2015

Re: Si1133 Bring up issues

Hi Andrew,

 

There's no stability issue with the Si1133. 

 

Si1133 only measures UVA and UVB and won't measure ambient light at all. I don't know anything about the optical design of your prototype, but it is possible that there's IR leakage to the side of the sensor which excites the photodiode and causes false readings. We have observed this kind of problem when the sensor is completely exposed on the EVB and placed near the window early in the morning. The problem you've seen in your test can be avoided if you put a black rubber ring around the sensor.

 

Regards,

Tony 

Posts: 4
Registered: ‎05-09-2017

Re: Si1133 Bring up issues

Tony,

Thanks for your reply. Glad to hear that the Si1133 is stable. As far as light leakage, I don’t think that is what is going on, unless the Si1133 is exquisitely sensitive in some situations to the slightest amount of side IR leakage, but I have designed a full enclosure for our board and an optics assembly that further encloses and controls the optics around the Si1133. I have a set of jpeg screen shots of the assembly we are using and can send them if you let me know how. The assembly geometries match your “Good Performance, Less Compact Assembly” guidelines in AN968, and specifically:

·         Glass is Gorilla Glass 3, 0.55mm thick

·         Diffuser is TaegaSeal PTFE Tape, MIL-T-27730A, measured at 0.07mm (0.003”) thickness

·         Housings are black nylon

·         Optics holder is black nylon

·         Optics retention is black SLA material (I can find the exact material if that is helpful)

·         Housings have an overlapping reveal

·         Optics holder is flush on the PCBA

 

I spent all day (clear day here in California) taking readings and creating a calibration with a Solarmeter 6.5. The calibration looks reasonable (coefficients shown below). When I take readings they are all over the place, ranging from 0.05 UVI to 23.2 UVI, while the device is resting on a horizontal flat surface in the exact same orientation and a Solarmeter UVI of 3.2. We have multiple PCBA’s ( I have 2 with me currently) and I swapped the optics assembly, adjusted the Si1133 settings (as below) and got the same behavior as above (Solarmeter UVI reading of 2.1 for the second board measurements). The readings on the second board ranged from -41 raw to 323 raw (or a negative UVI to 12.5 UVI).

 

The Si1133 is programmed as follows:

K = 0.001147

M = 0.1014

HW Gain = 6

SW Gain = 2

Decimation = 3

Post Shift = 0

For a total reading time of 12.5 ms

 

Raw readings (from 18 to 442) matched corresponding UVIs when I applied the above calibration settings manually. Why would the raw input vary that much in a clear stable atmosphere with the Solarmeter 6.5 reading a constant 3.1 UVI? Are the settings I have used just unstable somehow? Any thoughts?

 

Andrew

Posts: 3,093
Registered: ‎02-07-2002

Re: Si1133 Bring up issues

You can insert images in the forum with the 'Insert/edit image' button.

Posts: 97
Registered: ‎04-09-2015

Re: Si1133 Bring up issues

Hi Andrew,

 

How did you perform the calibration? Why didn't the reading jump around during the calibration?

 

Which measurement mode did you use, autonomous mode or forced mode? If it's autonomous mode, what's the measurement rate?

 

Can you provide the Si1133 initialization code for me to check? I do recommend you use the HW_GAIN = 9 and SW_GAIN = 0 setting if you apply the diffuser in your optical design.

 

Regards,

Tony

Posts: 4
Registered: ‎05-09-2017

Re: Si1133 Bring up issues

The reading did jump a lot during calibration requiring me to take a lot of data (15-20 data points) and run a least square 2nd order polynom fit to get a calibration. Even then the calibration was suspect at times.

We are running in forced mode for our application.

I am checking with my firmware consultant about the initialization code and will get back to you on that.

As far as the settings, I started with default settings of

k = 0.0187

m = 0.00391

HW gain = 9

SW gain = 0

Decimation = 3.

The system seems to freeze (using Tera Term VT) very often with these settings.

Since Friday, I have obtained a good calibration and stable settings using a manually frosted piece of the 0.55mm Gorilla Glass 3 as a diffuser. I am using the following settings, which I arrived at with some educated guessing and a lot of trial and error:

k = 0.0238

m = -0.000258

HW gain = 2

SW gain = 3

Decim = 3.

 

The polynom regression is good with an R = 0.974 based on n=18 points between UVI of 1.2 (raw = 50)and 8.4 (raw = 350).

So, although I have found a stable configuration with a fast total measurement time (~1.6ms) I am still a little concerned that moving off of these settings for any reason may leave me with a less repeatable behavior.

I will let you know if I can get the initialization code for you to look at, but in the meantime, does any of the above help in assessing possible issues?

Thanks,

Andrew

 

Posts: 6
Registered: ‎05-05-2017

Re: Si1133 Bring up issues

Hi Tony,

 

Andrew asked me to insert the sensor init code. Here it is (a number of parameters are stored in variables and configurable from a command prompt on the target, hence the m_variables in the code):

 

/////////////////////////////////////////////
// Top-level UV register address definitions
/////////////////////////////////////////////

// Information registers
#define UV_REG_PART_ID 0x0
#define UV_REG_REV_ID 0x1
#define UV_REG_MFR_ID 0x2
#define UV_REG_INFO0 0x3
#define UV_REG_INFO1 0x4

// Used for writin to Parameter Table
#define UV_REG_HOSTIN3 0x7
#define UV_REG_HOSTIN2 0x8
#define UV_REG_HOSTIN1 0x9
#define UV_REG_HOSTIN0 0xA
// (Command address)
#define UV_REG_COMMAND 0xB
#define UV_REG_IRQ_ENABLE 0xF
#define UV_REG_RESPONSE1 0x10
#define UV_REG_RESPONSE0 0x11
#define UV_REG_IRQ_STATUS 0x12

// Recorded data registers
#define UV_REG_HOSTOUT0 0x13
#define UV_REG_HOSTOUT1 0x14
#define UV_REG_HOSTOUT2 0x15
#define UV_REG_HOSTOUT3 0x16
#define UV_REG_HOSTOUT4 0x17
#define UV_REG_HOSTOUT5 0x18
#define UV_REG_HOSTOUT6 0x19
#define UV_REG_HOSTOUT7 0x1A
#define UV_REG_HOSTOUT8 0x1B
#define UV_REG_HOSTOUT9 0x1C
#define UV_REG_HOSTOUT10 0x1D
#define UV_REG_HOSTOUT11 0x1E
#define UV_REG_HOSTOUT12 0x1F
#define UV_REG_HOSTOUT13 0x20
#define UV_REG_HOSTOUT14 0x21
#define UV_REG_HOSTOUT15 0x22
#define UV_REG_HOSTOUT16 0x23
#define UV_REG_HOSTOUT17 0x24
#define UV_REG_HOSTOUT18 0x25
#define UV_REG_HOSTOUT19 0x26
#define UV_REG_HOSTOUT20 0x27
#define UV_REG_HOSTOUT21 0x28
#define UV_REG_HOSTOUT22 0x29
#define UV_REG_HOSTOUT23 0x2A
#define UV_REG_HOSTOUT24 0x2B
#define UV_REG_HOSTOUT25 0x2C

///////////////////////////////////////////////////
// Macros for unpacking specific values from regs
///////////////////////////////////////////////////
#define UV_UNPACK_RESPONSE0_CMD_CTR(v) (v & 0x0F)
#define UV_UNPACK_RESPONSE0_CMD_ERR(v) ((v & 0x10) >> 4)
#define UV_UNPACK_RESPONSE0_SLEEP(v) ((v & 0x20) >> 5)
#define UV_UNPACK_RESPONSE0_SUSPEND(v) ((v & 0x40) >> 6)
#define UV_UNPACK_RESPONSE0_RUNNING(v) ((v & 0x80) >> 7)


///////////////////////////////////////////////////
// Parameter table addresses (accessed indirectly)
///////////////////////////////////////////////////

#define UV_PARAM_I2C_ADDR 0x00
#define UV_PARAM_CHAN_LIST 0x01

// ADC configuration
#define UV_PARAM_ADCCONFIG0 0x02
#define UV_PARAM_ADCSENS0 0x03
#define UV_PARAM_ADCPOST0 0x04
#define UV_PARAM_MEASCONFIG0 0x05
#define UV_PARAM_ADCCONFIG1 0x06
#define UV_PARAM_ADCSENS1 0x07
#define UV_PARAM_ADCPOST1 0x08
#define UV_PARAM_MEASCONFIG1 0x09
#define UV_PARAM_ADCCONFIG2 0x0A
#define UV_PARAM_ADCSENS2 0x0B
#define UV_PARAM_ADCPOST2 0x0C
#define UV_PARAM_MEASCONFIG2 0x0D
#define UV_PARAM_ADCCONFIG3 0x0E
#define UV_PARAM_ADCSENS3 0x0F
#define UV_PARAM_ADCPOST3 0x10
#define UV_PARAM_MEASCONFIG3 0x11
#define UV_PARAM_ADCCONFIG4 0x12
#define UV_PARAM_ADCSENS4 0x13
#define UV_PARAM_ADCPOST4 0x14
#define UV_PARAM_MEASCONFIG4 0x15
#define UV_PARAM_ADCCONFIG5 0x16
#define UV_PARAM_ADCSENS5 0x17
#define UV_PARAM_ADCPOST5 0x18
#define UV_PARAM_MEASCONFIG5 0x19

// Measurement rate configuration
#define UV_PARAM_MEASRATE_H 0x1A
#define UV_PARAM_MEASRATE_L 0x1B
#define UV_PARAM_MEASCOUNT0 0x1C
#define UV_PARAM_MEASCOUNT1 0x1D
#define UV_PARAM_MEASCOUNT2 0x1E

// Threshold configuration
#define UV_PARAM_THRESHOLD0_H 0x25
#define UV_PARAM_THRESHOLD0_L 0x26
#define UV_PARAM_THRESHOLD1_H 0x27
#define UV_PARAM_THRESHOLD1_L 0x28
#define UV_PARAM_THRESHOLD2_H 0x29
#define UV_PARAM_THRESHOLD2_L 0x2A

// Burst
#define UV_PARAM_BURST 0x2B


///////////////////////////////////////////////////
// Commands (issued in UV_REG_COMMAND register)
///////////////////////////////////////////////////

// Reset command counter field to 0
#define UV_CMD_RESET_CMD_CTR 0x00
// Force reset, resets RESPONSE0 CMMND_CTR field to 0xXXX01111
#define UV_CMD_RESET_SW 0x01
// Force a set of measurements specified in CHAN_LIST parameter
#define UV_CMD_FORCE 0x11
// Pause autonomous measurements specified in CHAN_LIST
#define UV_CMD_PAUSE 0x12
// Start autonomous measurements specified in CHAN_LIST
#define UV_CMD_START 0x13

// Interface with Paramter Table (must be followed by UV_CMD_PARAM_QUERY or _SET)

// Query param table value. Logical OR |= lower six bits with param address.
#define UV_CMD_PARAM_QUERY 0x40
// Set param table with the contents of UV_REG_HOSTIN0 register.
// Logical OR |= lower six bits with param address.
#define UV_CMD_PARAM_SET 0x80


// Values used in Commands

// Default value of CMD_CTR (sometimes CMMND_CTR in docs)
#define UV_DEFAULT_CMD_CTR 0x0F
#define UV_CHAN_LIST_ENABLE_CH0 0x01
#define UV_IRQ_CHAN_0 0x01


// Configures measurement parameters int LdUVSensor::ConfigureSensor() { // Configure just Channel 0 for UV sensing, for now. We could potentially add // a second channel for Deep UV sensing, or some other metric. int status = 0; // Connect ADC's for UV reading, set decimatino rate, see Si1133 datasheet p.32 status = SetParam(UV_PARAM_ADCCONFIG0, (UV_ADCMUX_UV | (m_uv_decmRate << 5))); if (status) { DEBUG_PRINTF("LdUVSensor::ConfigureSensor(): Error configuring ADC's for UV Sensing."); } else { // Set Hardware and SW gain, datasheet p.33 status = SetParam(UV_PARAM_ADCSENS0, (m_uv_hwGain | (m_uv_swGain << 4))); if (status) { DEBUG_PRINTF("LdUVSensor::ConfigureSensor(): Error Setting Gain."); } else { // Set Post Shift bits, datasheet p.34 status = SetParam(UV_PARAM_ADCPOST0, ((m_uv_postShift << 3) | (UV_24BIT_OUTPUT << 6))); if (status) { DEBUG_PRINTF("LdUVSensor::ConfigureSensor(): Error setting POSTSHIFT."); } else { // Enable Channel 0 in CHAN_LIST. See Si1133 datasheet p.29 status = SetParam(UV_PARAM_CHAN_LIST, UV_CHAN_LIST_ENABLE_CH0); if (status) { DEBUG_PRINTF("LdUVSensor::ConfigureSensor(): Error enabling Channel 0 in CHAN_LIST."); } else { DEBUG_PRINTF("LdUVSensor::ConfigureSensor(): Sensor configured."); } } } } // Configuring a 'channel' means configuring these 4 Parameters, then enabling // its bit in the bottom 6 lsb of the CHAN_LIST parameter: // - ADCCONFIGx // - ADCSENSx // - ADCPOSTx // - MEASCONFIGx // // It turns out the default value MEASCONFIG0 is sufficient for on-demand // single-shot reading. // Read back configuration to ensure it stuck uint8_t val1 = 0; uint8_t val2 = 0; uint8_t val3 = 0; uint8_t val4 = 0; QueryParam(UV_PARAM_CHAN_LIST, &val1); QueryParam(UV_PARAM_ADCCONFIG0, &val2); QueryParam(UV_PARAM_ADCSENS0, &val3); QueryParam(UV_PARAM_ADCPOST0, &val4); static char buf[128]; sprintf(buf, "Post-config: CHAN_LIST = 0x%X, ADCCONFIG0 = 0x%X, ADCSENS0 = 0x%X, ADCPOST0 = 0x%X", val1, val2, val3, val4); DEBUG_PRINTF(buf); return status; }
Posts: 97
Registered: ‎04-09-2015

Re: Si1133 Bring up issues

Hi Andrew,

 

I don't see any issue with your calibration procedure or initialization code. If you change the configuration and take multiple test points (~20) at different UV index level, you can fit your own 2nd order polynomial equation to calculate UVI.

 

Normally, we recommend a longer integration time to reduce the noise. It seems that at high HW_GAIN setting, you always run into unstable reading issues. If that's the case, you can certainly reduce the HW_GAIN and increase the SW_GAIN. Why not use HW_GAIN = 2 and SW_GAIN = 6? That will give you a longer integration time for better performance. 

 

If you submit a technical support ticket in our support system, we can also help you to review your optical design. 

 

Regards,

Tony

Posts: 4
Registered: ‎05-09-2017

Re: Si1133 Bring up issues

Thanks Tony,

 

I'll check out the longer integration time (SWGN = 6) and see how that helps. It may allow me to go back to the PTFE diffuser, as under the current settings I get a raw reading of about 30 for a measured UVI of 6.4. Higher SWGain should help if its stable.

If I am still having issues I will submit a ticket and we can dig in deeper.

Thanks again for your help.

 

Andrew