Difference between revisions of "Light sensor"

From ElectroDragon
Jump to: navigation, search
(Guide)
(Schematic, Pin Definition)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Schematic ==
+
== Schematic, Pin Definition ==
 
<gallery>
 
<gallery>
File:Photoresistor Light-Sensitive Module.png| CdS 5528 photocell schematic breakout
+
File:Photoresistor Light-Sensitive Module.png| CdS 5528 photocell
 +
File:BH1750_sch.png | BH1750 schematic
 +
File:Bh1750-02.jpg | BH1750 02 schematic
 
File:GY2561_sch.JPG | TSL2561 schematic
 
File:GY2561_sch.JPG | TSL2561 schematic
 +
File:Specification GY30.jpg | BH1750 Pin Definition
 
</gallery>
 
</gallery>
=== Arduino Demo Code BH1750 ===
 
* See pin difinition on left image
 
[[File:Specification GY30.jpg|thumbnail]]
 
<syntaxhighlight lang="Arduino">
 
#include <Wire.h> //IIC
 
#include <math.h>
 
 
int BH1750address = 0x23;
 
byte buff[2];
 
 
void setup()
 
{
 
  Wire.begin();
 
  Serial.begin(9600);
 
}
 
 
void loop()
 
 
{
 
int i;
 
uint16_t val=0;
 
BH1750_Init(BH1750address);
 
delay(200);
 
 
if(2==BH1750_Read(BH1750address))
 
  {
 
  val=((buff[0]<<8)|buff[1])/1.2;
 
  Serial.print(val,DEC);   
 
  Serial.println("[lx]");
 
  }
 
delay(150);
 
}
 
 
 
int BH1750_Read(int address) //
 
{
 
  int i=0;
 
  Wire.beginTransmission(address);
 
  Wire.requestFrom(address, 2);
 
  while(Wire.available()) //
 
  {
 
    buff[i] = Wire.receive();  // receive one byte
 
    i++;
 
  }
 
  Wire.endTransmission(); 
 
  return i;
 
}
 
 
void BH1750_Init(int address)
 
{
 
  Wire.beginTransmission(address);
 
  Wire.send(0x10);//1lx reolution 120ms
 
  Wire.endTransmission();
 
}
 
</syntaxhighlight>
 
  
 
== Guide ==
 
== Guide ==
Line 75: Line 23:
 
|}
 
|}
  
* TEMT6000
+
== TEMT6000 ==
Wide angle of half sensitivity ϕ = ± 60°
+
*Wide angle of half sensitivity ϕ = ± 60°
Adapted to human eye responsivity
+
* Adapted to human eye responsivity
Wavelength of Peak Sensitivity 570 nm
+
* Wavelength of Peak Sensitivity 570 nm
 +
 
 +
== ADS9960 9930 ==
 +
{| class="wikitable sortable"
 +
|-
 +
! Sensor !! ALS (Ambient light sense) !! Proximity Detector !!  Gesture Sensing (IR) !! RGB Color Sensing
 +
|-
 +
| APDS-9930 || √ || √ 10cm ||    || 
 +
|-
 +
| APDS-9930 || √ || √ || √ || √ complex
 +
 
 +
|}
  
== Documents ==
+
== Documents ==
 
BH1750
 
BH1750
 
* [http://www.youtube.com/watch?v=Iv0oTxw-L3c BH1750 demo video]
 
* [http://www.youtube.com/watch?v=Iv0oTxw-L3c BH1750 demo video]
Line 91: Line 50:
 
5528
 
5528
 
* [[:File:SEN-09088-datasheet.pdf|5528 Photoresistive Sensor]]
 
* [[:File:SEN-09088-datasheet.pdf|5528 Photoresistive Sensor]]
 +
TEMT6000
 +
* Datasheet [[File:TEMT6000.pdf]]
 +
APDS9301, 9960
 +
* [[:File:Apds9301.zip|Apds9301.zip]]
 +
* [[:File:APDS9960.zip|APDS9960.zip]]
  
  
[[category:Sound, light, etc]]
+
[[category: Topics]] [[category:Sound, light, etc]] [[category: Proximity Sensor]]

Latest revision as of 15:24, 15 April 2018

Schematic, Pin Definition

Guide

  • Ambient light sensor
Header text Resolution ADC output
BH1750 1 - 65535 lx 16 bit digital
TSL2561 0.1 - 40,000+ 16 bit digital
TEMT6000 - -
CdS cell 5528 - -

TEMT6000

  • Wide angle of half sensitivity ϕ = ± 60°
  • Adapted to human eye responsivity
  • Wavelength of Peak Sensitivity 570 nm

ADS9960 9930

Sensor ALS (Ambient light sense) Proximity Detector Gesture Sensing (IR) RGB Color Sensing
APDS-9930 √ 10cm
APDS-9930 √ complex

Documents

BH1750

TSL2561

5528

TEMT6000

APDS9301, 9960