1. Definition of photosensitive sensor ： Photosensitive sensor is also called photoelectric sensor , It uses photoelectric devices to convert optical signals into electrical signals （ voltage , electric current , Resistance, etc ） A kind of sensor .
2. Photosensitive resistor ： It is a kind of photoelectric device made of semiconductor material, which has no polarity and is sensitive to light .
2.1 Main parameters of photoresist ：
A Dark resistance and dark current ： Generally, the resistance value of photoresist when it is not irradiated by light is called dark resistance , The current flowing at this time is called dark current .
B Bright resistance and bright current ： Generally, the resistance value of photoresist when exposed to light is called bright resistance , The current flowing at this time is called bright current , The difference between the bright current and the dark current is called photocurrent .
2.2 The main characteristics of bright resistance ：
A Volt ampere characteristics ： Under certain light intensity , The voltage applied at both ends of the photoresist is positive to the current , The resistance value is only related to the incident light intensity of irradiation , It has nothing to do with adding current or voltage at both ends .
B Spectral characteristics ： Photoresistors are sensitive to light of different wavelengths , Its sensitivity is different , That is, the same photoresist has different frequency response to incident light of different wavelengths .
C Temperature characteristics ： The photoresist is greatly affected by temperature , When the temperature rises , His dark resistance and sensitivity decreased .
2.3 Working principle of photoresist ： The photoresist is connected in series into the circuit , Add appropriate voltage at both ends , When there is no light , The resistance is infinite , Proximity circuit breaker , When there is light, the resistance decreases , Current increase , Sufficient light intensity is equivalent to short circuit .
3. Photodiodes , The principle of photosensitive triode is similar ： There is light conduction , There is no light .
4. Simple application ：
4.1ADC Relationship with actual voltage value ：
A First determine ADC Use several digits to express , What is the maximum value . For example, a 8 Bit ADC, The maximum is 0xFF, Namely 255.
B Then determine the reference voltage value corresponding to the maximum value . Generally speaking, the maximum value corresponds to 3.3V.
C To calculate the voltage , Just take your ADC Divide the value by the maximum value just determined and multiply by the reference voltage value , for example
ADC The value is 0x80, The actual value is 0x80/(0xFF+1)*3.3V = 1.65V.
4.2 Software reading ： Judge directly in the software ADC Value read , for example ADC The maximum is 4000, Can be ADC Divide 400, Equal scale down to 0~10, stay 10 When reading ADC The maximum means that the greater the partial voltage at both ends of the photodiode , The darker the luminosity , Different gears can be classified between different ratios .