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

Lux calc fix #1

Closed
ladyada opened this issue May 13, 2019 · 6 comments
Closed

Lux calc fix #1

ladyada opened this issue May 13, 2019 · 6 comments
Assignees

Comments

@ladyada
Copy link
Member

ladyada commented May 13, 2019

https://forums.adafruit.com/viewtopic.php?f=19&t=149893&p=748684#p748675

@siddacious siddacious self-assigned this May 13, 2019
@siddacious
Copy link
Contributor

siddacious commented May 14, 2019

@ladyada OP says the lux correction is to be applied only at 25ms 1/8 gain so I'll give it a go and see how it performs

@ladyada
Copy link
Member Author

ladyada commented May 14, 2019

hmm unclear. i think it should be a new function called lux_normalize() that will turn the plain lux thru the special function

@ladyada
Copy link
Member Author

ladyada commented Jul 4, 2019

@jeff-winn
Copy link

I was recently rewriting the driver for this in C# for use in a .NET Core application and may have found the crux of the issue.

On the data sheet for the VEML7700, the document clearly contains a multiplier table based on the values of gain and integration time.

This driver has hard coded a single value out of that table rather than properly adjust the multiplier. Your multiplier is hard coded at 0.0576! This likely means all numbers produced other than those whose settings match are off.

The methods in this driver would be normalize_resolution and readLux where that number has been hard coded. This is likely why there is other logic to try and readjust the value output.

Here’s a direct link to the PDF I kept a copy of so I wouldn’t have to track it down again…
https://github.com/jeff-winn/dotnet-veml7700/blob/main/docs/Adafruit_VEML7700/designingveml7700.pdf

The multiplier table is on page 5 of that document.

Here’s a link to what I wrote, the AdjustLuxMultiplier method in the class is the important one…
https://github.com/jeff-winn/dotnet-veml7700/blob/main/src/Adafruit.Devices.Veml7700/Adafruit_VEML7700.cs

@caternuson
Copy link
Contributor

Yah, sure seems like it:
image

@caternuson
Copy link
Contributor

Hopefully fixed with the 2.0.0 release:
https://github.com/adafruit/Adafruit_VEML7700/releases/tag/2.0.0

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

No branches or pull requests

4 participants