Ligne 134 : | Ligne 134 : | ||
[[Catégorie:technique]] | [[Catégorie:technique]] | ||
[[Catégorie:électrokids]] | [[Catégorie:électrokids]] | ||
+ | [[Catégorie:traduire]] | ||
+ | [[Catégorie:grove]] |
Sommaire |
This module is based on the I2C light-to-digital converter TSL2561 to transform light intensity to a digital signal. Different from traditional analog light sensor, as Grove - Light Sensor, this digital module features a selectable light spectrum range due to its dual light sensitive diodes: infrared and full spectrum.
You can switch among three detection modes to take your readings. They are infrared mode, full spectrum and human visible mode. When running under the human visible mode, this sensor will give you readings just close to your eye feelings.
Items | Min Type Max | Unit |
---|---|---|
Supply voltage, VDD | 3.3 5 5.1 | V |
Operating temperature | -30 \ 70 | ℃ |
SCL,SDA input low voltage | -0.5 \ 0.8 | V |
SCL,SDA input high voltage | 2.3 \ 5.1 | V |
U1: TSL2561 IC, Light-To-Digital Converter.
U3: XC6206MR332 IC, Positive Voltage Regulators.
Q1,Q2: BSN20 IC, N-channel Enhancement Mode Vertical D-MOS Transistor.
SCL,SDA: I2C Signal Interface
1. Plug the Grove - Digital Light Sensor onto the I2C port on Grove - Base Shield, and then plug the base shield onto Arduino;
2. Download the library file:Digital Light Sensor Library;
3. Unzip it into the libraries file of Arduino IDE by the path: ..\arduino-1.0.1\libraries.
4. Create an Arduino sketch and paste the following codes to it or open the code directly by the path:File -> Example ->Digital_Light_Sensor->Digital_Light_Sensor.
/* Digital Light sensor demo V1.0 * Connect the sensor to I2C port of Arduino to use. * * By:http://www.seeedstudio.com */ #include <Wire.h> #include <Digital_Light_TSL2561.h> void setup() { Wire.begin(); Serial.begin(9600); TSL2561.init(); } void loop() { unsigned long Lux; TSL2561.getLux(); Serial.print("The Light value is: "); Serial.println(TSL2561.calculateLux(0,0,1)); delay(1000); }
5. Upload the code. Please click here if you do not know how to upload.
6. Open the serial monitor to see the result.
In the case of completely light matte, The output result is 0.
The TSL2561 is controlled and monitored by sixteen registers (three are reserved) and a command register accessed through the serial interface. These registers provide for a variety of control functions and can be read to determine results of the ADC conversions. The register set is summarized as show below.
Two channels of the digital light sensor have different response characteristic. That's why you can choose its working mode by having both of them on or one of them off.
Revision | Descriptions | Release |
---|---|---|
Grove - Digit light sensor v0.9b | Initial public release for Grove module |
Grove - Digital Light Sensor Eagle File
Grove - Digital Light Sensor Schematic
CalculateLux Library File
TSL2561 Datasheet
If you have questions or other better design ideas, you can go to our forum or wish to discuss.
Cette page est la traduction de celle-ci : http://www.seeedstudio.com/wiki/Grove_-_Digital_Light_Sensor
Traducteurs : machine et bidule - 2013 dans le cadre de Master 2 rédacteur traducteur 2013
© Graphisme : Les Petits Débrouillards Grand Ouest (Patrice Guinche - Jessica Romero) | Développement web : Libre Informatique