-
Notifications
You must be signed in to change notification settings - Fork 7
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
SI units? #47
Comments
The values are read by calling analog read on the corresponding audio/light sensor. This is then normalized according to the max analog read (1024). You could technically convert this to lux/bel values by getting a lux meter and mapping the values. Not sure if there's a better way to do it. @ekolker any ideas? |
Way ahead of you, Jia. Background: I did the hardware design, @johnnyman727 did most of the firmware. SI units weren't something we designed for explicitly, but that doesn't mean you can't make some measurements to calibrate the device or solve for the transfer functions. Right now, we basically aim to provide resolution on the order of "is it loud/bright?" The module's schematic is here. You'll also probably need the datasheet for the phototransistor and the microphone. The phototransistor's current passes through a 1k resistor, then a buffer and a filter, neither of which should change its amplitude. The sound side of the module is a fair bit more complicated, but it has the added benefit of being adjustable (this also means that, statistically, it's less likely to be uniform from one board to another, but also that you can compensate for this fact). I actually did a presentation on how it works, complete with some LT SPICE simulations, but the basic steps on the signal path are below:
The second to last part means that, sadly, the system is nonlinear in the Signals And Systems sense of the term because it has that DC offset. That said, in a mathematical sense, there should be a All the while, the signal needs to stay within the 3.3V rail (plus whatever our op amp needs) or it will saturate. |
Also worth mentioning that all the resistors on that board are 5%. This basically just means that the best and fastest way to figure all this out is to calibrate everything to a known-good source...which you should probably do anyway. |
Thank you so much. Luckily the light measuring is much more important for me than sound. |
I cant find any information what is the format of the audio and light data. Is it possible to convert that value somehow to lux and Bel values? Is it possible to use the module in a way to measure light and noise responsibly, e.g. is it precise? If so it would be great addition to the climate module for me.
Thanks in advance for any response.
The text was updated successfully, but these errors were encountered: