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

ambient light sensor #13

Open
korn0055 opened this issue Mar 18, 2015 · 2 comments
Open

ambient light sensor #13

korn0055 opened this issue Mar 18, 2015 · 2 comments
Assignees

Comments

@korn0055
Copy link
Owner

Implement A/D routines to read ambient level from photo resistor and adjust "off" brightness level

@korn0055 korn0055 self-assigned this Mar 18, 2015
@korn0055 korn0055 added this to the stable firmware release milestone Mar 18, 2015
@korn0055
Copy link
Owner Author

There is a lot of noise (>100mV p-p) on the photo resistor with just one emitter and the small LED strip running. From testing indoors with a 100k series resistor, it looks like the threshold will need to be a couple hundred millivolts, so some filtering will be needed. The plan is to use a first-order IIR filter: y[0] = (1-alpha)*x[0] + alpha * y[-1] with alpha close to unity in order to filter the noise. A warm-up time will be required before the filter output can be used to make any decisions.

@NothingButGunpowder
Copy link
Collaborator

You could also try stacking a cap on top of the existing resistor to filter the noise. Is the noise synchronous with the other devices pulsing or could it be noise from overhead lights being picked up at 60 Hz?

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

No branches or pull requests

2 participants