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
en:iot-open:hardware2:sensors_light [2023/06/29 17:18] โ€“ ktokarzen:iot-open:hardware2:sensors_light [2023/11/23 10:37] (current) โ€“ pczekalski
Line 1: Line 1:
-==== Light Sensors ====+====== Light Sensors ====== 
 +{{:en:iot-open:czapka_b.png?50| General audience classification icon }}{{:en:iot-open:czapka_e.png?50| General audience classification icon }}\\ 
 +== Photoresistor ==
  
-===Photoresistor=== +A photoresistor is a sensor that perceives light waves from the environment. The resistance of the photoresistor is changing depending on the intensity of light. The higher the intensity of the lightthe lower the sensor'resistance. A light level is determined by applying a constant voltage through the resistor to the sensorforming a voltage dividerand measuring the resulting voltage. Photoresistors are cheapbut the resistance is influenced by temperature and changes slowlyso they are used in applications where speed and accuracy are not crucial.\\ Photoresistors are often utilised in energy-effective street lighting control.\\ A symbol, sample photoresistor, and connection circuit are present in figures {{ref>phtoresistor1}}, {{ref>phtoresistor2}} and {{ref>phtoresistor3}}
- +\\ 
-A photoresistor is a sensor that perceives light waves from the environment. The resistance of the photoresistor is changing depending on the intensity of light. The higher the intensity of the lightthe lower the resistance of the sensor. A light level is determined by applying a constant voltage through the resistor to the sensor forming a voltage divider and measuring the resulting voltage. Photoresistors are cheap but the resulting resistance is influenced by temperature and changes slowly so they are used in applications where speed and accuracy are not crucial. Photoresistors are often used in energy-effective street lighting control. +<figure phtoresistor1
- +{{ :en:iot-open:hardware2:photoresistor.png?75 | Photoresistor symbol}} 
-<figure label+<caption>A photoresistor symbol</caption>
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photoresistor2.gif?75 | title}} +
-<caption>A photoresistor symbol.</caption>+
 </figure> </figure>
  
-<figure label+<figure phtoresistor2
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photoresistor_c.jpg?100 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photoresistor_c.jpg?100 | Photoresistor}} 
-<caption>A photoresistor.</caption>+<caption>A photoresistor</caption>
 </figure> </figure>
  
-<figure label+<figure phtoresistor3
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_photoresistor.png?200 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_photoresistor.png?200 | Arduino and photoresistor sensor schematics}} 
-<caption>Arduino and photoresistor sensor schematics.</caption>+<caption>Arduino and photoresistor sensor schematics</caption>
 </figure> </figure>
  
-An example code:+As shown in the figure {{ref>phtoresistor3}}, the photoresistor connected gives a lower voltage level while the light is more intense. Results can be read with the following example code. The value will be just a number not expressed in any units, e.g. Lux. To express light intensity in Luxes, additional calculations must be encoded in the program.
 <code c> <code c>
 //Define an analog A0 pin for photoresistor //Define an analog A0 pin for photoresistor
 int photoresistorPin = A0;  int photoresistorPin = A0; 
-//The analog reading from the photoresistor +//The analogue reading from the photoresistor 
 int photoresistorReading;   int photoresistorReading;  
  
Line 31: Line 31:
     //Begin serial communication     //Begin serial communication
     Serial.begin(9600);       Serial.begin(9600);  
-    //Initialize the analog pin of a photoresistor as an input+    //Initialise the analogue pin of a photoresistor as an input
     pinMode(photoresistorPin, INPUT);      pinMode(photoresistorPin, INPUT); 
 } }
Line 39: Line 39:
     //Read the value of the photoresistor     //Read the value of the photoresistor
     photoresistorReading = analogRead(photoresistorPin);      photoresistorReading = analogRead(photoresistorPin); 
-    //Print out value of the photoresistor reading to the serial monitor+    //Print out the value of the photoresistor reading to the serial monitor
     Serial.println(photoresistorReading);      Serial.println(photoresistorReading); 
     delay(10); //Short delay     delay(10); //Short delay
Line 45: Line 45:
 </code> </code>
  
-===Photodiode=== +== Photodiode == 
-A photodiode is a sensor that converts the light energy into electrical current. A current in the sensor is generated by exposing a p-n junction of a semiconductor to the light. Information about the light intensity can be determined by measuring a voltage level. Photodiodes are reacting to the changes in the light intensity very quickly. Solar cells are just large photodiodes. +A photodiode is a sensor that converts light energy into electrical current. A current in the sensor is generated by exposing a p-n junction of a semiconductor to the light. Information about the light intensity can be determined by measuring a voltage level. Photodiodes react to changes in light intensity very quickly, so they can be used as receivers of light-based data transmission systems (e.g. fibre data communication). Solar cells are just large photodiodes. A symbol, sample photodiode and connection circuit are present in figures {{ref>photodiode1}}, {{ref>photodiode2}} and {{ref>photodiode3}}.\\ 
- +Photodiodes are used as precise light-level sensors, receivers for remote control, electrical isolators (optocouplers), and proximity detectors. 
-Photodiodes are used as precise light level sensors, receivers for remote control, electrical isolators and proximity detectors. +\\ 
- +<figure photodiode1
-<figure label+{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photodiode_symbol.svg_.png?100 | Photodiode symbol}} 
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photodiode_symbol.svg_.png?100 | title}} +<caption>A photodiode symbol</caption>
-<caption>A photodiode symbol.</caption>+
 </figure> </figure>
  
-<figure label+<figure photodiode2
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photo_diode.jpg?100 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:photo_diode.jpg?100 | Photodiode}} 
-<caption>A photodiode.</caption>+<caption>A photodiode</caption>
 </figure> </figure>
  
-<figure label+<figure photodiode3
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_photodiode.png?200 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_photodiode.png?200 | Arduino and photodiode sensor schematics}} 
-<caption>Arduino and photodiode sensor schematics.</caption>+<caption>Arduino and photodiode sensor schematics</caption>
 </figure> </figure>
 +Although the photodiode can generate current, the schematic in figure {{ref>photodiode3}} shows its connection similar to the photoresistor in the previous example. In such a circuit, the photodiode changes its current according to a change in light intensity, resulting in the voltage change at the microcontroller's analogue input. As in the example for a photoresistor, the higher the light intensity, the lower the voltage.
 An example code: An example code:
 <code c> <code c>
 //Define an analog A0 pin for photodiode //Define an analog A0 pin for photodiode
 int photodiodePin = A0;   int photodiodePin = A0;  
-//The analog reading from the photodiode+//The analogue reading from the photodiode
 int photodiodeReading;   int photodiodeReading;  
  
Line 76: Line 75:
     //Begin serial communication     //Begin serial communication
     Serial.begin(9600);       Serial.begin(9600);  
-    //Initialize the analog pin of a photodiode as an input+    //Initialise the analogue pin of a photodiode as an input
     pinMode(photodiodePin, INPUT);      pinMode(photodiodePin, INPUT); 
 } }
Line 90: Line 89:
 </code> </code>
  
-===Phototransistor=== +== Phototransistor == 
-phototransistor is a light controlled electrical switch. In the exposed Base pin received light levelchanges the amount of currentthat can pass between two phototransistor pins โ€“ a collector and an emitter. A phototransistor is slower than the photodiodebut it can conduct more current. +The phototransistor is a typical bipolar transistor with a transparent enclosure that exposes the base-emitter junction to light. In a bipolar transistor, the current that passes through the collector and emitter depends on the base current. In the phototransistor, the collector-emitter current is controlled with light. A phototransistor is slower than photodiode but can conduct more current; additionally, it amplifies the incoming signalIn specific conditions, if the light is completely off or intense enough to make the output current maximal, a phototransistor can be considered a light-controlled electronic switch (e.g. in optocouplers, which are usually connected to digital inputs of the microcontroller and provide physical separation between devices).\\ 
- +Phototransistors are used as optical switches, proximity sensors and electrical isolators.\\ 
-Phototransistors are used as the optical switches, proximity sensors and electrical isolators. +A symbol, sample phototransistor device, and circuit are present in figures {{ref>phototransistor1}}, {{ref>phototransistor2}} and {{ref>phototransistor3}}. 
- +\\ 
-<figure label+<figure phototransistor1
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:phototrans.jpg?75 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:phototrans.jpg?75 | Phototransistor symbol}} 
-<caption>A phototransistor symbol.</caption>+<caption>A phototransistor symbol</caption>
 </figure> </figure>
  
-<figure label+<figure phototransistor2
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:phototransitor.jpg?100 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:phototransitor.jpg?100 | Phototransistor}} 
-<caption>An phototransistor.</caption>+<caption>An phototransistor</caption>
 </figure> </figure>
  
-<figure label+<figure phototransistor3
-{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_phototransistor.png?200 | title}} +{{ :en:iot-open:getting_familiar_with_your_hardware_rtu_itmo_sut:arduino_and_arduino_101_intel_curie:sch_apz_shemas_phototransistor.png?200 | Arduino and phototransistor schematics}} 
-<caption>Arduino and phototransistor schematics.</caption>+<caption>Arduino and phototransistor schematics</caption>
 </figure> </figure>
  
Line 114: Line 113:
 //Define an analog A1 pin for phototransistor //Define an analog A1 pin for phototransistor
 int phototransistorPin = A1;   int phototransistorPin = A1;  
-//The analog reading from the phototransistor+//The analogue reading from the phototransistor
 int phototransistorReading;   int phototransistorReading;  
  
Line 121: Line 120:
     //Begin serial communication     //Begin serial communication
     Serial.begin(9600);       Serial.begin(9600);  
-    //Initialize the analog pin of a phototransistor as an input+    //Initialise the analogue pin of a phototransistor as an input
     pinMode(phototransistorPin, INPUT);      pinMode(phototransistorPin, INPUT); 
 } }
en/iot-open/hardware2/sensors_light.1688059093.txt.gz ยท Last modified: 2023/06/29 14:18 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0