We are trying to get the 3D Gesture working on the Si1143. We are able to read the ALS and IR ALS reading with good accuracy, but the PS1/PS2/PS3 data always returns the are same value (256) ±10 with and without any obstacles above the sensor.
Please find the code below for the settings. We could not capture any change on the LED's pin during the operation, meaning we do not see the LED going ON. It is always in off status. Verified the schematics and layout and it is good.
Hope you would be able to point us in the right direction for debugging the issue.
write_reg(HW_KEY,HW_KEY_VAL0); // Setting up LED Power to full
write_reg(PARAM_WR, ALS_IR_TASK + ALS_VIS_TASK + PS1_TASK + PS2_TASK + PS3_TASK);
command(PARAM_SET + (CHLIST & 0x1F));
/* Code added from Si1143 Development kit source */
write_reg(ALS_VIS_ADC_MISC,(0x24 & 0x20)); // adcmisc = 0x24
You cannot write to parameter registers using I2C write functions. Please follow the command protocol to set parameter registers like PS1_ADCMUX.
Also, can you check if the PSLED12_SELECT and PSLED3_SELECT registers are set properly?
Thank you for the inputs, have modified the code to correct the issue.
Have included the PGM Toolkit source (si114xdk) with a wrapper for the I2C functionality. Reset and Init as per the sample application.
Disabled IRQ enables as we are not supporting IRQ, no I/O allocated due to IO shortage.
Am reading PSLED12_SELECT as 0x21 and PSLED3_SELECT as 0x04 which is correct as per datasheet. PS1 is connected to LED1 and so on.
We are doing Force read of the PS1, PS2, PS3, IR and VIS. We are able to read IR and VIS reading as before but PSx reading are hay wire or always reads 256 ± 5. We have done oscilloscope capture of the LED, would update the data tomorrow.
Kindly lets us know if we do polling is there a way to check the proximity, once we could get proximity then we could move to gesture.
It sounds like a hardware issue. Can you send us your schematic to review? You can submit a technical support ticket.
Thank you for the quick response.
We would not be able to share the complete schematics, but have included the sensor schematics & Gerber (PDF) for your reference. Please let us know if there is any issues.
Since the I2C is working fine, we do not see why other component which is the LED should have an issue. Hope it is not in Hardware, as we are doing a pilot production now.
I don't see any issue in the schematic. How much do you read when you move your hand over the sensor? 256 is the default ADC offset.
Though we place the hand over the sensor during the polling, we do not see any change in the readings. Randomly PS1 reads 511, PS2 and PS3 does not have any change apart from few counts (1-10) which is again random.
Can you make sure that LED is on during measurements?