Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light sensor returns higher value at darker light #273

Closed
dhineshkumarmcci opened this issue Dec 24, 2020 · 1 comment
Closed

Light sensor returns higher value at darker light #273

dhineshkumarmcci opened this issue Dec 24, 2020 · 1 comment
Assignees
Labels

Comments

@dhineshkumarmcci
Copy link
Member

At darker (low-light) region, Si1133 returns channel data as FFFFxx on read. Instead it should return zero.

@terrillmoore
Copy link
Member

We speculate that this is due to dark current being slightly higher than the actual current from the measurement photodiode, due to noise, physical variation across the die, or similar. We think that the Si1133 measures the current from the measurement diode, then measures and subtracts the current from the dark-current photodiode, and doesn't prevent the result from going negative. The "24 bit" measurement mode is in fact a signed measurement (the saturation value is 0x7FFFFF, according to the datasheet), and the dark current is pretty small; we can treat any value in 0x800000 .. 0xFFFFFF as being negative; since light can't be negative, we can substitute zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants