Hello!
Problems trying to use the Modern Device/Liquidware AMBI light sensor. It sounds great from the description,
but I don't see many examples using it successfully because of the log conversion needed.
Sorry if this has been discussed before, but the one thread I found in the old forums is incomplete
and the code snippets don't seem to work:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281333002/all
Here's the sensor datasheet:
with the relevant uA vs Lux graph attached.
So here's the sample code based on the thread last fall:
int ambipin=5;
void setup() {
Serial.begin(9600);
}
void loop() {
int voltage = analogRead(ambipin);
Serial.print(" AMBI voltage="); Serial.print(voltage);
float current = voltage * 3.3 / 1023.00; // 3.3V feeding sensor
Serial.print(" Current="); Serial.print(current);
float light = pow(10, current);
Serial.print(" Light="); Serial.println(light);
delay(3000);
}
BUT, notice the AMBI raw voltage bouncing on a well-lit workbench with a constant EV=9 (measured by a LunaPro meter) even with a 3 sec delay.
It should return constant values 0-1023 from 0-3.3V (not that using 5V made much difference)
AMBI voltage=12 Current=0.06 Light=1.14
AMBI voltage=25 Current=0.12 Light=1.32
AMBI voltage=12 Current=0.06 Light=1.14
AMBI voltage=20 Current=0.10 Light=1.25
AMBI voltage=21 Current=0.10 Light=1.27
AMBI voltage=4 Current=0.02 Light=1.05
AMBI voltage=15 Current=0.07 Light=1.18
AMBI voltage=12 Current=0.06 Light=1.14
Second, the current should be between 5 and 45 uA, so that's off, and so of course 10 exp current is off too.
Any thoughts?
Thanks.
Dan