HiI have purchased several of these sensors and trying to build a sky light sensor. I'm using RPi.I would like to understand the Sensor better, what is the chip used in the SEN0390...
JaneYu 2021-05-01 07:06:02 113 Views13 Replies Hi
I have purchased several of these sensors and trying to build a sky light sensor. I'm using RPi.
I would like to understand the Sensor better, what is the chip used in the SEN0390 Ambient light sensor.
kind thanks
daniel
Can this sensor be used with DFRobot's FireBeetle 2 board using Arduino to program it?
JaneYu Hi, Can multiple SEN0390 sensors, be used on the same board?
JaneYu Hello, you can use this I2C multiplexer:
https://www.dfrobot.com/pro...
Sorry we only have sample code and library files about Arduino.
If you need to use Raspberry Pi to use this sensor, you can use Arduino shield for Raspberry with it.
https://www.dfrobot.com/pro...
JaneYu Was the photodiode recently changed in these sensors? I have ordered two, the second a few months after the first. They give different results and sensitivity in the same location outdoors.
The photodiodes visually appear different between the two sensors as well.
JaneYu I know I'm late and I haven't used the sensor and it seems there isn't a command but the wiki does claim that the 5th pin can be set Low to disable and High to enable. It appears there are 5 pins that connect it to your controller and 4 are the usual I2C gang of VCC GND Clock Data (though in a different order on this device apparently) but the 5th is an enable/disable pin. I haven't tested it to see if it works but I am considering ordering this and several others sensors for some testing at some point for a project.
JaneYu Hi, Could you please send us your revised code?
JaneYu Code used:#include <dfrobot_b_lux_v30b.h>
DFRobot_B_LUX_V30B myLux(0, 9, 8);
void SPrintZeroPadBin(uint8_t number) {
char binstr[]="00000000";
uint8_t i=0;
uint8_t n = number;
while(n>0 && i<8){
binstr[8-1-i]=n%2+'0';
++i;
n/=2;
}
Serial.println(binstr);
}
void setup() {
Serial.begin(9600);
myLux.begin();
bool ok = false;
while(!ok){
int result = myLux.setMode(myLux.eAutomatic,myLux.eCDR_0,myLux.eTime800ms);
Serial.print("result: ");
Serial.println(result);
ok = result == 1;
}
}
void loop() {
Serial.println("--------------");
Serial.print("Conf: ");
SPrintZeroPadBin(myLux.readMode());
Serial.print("Lux: ");
Serial.println(myLux.lightStrengthLux());
delay(2000);
}
This is the output of the serial monitor:
https://uploads.disquscdn.c...
The Config read from the readMode() function seems to be completely random. For example, according to the API's header file, bit 7 and 6 should always be 0 in Automatic mode.


