- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
11-08-2016 09:53 PM
I'm using Si1142 to read PS1 and PS2 values in force mode. I do the following steps:
1) enable PS1 and PS2 channel
2) set PS_ADC_MODE to normal Proximity measurement mode(PS_ADC_MISC:0x04)
3) set PS1 and PS2 both to LED1 driver(PSLED12_SELECT:0x11)
4) set PS1_ADMUX and PS2_ADCMUX to large IR(0x03), set PS_LED21 to 0xff
5) some other basic configuration to make sure Si1142 work
After these steps, I think I should get the same value from PS1_DATA and PS2_DATA. But PS1 is always larger than PS2, that means when I draw curves of PS1 and PS2, the two curves look very similar, but PS1 curve is higher.
I also try to set both PS channel to LED2, still PS1 is larger than PS2.
Now I'm so confused, why I get different PS values while the two channels are using the same led driver and same configuration?
Solved! Go to Solution.
11-09-2016 10:59 AM
I don't know for sure but my first suspicion is that it is related to the LED voltage supply (Vled). In a typical setup there is a capacitor on the Vled signal. This capacitor supplies the current during the short LED pulse and is recharged by the Vled supply in between LED pulses. Since, your setup involves two sequential LED pulses (PS1 then PS2) my guess is that the first pulse partially discharges the capacitor leaving less charge for the second pulse. As a result the LED does not shine as bright on the second pulse.
I recommend that you take a scope capture of Vled during the sequence.
If this is indeed the problem then the fix is to re-evaluate the Vled capacitor. Several factors must be taken into account including: LED on-time (ADCgain), LED specifications, Vled value, and LED current settings.
I hope this helps.
11-10-2016 02:43 AM
Thank you very much. The scope shows that there's a voltage drop (about 800mV) after PS1 measurement, and it takes several ms to go back to normal level. That makes PS1 value larger than PS2.
I also tried to make 2 continuous PS1+PS2 measurements, and only kept the second results. But that didn't help. Because there's a 2ms gap between these two measurements, the capacitor voltage almost recovered when the 2rd measurement came.
I'll try some new mothods. Thank you again!