Re: [Fwd: Re: Ambient light sensing via LED response]
On Wed, May 6, 2009 at 6:14 PM, Reinder de Haan r...@mveas.com wrote: Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. I think the actual A/D reference voltage is probably *maximum* 3.3V. What's the *minimum* A/D reference voltage? And can the A/D measure all the way down to ground? (Sometimes there's a Vmin for the A/D input, often around a diode drop above ground.) i did some more experiments and at ~20 cm from the halogen lamp i doest matter is i turn the backlight full on of off .. i dont have color anymore at that distance the bare led gave about 250mv (maybe a bit more into a very high R fet gate...) 250mv should be a count of about 20 from the A/D. That's plenty for this purpose. Heck, a count of 1 would be sufficient, as long as it was repeatable. ;-) So, it seems like all that's required is one wire from the top of the LED to the A/D input, and wiring Vref directly to +3.3. Adding a zener and a resistor for a lower Vref would probably improve precision and accuracy. Everything else is software tweaking some constants. --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [Fwd: Re: Ambient light sensing via LED response]
C. Scott Ananian wrote: On Wed, May 6, 2009 at 6:14 PM, Reinder de Haan r...@mveas.com wrote: Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. I think the actual A/D reference voltage is probably *maximum* 3.3V. What's the *minimum* A/D reference voltage? And can the A/D measure all the way down to ground? (Sometimes there's a Vmin for the A/D input, often around a diode drop above ground.) i did some more experiments and at ~20 cm from the halogen lamp i doest matter is i turn the backlight full on of off .. i dont have color anymore at that distance the bare led gave about 250mv (maybe a bit more into a very high R fet gate...) that 250mv is without the light guide and lcd cover installed! with the light guide in place its more like ~70mv ... 0.07/3.3*256= 5.4 LSB and then the Rin of the ADC must be 10Mohm... 250mv should be a count of about 20 from the A/D. That's plenty for this purpose. Heck, a count of 1 would be sufficient, as long as it was repeatable. ;-) So, it seems like all that's required is one wire from the top of the LED to the A/D input, and wiring Vref directly to +3.3. Adding a zener and a resistor for a lower Vref would probably improve precision and accuracy. Everything else is software tweaking some constants. --scott if i find the time somewhere this week i might test it ... otherwise it will be during of after paris.. Reinder ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [Fwd: Re: Ambient light sensing via LED response]
On Sun, May 10, 2009 at 5:01 PM, Reinder de Haan r...@mveas.com wrote: C. Scott Ananian wrote: On Wed, May 6, 2009 at 6:14 PM, Reinder de Haan r...@mveas.com wrote: Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. I think the actual A/D reference voltage is probably *maximum* 3.3V. What's the *minimum* A/D reference voltage? And can the A/D measure all the way down to ground? (Sometimes there's a Vmin for the A/D input, often around a diode drop above ground.) i did some more experiments and at ~20 cm from the halogen lamp i doest matter is i turn the backlight full on of off .. i dont have color anymore at that distance the bare led gave about 250mv (maybe a bit more into a very high R fet gate...) that 250mv is without the light guide and lcd cover installed! with the light guide in place its more like ~70mv ... 0.07/3.3*256= 5.4 LSB and then the Rin of the ADC must be 10Mohm... 5 LSB is still okay, and it could be more if the A/D Vref can be dropped below 3.3V. --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: [Fwd: Re: Ambient light sensing via LED response]
Hi guys, How can I help with this, I still teach electrical engineering at the University of Nebraska, and before that I have about 25 years in the field. Mostly embedded microcontrollers and stuff. I do have several XOs to work with. I would have jumped in earlier but the end of the semester is a bit hectic. Mark On May 10, 2009 Sunday, at 4:13:47:0, C. Scott Ananian wrote: On Sun, May 10, 2009 at 5:01 PM, Reinder de Haan r...@mveas.com wrote: C. Scott Ananian wrote: On Wed, May 6, 2009 at 6:14 PM, Reinder de Haan r...@mveas.com wrote: Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. I think the actual A/D reference voltage is probably *maximum* 3.3V. What's the *minimum* A/D reference voltage? And can the A/D measure all the way down to ground? (Sometimes there's a Vmin for the A/D input, often around a diode drop above ground.) i did some more experiments and at ~20 cm from the halogen lamp i doest matter is i turn the backlight full on of off .. i dont have color anymore at that distance the bare led gave about 250mv (maybe a bit more into a very high R fet gate...) that 250mv is without the light guide and lcd cover installed! with the light guide in place its more like ~70mv ... 0.07/3.3*256= 5.4 LSB and then the Rin of the ADC must be 10Mohm... 5 LSB is still okay, and it could be more if the A/D Vref can be dropped below 3.3V. --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
But why do you say you would need 1 mV accuracy ? Bright sunlight is far stronger than the light sources he used. I am not an engineer so forgive me if I am saying something stupid, but is not the goal to switch off the backlight if and only if there is no difference between the switched on and switched off state? I mean that this implies that you have to measure the mV at a light level when you cannot see the difference (what can be a much fainter light than the sun). ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
[Fwd: Re: Ambient light sensing via LED response]
Original Message Subject: Re: Ambient light sensing via LED response Date: Thu, 07 May 2009 00:02:49 +0200 From: Reinder de Haan r...@mveas.com To: raf...@laptop.org References: 200904290017.n3t0hl2v006...@new.toad.com c5d4a4e5-b183-4b7d-bafb-3488e15f7...@laptop.org c6d9bea0905011128j2d5cdf3cw975cfad790480...@mail.gmail.com 675d3c5c-95ed-4ee9-84bc-3b5164675...@laptop.org c6d9bea0905042207i458ed9b1if74e0e16d24f5...@mail.gmail.com 4a00a073.8020...@mveas.com a80d16920905051544s525b7039nf7e87a4a3c754...@mail.gmail.com 75dc0458-925b-4792-9aee-a24b9b1f3...@laptop.org a80d16920905051952h3d82d15brb8f690cf1c402...@mail.gmail.com Rafael Enrique Ortiz Guerrero wrote: On Tue, May 5, 2009 at 8:34 PM, John Watlington w...@laptop.org mailto:w...@laptop.org wrote: On May 5, 2009, at 6:44 PM, Rafael Enrique Ortiz Guerrero wrote: These measurements are really cool. But the question remains in whether the ADC could have a resolution of 1mv?, i mean in light of these measurements is necessary to have an ADC that can reliable sense these variations and then with that basis have a transfer function and add it to the algorithm. Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. But why do you say you would need 1 mV accuracy ? Bright sunlight is far stronger than the light sources he used. i don't know if the measurements at sunlight would show the same variations.. we would have to make new measurements, but for experience, the variations of voltage regarding light sensing are not of considerable amounts, so if the accuracy is 26mv, we would have to see if a perceptible change in ambient light could be of a higher magnitude than 26mv, if not the accuracy could be lost.. i did some more experiments and at ~20 cm from the halogen lamp i doest matter is i turn the backlight full on of off .. i dont have color anymore at that distance the bare led gave about 250mv (maybe a bit more into a very high R fet gate...) i guess it would be around 70mv whit the light guide in front of it.. (i guess this be more (150mv?) with a very high R (~25 Mohm?) fet gate as only load) i would add a simple amp (mosfet? or maybe cheap opamp ?) to amplify ~X10 so 300mv would be full scale.. my memory is dusty but that should be posible with 2 resistors an a fet ? gain would be posible to change by replacing one of the resistors with a bigger / lower value... maybe a trasistor is better bc the leds is acts as a current source ? ideas welcome if i can get the partnr of a fet/transistor that would be usable (and cheap enough) i could maybe order a couple of them from say farnell and hack something together here is there a free or hackable input on the current EC ? (or is that different from the ec that will be in 1.5 ? (haven't checked the specs though..) Having the data sheet for the EC controller doesn't help --- 8 bits and recommended operating voltage for the analog reference voltage is about all it provides. I had to ask a chinese speaker to call the app. engineer to find out the input impedance... Ok, thanks :). On Tue, May 5, 2009 at 3:24 PM, Reinder de Haan r...@mveas.com mailto:r...@mveas.com wrote: Hallo, C. Scott Ananian wrote: snip A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott measured on a B1 XO1 laptop (where the leds and the series resistor are wired in parallel it seam) : almost dark: 0mv ~3meter away from a 8w PL; bare led: ~2mv ~50 cm below ~25W halogen desk lamp; bare led: ~40mv bright white led directly on bare led ~200mv bright white led directly on light guide of the bat.led (lcd side) ~50mv ~50 cm below ~25w halogen desk lamp (~75* angle to the axis of the light guide) ~5mv i measure this between GND of the laptop the led side of the series resistor. all leds seam to be about the same.. i did not compare the different light guides. the main battery and DC power where removed, the RTC baterry was still in place. the meter i measured this with was fixed in the 2000mv range and was abou 10Mohm when i connected it to another meter in resistance mode; the (volt) meter read 250mv at that time
[Fwd: Re: Ambient light sensing via LED response]
Original Message Subject: Re: Ambient light sensing via LED response Date: Thu, 07 May 2009 00:02:49 +0200 From: Reinder de Haan r...@mveas.com To: raf...@laptop.org References: 200904290017.n3t0hl2v006...@new.toad.com c5d4a4e5-b183-4b7d-bafb-3488e15f7...@laptop.org c6d9bea0905011128j2d5cdf3cw975cfad790480...@mail.gmail.com 675d3c5c-95ed-4ee9-84bc-3b5164675...@laptop.org c6d9bea0905042207i458ed9b1if74e0e16d24f5...@mail.gmail.com 4a00a073.8020...@mveas.com a80d16920905051544s525b7039nf7e87a4a3c754...@mail.gmail.com 75dc0458-925b-4792-9aee-a24b9b1f3...@laptop.org a80d16920905051952h3d82d15brb8f690cf1c402...@mail.gmail.com Rafael Enrique Ortiz Guerrero wrote: On Tue, May 5, 2009 at 8:34 PM, John Watlington w...@laptop.org mailto:w...@laptop.org wrote: On May 5, 2009, at 6:44 PM, Rafael Enrique Ortiz Guerrero wrote: These measurements are really cool. But the question remains in whether the ADC could have a resolution of 1mv?, i mean in light of these measurements is necessary to have an ADC that can reliable sense these variations and then with that basis have a transfer function and add it to the algorithm. Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. But why do you say you would need 1 mV accuracy ? Bright sunlight is far stronger than the light sources he used. i don't know if the measurements at sunlight would show the same variations.. we would have to make new measurements, but for experience, the variations of voltage regarding light sensing are not of considerable amounts, so if the accuracy is 26mv, we would have to see if a perceptible change in ambient light could be of a higher magnitude than 26mv, if not the accuracy could be lost.. i did some more experiments and at ~20 cm from the halogen lamp i doest matter is i turn the backlight full on of off .. i dont have color anymore at that distance the bare led gave about 250mv (maybe a bit more into a very high R fet gate...) i guess it would be around 70mv whit the light guide in front of it.. (i guess this be more (150mv?) with a very high R (~25 Mohm?) fet gate as only load) i would add a simple amp (mosfet? or maybe cheap opamp ?) to amplify ~X10 so 300mv would be full scale.. my memory is dusty but that should be posible with 2 resistors an a fet ? gain would be posible to change by replacing one of the resistors with a bigger / lower value... maybe a trasistor is better bc the leds is acts as a current source ? ideas welcome if i can get the partnr of a fet/transistor that would be usable (and cheap enough) i could maybe order a couple of them from say farnell and hack something together here is there a free or hackable input on the current EC ? (or is that different from the ec that will be in 1.5 ? (haven't checked the specs though..) Having the data sheet for the EC controller doesn't help --- 8 bits and recommended operating voltage for the analog reference voltage is about all it provides. I had to ask a chinese speaker to call the app. engineer to find out the input impedance... Ok, thanks :). On Tue, May 5, 2009 at 3:24 PM, Reinder de Haan r...@mveas.com mailto:r...@mveas.com wrote: Hallo, C. Scott Ananian wrote: snip A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott measured on a B1 XO1 laptop (where the leds and the series resistor are wired in parallel it seam) : almost dark: 0mv ~3meter away from a 8w PL; bare led: ~2mv ~50 cm below ~25W halogen desk lamp; bare led: ~40mv bright white led directly on bare led ~200mv bright white led directly on light guide of the bat.led (lcd side) ~50mv ~50 cm below ~25w halogen desk lamp (~75* angle to the axis of the light guide) ~5mv i measure this between GND of the laptop the led side of the series resistor. all leds seam to be about the same.. i did not compare the different light guides. the main battery and DC power where removed, the RTC baterry was still in place. the meter i measured this with was fixed in the 2000mv range and was abou 10Mohm when i connected it to another meter in resistance mode; the (volt) meter read 250mv at that time
Re: Ambient light sensing via LED response
Hallo, C. Scott Ananian wrote: snip A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott measured on a B1 XO1 laptop (where the leds and the series resistor are wired in parallel it seam) : almost dark: 0mv ~3meter away from a 8w PL; bare led: ~2mv ~50 cm below ~25W halogen desk lamp; bare led: ~40mv bright white led directly on bare led ~200mv bright white led directly on light guide of the bat.led (lcd side) ~50mv ~50 cm below ~25w halogen desk lamp (~75* angle to the axis of the light guide) ~5mv i measure this between GND of the laptop the led side of the series resistor. all leds seam to be about the same.. i did not compare the different light guides. the main battery and DC power where removed, the RTC baterry was still in place. the meter i measured this with was fixed in the 2000mv range and was abou 10Mohm when i connected it to another meter in resistance mode; the (volt) meter read 250mv at that time. adding a 10Mohm resistor across the meter halved the ~50 cm below ~25W halogen desk lamp; bare led: ~40mv reading to ~20mv strangely enough when i add that resistor in series the meter said ~60mv so voltage on the leds must have been ~120mv? i will have to investigate this at a later time... if you want more measurement doen feel free to ask.. i also have a XO1 (production model ?C1?) that i could measure. i dont have a lux meter :-( Greetings, Reinder ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
These measurements are really cool. But the question remains in whether the ADC could have a resolution of 1mv?, i mean in light of these measurements is necessary to have an ADC that can reliable sense these variations and then with that basis have a transfer function and add it to the algorithm. (haven't checked the specs though..) My two cents..;). Rafael Ortiz On Tue, May 5, 2009 at 3:24 PM, Reinder de Haan r...@mveas.com wrote: Hallo, C. Scott Ananian wrote: snip A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott measured on a B1 XO1 laptop (where the leds and the series resistor are wired in parallel it seam) : almost dark: 0mv ~3meter away from a 8w PL; bare led: ~2mv ~50 cm below ~25W halogen desk lamp; bare led: ~40mv bright white led directly on bare led ~200mv bright white led directly on light guide of the bat.led (lcd side) ~50mv ~50 cm below ~25w halogen desk lamp (~75* angle to the axis of the light guide) ~5mv i measure this between GND of the laptop the led side of the series resistor. all leds seam to be about the same.. i did not compare the different light guides. the main battery and DC power where removed, the RTC baterry was still in place. the meter i measured this with was fixed in the 2000mv range and was abou 10Mohm when i connected it to another meter in resistance mode; the (volt) meter read 250mv at that time. adding a 10Mohm resistor across the meter halved the ~50 cm below ~25W halogen desk lamp; bare led: ~40mv reading to ~20mv strangely enough when i add that resistor in series the meter said ~60mv so voltage on the leds must have been ~120mv? i will have to investigate this at a later time... if you want more measurement doen feel free to ask.. i also have a XO1 (production model ?C1?) that i could measure. i dont have a lux meter :-( Greetings, Reinder ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On May 5, 2009, at 6:44 PM, Rafael Enrique Ortiz Guerrero wrote: These measurements are really cool. But the question remains in whether the ADC could have a resolution of 1mv?, i mean in light of these measurements is necessary to have an ADC that can reliable sense these variations and then with that basis have a transfer function and add it to the algorithm. Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. But why do you say you would need 1 mV accuracy ? Bright sunlight is far stronger than the light sources he used. (haven't checked the specs though..) Having the data sheet for the EC controller doesn't help --- 8 bits and recommended operating voltage for the analog reference voltage is about all it provides. I had to ask a chinese speaker to call the app. engineer to find out the input impedance... My two cents..;). Rafael Ortiz On Tue, May 5, 2009 at 3:24 PM, Reinder de Haan r...@mveas.com wrote: Hallo, C. Scott Ananian wrote: snip A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott measured on a B1 XO1 laptop (where the leds and the series resistor are wired in parallel it seam) : almost dark: 0mv ~3meter away from a 8w PL; bare led: ~2mv ~50 cm below ~25W halogen desk lamp; bare led: ~40mv bright white led directly on bare led ~200mv bright white led directly on light guide of the bat.led (lcd side) ~50mv ~50 cm below ~25w halogen desk lamp (~75* angle to the axis of the light guide) ~5mv i measure this between GND of the laptop the led side of the series resistor. all leds seam to be about the same.. i did not compare the different light guides. the main battery and DC power where removed, the RTC baterry was still in place. the meter i measured this with was fixed in the 2000mv range and was abou 10Mohm when i connected it to another meter in resistance mode; the (volt) meter read 250mv at that time. adding a 10Mohm resistor across the meter halved the ~50 cm below ~25W halogen desk lamp; bare led: ~40mv reading to ~20mv strangely enough when i add that resistor in series the meter said ~60mv so voltage on the leds must have been ~120mv? i will have to investigate this at a later time... if you want more measurement doen feel free to ask.. i also have a XO1 (production model ?C1?) that i could measure. i dont have a lux meter :-( Greetings, Reinder ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On Tue, May 5, 2009 at 8:34 PM, John Watlington w...@laptop.org wrote: On May 5, 2009, at 6:44 PM, Rafael Enrique Ortiz Guerrero wrote: These measurements are really cool. But the question remains in whether the ADC could have a resolution of 1mv?, i mean in light of these measurements is necessary to have an ADC that can reliable sense these variations and then with that basis have a transfer function and add it to the algorithm. Absolutely not. The A/D is eight bits, with an input range spanning 0 - 3.3V, so the best you can hope for is about 13 mV per LSB. I would guess actual accuracy to be closer to 26 mV. But why do you say you would need 1 mV accuracy ? Bright sunlight is far stronger than the light sources he used. i don't know if the measurements at sunlight would show the same variations.. we would have to make new measurements, but for experience, the variations of voltage regarding light sensing are not of considerable amounts, so if the accuracy is 26mv, we would have to see if a perceptible change in ambient light could be of a higher magnitude than 26mv, if not the accuracy could be lost.. (haven't checked the specs though..) Having the data sheet for the EC controller doesn't help --- 8 bits and recommended operating voltage for the analog reference voltage is about all it provides. I had to ask a chinese speaker to call the app. engineer to find out the input impedance... Ok, thanks :). On Tue, May 5, 2009 at 3:24 PM, Reinder de Haan r...@mveas.com wrote: Hallo, C. Scott Ananian wrote: snip A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott measured on a B1 XO1 laptop (where the leds and the series resistor are wired in parallel it seam) : almost dark: 0mv ~3meter away from a 8w PL; bare led: ~2mv ~50 cm below ~25W halogen desk lamp; bare led: ~40mv bright white led directly on bare led ~200mv bright white led directly on light guide of the bat.led (lcd side) ~50mv ~50 cm below ~25w halogen desk lamp (~75* angle to the axis of the light guide) ~5mv i measure this between GND of the laptop the led side of the series resistor. all leds seam to be about the same.. i did not compare the different light guides. the main battery and DC power where removed, the RTC baterry was still in place. the meter i measured this with was fixed in the 2000mv range and was abou 10Mohm when i connected it to another meter in resistance mode; the (volt) meter read 250mv at that time. adding a 10Mohm resistor across the meter halved the ~50 cm below ~25W halogen desk lamp; bare led: ~40mv reading to ~20mv strangely enough when i add that resistor in series the meter said ~60mv so voltage on the leds must have been ~120mv? i will have to investigate this at a later time... if you want more measurement doen feel free to ask.. i also have a XO1 (production model ?C1?) that i could measure. i dont have a lux meter :-( Greetings, Reinder ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
we had a dedicated light sensor on the last product i worked on (which, in retrospect, given that it had 15 watts (!) of backlight seems like maybe the wrong place to have started trying to save power ;-). i implemented a proof-of-concept algorithm for automatic control, but found it a little weird -- it always felt like there was something wrong with the backlight as it shifted up and down in brightness, even with a fair amount of averaging and/or delay. plus we never resolved how it should interact with the actual brightness buttons. after all, if you adjust manually, you're probably unhappy with the setting that was chosen automatically. so should manual control abort any automatic algorithm? or maybe the buttons should tune the algorithm? how? The ALS on the Dell Latitude notebooks have either an auto setting (activated using FN + Left Arrow) and Brightness Up and Down (FN + Up or Down). When you manually adjust the brightness it disables the ABL until you re-enable it. Peter ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On Sat, May 2, 2009 at 8:38 AM, p...@laptop.org wrote: By the way, has anyone really thought about this feature ? I grok the intent, but you have to make sure that kids who happen to be in brightly lit rooms (glaring fluourescents aren't uncommon) don't loose their backlight, and wonder why ? The keyboard lighting on my mac is a good idea, but they only allow adjusting the amount of light output, not the sensitivity to ambient light. My suggestion would be binary on/off control, with the level set high enough that you will be very certain that you are outside on a sunny day. I'm personally not interested in trying to say a few watts in marginal lighting conditions -- just that the kid who's outside all day in the full sunshine using their laptop -- and who can't tell that the backlight is on anyway, since the sunlight's so bright -- isn't held responsible for turning off something they can't see. --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On Fri, May 1, 2009 at 11:59 PM, John Watlington w...@laptop.org wrote: Oh, yeah, you should be able to wire the top side of the LED directly to the LED and measure the photovoltaic current directly; that's not patented: battery voltage Q1 | ---from EC--| _ to A/D | LED V | GND The only question is whether the LED can put out enough photovoltaic current to be reliably measured by the A/D. Ahh, therein lies the challenge! Depends on what the input to the A/D looks like, how much capacitance it sees, etc. Thought the KB3700 (EC) A/D datasheet frustratingly doesn't list any such exotic parameter as input impedance, I asked ENE and they said that the input was high impedance CMOS (think a MOSFET gate, in the wee, wee microamps). The impedance also does not vary (even though the A/D is muxed). Hm.. What's the input voltage range -- ie, how small can it be? Even in full brightness, you're not going to see more than the LED's forward voltage drop -- which admittedly can be up in the 2 volt range, depending on your color, but you really want to be working well below the forward voltage drop, so that the self-discharge current through the LED isn't significant. See http://en.wikipedia.org/wiki/Solar_cell#Equivalent_circuit_of_a_solar_cell At low voltage, I_D will be small, and assuming infinite input impedance, I will be zero, so your sensitivity is set by R_SH, the equivalent shunt resistance of the LED (where you want R_SH as high as possible). Sorry, no parts count increases allowed except for one LED, resistors, capacitors (basically free), and maybe one transistor, diode, or NMOS MOSFET (about a penny). I will throw in a couple of EC digital outputs, and a day of Richard's time in EC code. Really, the easiest way to do this is just to run a wire from the positive side of the LED to the A/D, set the A/D reference voltage as low as possible, and then take it out into the sun and measure what you've got. If you generate measurable voltage at too dim a light level, it's easy to add a shunt resistor (although you'll probably want to switch the shunt resistor in only when the LED is off), but to get more voltage... I think you could probably add a capacitor in parallel to the LED to integrate the photocurrent over time to generate higher voltage, but bottom-line your A/D has to be comfortable with voltages around the voltage drop of the LED, since you'll never generate more than that. Your maximum voltage even with the paralleled capacitor will be limited by the self-discharge through the diode; again, it should be straightforward to put a low ESR cap of a few nF in parallel, take it outside, and see what voltage you generate. A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On Tue, 5 May 2009, C. Scott Ananian wrote: On Fri, May 1, 2009 at 11:59 PM, John Watlington w...@laptop.org wrote: Oh, yeah, you should be able to wire the top side of the LED directly to the LED and measure the photovoltaic current directly; that's not patented: battery voltage Q1 | ---from EC--| _ to A/D | LED V | GND The only question is whether the LED can put out enough photovoltaic current to be reliably measured by the A/D. Ahh, therein lies the challenge! Depends on what the input to the A/D looks like, how much capacitance it sees, etc. Thought the KB3700 (EC) A/D datasheet frustratingly doesn't list any such exotic parameter as input impedance, I asked ENE and they said that the input was high impedance CMOS (think a MOSFET gate, in the wee, wee microamps). The impedance also does not vary (even though the A/D is muxed). Hm.. What's the input voltage range -- ie, how small can it be? Even in full brightness, you're not going to see more than the LED's forward voltage drop -- which admittedly can be up in the 2 volt range, depending on your color, but you really want to be working well below the forward voltage drop, so that the self-discharge current through the LED isn't significant. See http://en.wikipedia.org/wiki/Solar_cell#Equivalent_circuit_of_a_solar_cell At low voltage, I_D will be small, and assuming infinite input impedance, I will be zero, so your sensitivity is set by R_SH, the equivalent shunt resistance of the LED (where you want R_SH as high as possible). Sorry, no parts count increases allowed except for one LED, resistors, capacitors (basically free), and maybe one transistor, diode, or NMOS MOSFET (about a penny). I will throw in a couple of EC digital outputs, and a day of Richard's time in EC code. Really, the easiest way to do this is just to run a wire from the positive side of the LED to the A/D, set the A/D reference voltage as low as possible, and then take it out into the sun and measure what you've got. If you generate measurable voltage at too dim a light level, it's easy to add a shunt resistor (although you'll probably want to switch the shunt resistor in only when the LED is off), but to get more voltage... I think you could probably add a capacitor in parallel to the LED to integrate the photocurrent over time to generate higher voltage, but bottom-line your A/D has to be comfortable with voltages around the voltage drop of the LED, since you'll never generate more than that. Your maximum voltage even with the paralleled capacitor will be limited by the self-discharge through the diode; again, it should be straightforward to put a low ESR cap of a few nF in parallel, take it outside, and see what voltage you generate. A last resort would be hooking up a MOSFET as a simple amplifier -- again, you're not worried about linearity or any such niceties, but you'd still need a good match for your MOSFET's threshold voltage... some real measurements to replace the WAGes would go a long way. this sounds far more complicated, and far more expensive (in parts) than the initial proposal to reverse bias the LED and then run a loop to see how long it takes for the leakage current to switch the low side to a high. if you are just looking for the on-off (like you describe above), you don't even need to do a busy loop. do a calibration at some point, then reverse bias the LED, come back at a calculated time later and see if the pin is high or not. if it is, you are in bright light and can turn off the backlight. David Lang___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
john wrote: By the way, has anyone really thought about this feature ? I grok the intent, but you have to make sure that kids who happen to be in brightly lit rooms (glaring fluourescents aren't uncommon) don't loose their backlight, and wonder why ? The keyboard lighting on my mac is a good idea, but they only allow adjusting the amount of light output, not the sensitivity to ambient light. i've been wondering about usage, as well. we had a dedicated light sensor on the last product i worked on (which, in retrospect, given that it had 15 watts (!) of backlight seems like maybe the wrong place to have started trying to save power ;-). i implemented a proof-of-concept algorithm for automatic control, but found it a little weird -- it always felt like there was something wrong with the backlight as it shifted up and down in brightness, even with a fair amount of averaging and/or delay. plus we never resolved how it should interact with the actual brightness buttons. after all, if you adjust manually, you're probably unhappy with the setting that was chosen automatically. so should manual control abort any automatic algorithm? or maybe the buttons should tune the algorithm? how? i'm suspect there are answers to all of these, but one of the feature's champions should be thinking about it... (in the end we never finished or released the photosensor support, because it turned out the usage pattern of the device (an automotive diagnostic tool) meant it was almost always fully powered, either from the wall or the vehicle it was troubleshooting.) paul =- paul fox, p...@laptop.org ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On Tue, Apr 28, 2009 at 8:38 PM, John Watlington w...@laptop.org wrote: I don't have time to take a look at this right now, but we have a A/D input to dedicate to this, if it helps work around the patent. We can talk to MERL if needed. I probably still know a handfull of people around there. Oh, yeah, you should be able to wire the top side of the LED directly to the LED and measure the photovoltaic current directly; that's not patented: battery voltage Q1 | ---from EC--| _ to A/D | LED *V* | GND The only question is whether the LED can put out enough photovoltaic current to be reliably measured by the A/D. Depends on what the input to the A/D looks like, how much capacitance it sees, etc. An ultralow power versoin of the 339 could fix any problems there, but then your parts count increases. You don't *have* to reverse-bias the LED; that just enhances sensitivity, but distinguishing between outside on a sunny day and inside doesn't exactly require precision; there's at least an order of magnitude change in illumination, maybe 2 (http://en.wikipedia.org/wiki/Lux). --scott -- ( http://cscott.net/ ) ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On Fri, May 1, 2009 at 2:28 PM, C. Scott Ananian csc...@laptop.org wrote: Oh, yeah, you should be able to wire the top side of the LED directly to the LED and measure the photovoltaic current directly; that's not patented: battery voltage Q1 | ---from EC--| _ to A/D | LED *V* | GND The only question is whether the LED can put out enough photovoltaic current to be reliably measured by the A/D. Depends on what the input to the A/D looks like, how much capacitance it sees, etc. An ultralow power versoin of the 339 could fix any problems there, but then your parts count increases. You don't *have* to reverse-bias the LED; that just enhances sensitivity, but distinguishing between outside on a sunny day and inside doesn't exactly require precision; there's at least an order of magnitude change in illumination, maybe 2 ( http://en.wikipedia.org/wiki/Lux). A reverse biased LED doesn't output much current at all - even photo sensor diodes that are tuned for the job. Have a look at this page for some ambient light sensors that you would find in a cell phone - http://www.avagotech.com/pages/en/optical_sensors/ambient_light_photo_sensors/light_sensor_photo_sensor/. The basic variety has a photodiode and a small current amplifier. The output current is logarithmically related to the lux level. If hook a series resistor to the output, the voltage across vs lux is also logarithmic. Besides the current amplifier, these devices have other advantages. First, they have a spectral sensitivity that's tuned to the human eye, so infrared light (say a campfire) will not skew the reading. Second, they have a large optical window so the readings won't change when you tilt your phone/laptop slightly. These little sensors are less than $0.25 in large quantities (perhaps by quite a bit), and they are being used more and more in cell phones to reduce backlight power in low light environments. It's well worth the price if you get 10% more battery life on average. Quantifying the impact on battery life is tricky because there are a lot of assumptions. Anyways, a normal LED might work under certain circumstances. I don't have the experience to say one way or another. Thanks, Nate ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
On May 1, 2009, at 2:28 PM, C. Scott Ananian wrote: On Tue, Apr 28, 2009 at 8:38 PM, John Watlington w...@laptop.org wrote: I don't have time to take a look at this right now, but we have a A/D input to dedicate to this, if it helps work around the patent. We can talk to MERL if needed. I probably still know a handfull of people around there. Oh, yeah, you should be able to wire the top side of the LED directly to the LED and measure the photovoltaic current directly; that's not patented: battery voltage Q1 | ---from EC--| _ to A/D | LED V | GND The only question is whether the LED can put out enough photovoltaic current to be reliably measured by the A/D. Ahh, therein lies the challenge! Depends on what the input to the A/D looks like, how much capacitance it sees, etc. Thought the KB3700 (EC) A/D datasheet frustratingly doesn't list any such exotic parameter as input impedance, I asked ENE and they said that the input was high impedance CMOS (think a MOSFET gate, in the wee, wee microamps). The impedance also does not vary (even though the A/D is muxed). An ultralow power versoin of the 339 could fix any problems there, but then your parts count increases. Sorry, no parts count increases allowed except for one LED, resistors, capacitors (basically free), and maybe one transistor, diode, or NMOS MOSFET (about a penny). I will throw in a couple of EC digital outputs, and a day of Richard's time in EC code. You don't *have* to reverse-bias the LED; that just enhances sensitivity, but distinguishing between outside on a sunny day and inside doesn't exactly require precision; there's at least an order of magnitude change in illumination, maybe 2 (http://en.wikipedia.org/ wiki/Lux). I haven't read the patent, but the advantage to a digitally controlled time integration A/D has always been a high dynamic range by changing the time scale. I'll let the community suggest this circuit/algorithm. Someone practiced in the arts might suggest measuring the integration of the reverse leakage current over time, using a digital output to clear the integrator, allowing software to control the time period over which the current is integrated to increase the range. In response to earlier mails on this topic: the microphone/camera LEDs are inviolate. ( Ivan got this one right! ) I will not allow software interference with those LEDs. The power savings resulting from switching the LEDs was significant in Gen 1 (on the order of 50 mW in run/suspend). Even after adding this feature, it will have to be integrated into Ohm and the Control Panel before being useful in power savings. By the way, has anyone really thought about this feature ? I grok the intent, but you have to make sure that kids who happen to be in brightly lit rooms (glaring fluourescents aren't uncommon) don't loose their backlight, and wonder why ? The keyboard lighting on my mac is a good idea, but they only allow adjusting the amount of light output, not the sensitivity to ambient light. And the Mac's light sensor is annoyingly placed where hand movement during typing may occlude it, something we should be able to avoid... The light pipes for most LEDs, however, are quite large. I believe that a second LED could be positioned next to an output LED, under a light pipe. Perhaps the battery LED is the best candidate, since it is usually not lit when operating from the battery. Cheers, wad ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Ambient light sensing via LED response
The back-bias voltage is a sensitive topic. If you could guarantee periodic clearing of the integrator, I could provide up to 10V or so. Otherwise, it should probably be limited to +3.3V. wad On May 1, 2009, at 11:59 PM, John Watlington wrote: On May 1, 2009, at 2:28 PM, C. Scott Ananian wrote: On Tue, Apr 28, 2009 at 8:38 PM, John Watlington w...@laptop.org wrote: I don't have time to take a look at this right now, but we have a A/D input to dedicate to this, if it helps work around the patent. We can talk to MERL if needed. I probably still know a handfull of people around there. Oh, yeah, you should be able to wire the top side of the LED directly to the LED and measure the photovoltaic current directly; that's not patented: battery voltage Q1 | ---from EC--| _ to A/D | LED V | GND The only question is whether the LED can put out enough photovoltaic current to be reliably measured by the A/D. Ahh, therein lies the challenge! Depends on what the input to the A/D looks like, how much capacitance it sees, etc. Thought the KB3700 (EC) A/D datasheet frustratingly doesn't list any such exotic parameter as input impedance, I asked ENE and they said that the input was high impedance CMOS (think a MOSFET gate, in the wee, wee microamps). The impedance also does not vary (even though the A/D is muxed). An ultralow power versoin of the 339 could fix any problems there, but then your parts count increases. Sorry, no parts count increases allowed except for one LED, resistors, capacitors (basically free), and maybe one transistor, diode, or NMOS MOSFET (about a penny). I will throw in a couple of EC digital outputs, and a day of Richard's time in EC code. You don't *have* to reverse-bias the LED; that just enhances sensitivity, but distinguishing between outside on a sunny day and inside doesn't exactly require precision; there's at least an order of magnitude change in illumination, maybe 2 (http://en.wikipedia.org/ wiki/Lux). I haven't read the patent, but the advantage to a digitally controlled time integration A/D has always been a high dynamic range by changing the time scale. I'll let the community suggest this circuit/algorithm. Someone practiced in the arts might suggest measuring the integration of the reverse leakage current over time, using a digital output to clear the integrator, allowing software to control the time period over which the current is integrated to increase the range. In response to earlier mails on this topic: the microphone/camera LEDs are inviolate. ( Ivan got this one right! ) I will not allow software interference with those LEDs. The power savings resulting from switching the LEDs was significant in Gen 1 (on the order of 50 mW in run/suspend). Even after adding this feature, it will have to be integrated into Ohm and the Control Panel before being useful in power savings. By the way, has anyone really thought about this feature ? I grok the intent, but you have to make sure that kids who happen to be in brightly lit rooms (glaring fluourescents aren't uncommon) don't loose their backlight, and wonder why ? The keyboard lighting on my mac is a good idea, but they only allow adjusting the amount of light output, not the sensitivity to ambient light. And the Mac's light sensor is annoyingly placed where hand movement during typing may occlude it, something we should be able to avoid... The light pipes for most LEDs, however, are quite large. I believe that a second LED could be positioned next to an output LED, under a light pipe. Perhaps the battery LED is the best candidate, since it is usually not lit when operating from the battery. Cheers, wad ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel