User Tools

Site Tools


eeng:topics:photocells:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eeng:topics:photocells:start [2022/10/17 11:32] – [Photocells / Light Dependent Resistors (LDR)] rolfeeng:topics:photocells:start [2023/11/22 01:07] (current) – [About LDR] rolf
Line 1: Line 1:
 ====== Photocells / Light Dependent Resistors (LDR) ====== ====== Photocells / Light Dependent Resistors (LDR) ======
  
 +===== Lecture Slides =====
  
-| {{https://cdn.sparkfun.com//assets/parts/2/4/6/2/09088-02-L.jpg?300&direct}} | +  * {{ :eeng:topics:photocells:ldr_2022-09-22_v001_rb.pdf |}} 
-| Fig.: A cadmium sulfide (CdS) photocell. (Source: [[https://www.sparkfun.com/products/9088|SparkFun]]) |+ 
 +===== About LDR ===== 
 + 
 +| {{https://cdn.sparkfun.com//assets/parts/2/4/6/2/09088-02-L.jpg?200}} | 
 +| Fig.: A cadmium sulfide (CdS) photocell. \\ (Source: [[https://www.sparkfun.com/products/9088|SparkFun]]) |
  
 "The cadmium sulfide (CdS) or light dependent resistor (LDR) whose resistance is inversly dependent "The cadmium sulfide (CdS) or light dependent resistor (LDR) whose resistance is inversly dependent
Line 13: Line 18:
   - {{https://resources.perkinelmer.com/corporate/cmsresources/images/dts_photocellsa9050.pdf|Photocells A 9050, A 9060}}.   - {{https://resources.perkinelmer.com/corporate/cmsresources/images/dts_photocellsa9050.pdf|Photocells A 9050, A 9060}}.
  
-=== High Variability ===+ 
 + 
 +==== Large Variance among specimen of the same product series ==== 
 + 
 +The GL5528 datasheet from Sparkfun illustrates the broad performance variety between LDR of the same type: 
 + 
 +  * :!: https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/SEN-09088.pdf 
 + 
 +==== LUX ==== 
 + 
 +The light "intensity" illuminating the photocell is measured in **Lux**. This unit takes not just the physical light quantity but also the sensitivity of the human eye into account. It combines physics with physiology.  
 + 
 + 
 +"The lux (symbol: lx) is the **unit of illuminance, or luminous flux per unit area,** in the International System of Units (SI). It is equal to one lumen per square metre. In photometry, this is used as a measure of the intensity, as perceived by the human eye, of light that hits or passes through a surface. It is analogous to the radiometric unit watt per square metre, but with the power at each wavelength weighted according to the luminosity function, a standardized model of human visual brightness perception. In English, "lux" is used as both the singular and plural form." (from [[https://en.wikipedia.org/wiki/Lux|Wikipedia]]) 
 + 
 + 
 + 
 +==== High Performance Variability ====
  
 Do not trust the resistance-vs-lux curves too much. Adafruit states on its tutorial on Photocells for Arduino: Do not trust the resistance-vs-lux curves too much. Adafruit states on its tutorial on Photocells for Arduino:
Line 20: Line 42:
  
 | {{https://cdn.sparkfun.com/assets/learn_tutorials/5/1/2/illuminance-vs-resistance.png?400&direct}} | | {{https://cdn.sparkfun.com/assets/learn_tutorials/5/1/2/illuminance-vs-resistance.png?400&direct}} |
-| Fig.: Typical performance variation of photocells (log-log-plot). \\ (Source: [[http://cdn.sparkfun.com/datasheets/Sensors/LightImaging/SEN-09088.pdf|GL 5528 Photodetector by SparkFun)]] | +| Fig.: Typical performance variation of photocells of the same type (log-log-plot). \\ (Source: [[http://cdn.sparkfun.com/datasheets/Sensors/LightImaging/SEN-09088.pdf|GL 5528 Photodetector by SparkFun)]] | 
  
 The [[http://cdn.sparkfun.com/datasheets/Sensors/LightImaging/SEN-09088.pdf|datasheet]] on GL5528 Photocell by **SparkFun** reflects these uncertainties. The [[http://cdn.sparkfun.com/datasheets/Sensors/LightImaging/SEN-09088.pdf|datasheet]] on GL5528 Photocell by **SparkFun** reflects these uncertainties.
-=== LUX === 
  
-The light "intensity" illuminating the photocell is measured in **Lux**. This unit takes not just the physical light quantity but also the sensitivity of the human eye into account. It combines physics with physiology.  
  
 +===== LDR Voltage Divider Experiment with Arduino =====
 +
 +| {{ :eeng:topics:photocells:ldr_arduino_schematic_v001.png?direct&400 |}} |
 +| Fig.: Schematic. |
 +
 +| {{ :eeng:topics:photocells:ldr_arduino_breadboard_v001.png?direct&400 |}} |
 +| Fig.: Breadboard view. |
 +===== Arduino Code: ADC to Serial =====
 +
 +<code c++ LDR_V001.ino>
 +
 +/*
 + * Voltage divider with LDR 
 + 
 + * Circuit:
 + * 5V (Vcc) - LDR - R1 - GND
 + * The node between LDR and R1 (V1, voltage drop across R1) is connected to analog input A0
 + * R1 arbitrary, e.g. 10kOhms
 + 
 + * The voltage V1 is converted to a digital number (dn) by means of an analog-to-digital converter (ADC).
 + * The range of dn: 0 <= dn <= 1023 (10 bit resolution)
 + 
 + * Conversion:
 + * V1 = 0V -> dn = 0
 + * V1 = 5V -> dn = 1023
 + 
 + * Reconstruction of voltage from digital number:
 + * V = dn / 1023 * 5V
 + 
 + */
  
-"The lux (symbol: lx) is the unit of illuminance, or luminous flux per unit area, in the International System of Units (SI).[1][2] It is equal to one lumen per square metre. In photometry, this is used as a measure of the intensity, as perceived by the human eye, of light that hits or passes through a surface. It is analogous to the radiometric unit watt per square metre, but with the power at each wavelength weighted according to the luminosity function, a standardized model of human visual brightness perception. In English, "lux" is used as both the singular and plural form." (from [[https://en.wikipedia.org/wiki/Lux|Wikipedia]])+int AIN = A0; // Analog input pin number 
  
 +void setup() {
 +  // put your setup code here, to run once:
 +  Serial.begin(115200);
 +  Serial.println("dn  V  mV");
 +}
  
 +void loop() {
 +  // put your main code here, to run repeatedly:
 +  
 +  int  dn = analogRead(AIN); // digital integer number between 0 and 1023 (10 bits, 2^10 different values)
 +  float V = (float)dn / 1024 * 5.0; // convert dn to float first, then divide by 1024
 +  int  mV = V*1000; // millivolts, converted from float
 +  
 +  Serial.print(dn);    // print to serial without a newline at the end, i.e. the next print is in the same line
 +  Serial.print("  ");  // spaces
 +  Serial.print(V);    
 +  Serial.print("  ");
 +  Serial.println(mV);  // last print with newline, i.e. the next print will be in the next line.
 +  
 +  delay(100); // pause in ms, 100 ms means 10 meas / sec.
 +}
  
 +</code>
  
  
  
  
eeng/topics/photocells/start.1666006339.txt.gz · Last modified: 2022/10/17 11:32 by rolf