Phone

    00852-6915 1330

photoresistor Related Articles

Stay Ahead with Expert Electronics Insights,
Industry Trends, and Innovative Tips

Resistors

Photoresistor: Basics and Arduino Tutorial

I IntroductionSummary: A photoresistor, or light-dependent resistor (LDR), is a passive electronic component that decreases in resistance as light intensity increases. Driven by the expansion of IoT and smart home automation, the global photoresistor market is projected to reach $553.75 million by 2025. This guide covers LDR working principles, circuit diagrams, types, and step-by-step Arduino integration.Photoresistor or light-dependent resistor (abbreviated as LDR) or photoconductor is a special resistor made of semiconductor materials such as cadmium sulfide or cadmium selenide. Its working principle is based on the internal photoelectric effect. The stronger the light, the lower the resistance value. With the increase of the light intensity, the resistance value decreases rapidly, and the bright resistance value can be as small as 1KΩ or less. The photoresistor is very sensitive to light, and it shows a high resistance state when there is no light, and the dark resistance can generally reach 1.5MΩ.This article includes an overview of the basic information of the photoresistor and two Arduino tutorials for the photoresistor. The content is very comprehensive and detailed. You can choose the part you want to read or read the full text. We hope this article is helpful to you!II What is a Photoresistor?2.1 What is the Definition of a Photoresistor?A photoresistor (also known as a light-dependent resistor, LDR, or photo-conductive cell) is a passive electronic component that decreases its electrical resistance as the luminosity on its sensitive surface increases.2.2 What is the Symbol for a Photoresistor?The standard schematic symbols for a photoresistor are generally represented by the designators "RL", "RG", or "R", often accompanied by a resistor icon enclosed in a circle with incoming arrows indicating light. The following figure shows the schematic symbols of the photoresistor.Figure1. Photoresistor SymbolRecommended Reading: To learn more about Resistor Symbol.2.3 What is the Composition of a Photoresistor?(1) The structure of the photoresistorA photoresistor is primarily composed of a photosensitive semiconductor layer, a glass substrate or moisture-proof film, and comb-shaped ohmic electrodes.Figure2. The Structure of PhotoresistorMaterials for manufacturing photoresistorsThe materials used for manufacturing photoresistors are primarily semiconductors such as metal sulfides, selenides, and tellurides. Usually, coating, spraying, sintering and other methods are used to make a very thin photoresistor and comb-shaped ohmic electrode on the insulating substrate, and then the lead is taken out and encapsulated in a sealed housing with a light-transmitting mirror to prevent moisture from affecting its sensitivity.III How Does the Photoresistor Work?3.1 What is the Working Principle of Photoresistors?How does a photoresistor workThe working principle of a photoresistor is based entirely on the internal photoelectric effect, where incident light energy excites electrons into the conduction band, thereby lowering the component's electrical resistance.A voltage is applied to the metal electrodes at both ends of the photoresistor, and a current flows through it. When irradiated with light of a certain wavelength, the current will increase with the increase of light intensity, thereby achieving photoelectric conversion. After the incident light disappears, the electron-hole pairs generated by the photon excitation will recombine, and the resistance of the photoresistor will return to its original value.The photoresistor has no polarity and is purely a resistive device. It can be used with either DC voltage or AC voltage. The conductivity of a semiconductor depends on the number of carriers in the semiconductor conduction band. Why is the value of the photoresistor related to the wavelength of the incident light?Simply put, it is the effect of transitions between energy levels. Photons at different wavelengths have different energies, and an electron can only absorb one photon. After an electron absorbs a photon, whether it can be converted from non-conductive to conductive electrons depends on the photon’s Energy, and the number of electrons that can conduct electricity determines the resistance of the photoresistor. Therefore, the light wavelength also affects the resistance of the photoresistor.Recommended Reading: See more about light sensor, wavelength, spectrum and photometric physical quantity.3.2 What is the Internal Photoelectric Effect?The internal photoelectric effect is a phenomenon where the absorption of photons causes a change in the electrical conductivity of a semiconductor material. This differs from the external photoelectric effect, which involves the complete escape of electrons from the material's surface.The internal photoelectric effect can be divided into two main categories:Photoconductive effect: The change in electrical resistance due to light exposure.Photovoltaic effect: The generation of a photo-induced electromotive force (voltage) across a P-N junction. PhotoconductivityThe photoconductive effect is one of two internal photoelectric effects. The internal photoelectric effect refers to the phenomenon that the electrical conductivity of a semiconductor exposed to light changes or a photo-induced electromotive force is generated. Among them, the phenomenon that the conductivity of the semiconductor changes due to light is called the photoconductivity effect.Figure3. Energy Level of AtomPhotovoltaic EffectThe photovoltaic effect occurs when a P-type and N-type semiconductor are combined, creating a P-N junction. The process unfolds as follows:Electrons in the N-type semiconductor and holes in the P-type semiconductor diffuse, forming a depletion region near the interface.When light irradiates the P-N junction, photons with sufficient energy generate minority carriers (electron-hole pairs).Under the action of the internal electric field, excited electrons flow to the N-type region, and holes flow to the P-type region.This accumulation generates an additional electromotive force (voltage) at both ends of the P-N junction.If connected to an external circuit, current flows from the P region to the N region, producing usable electrical power.Figure4. Photovoltaic EffectIV How Do You Wire a Photoresistor Application Circuit?Schematic circuit for conventional applicationsFigure5. Schematic CircuitModule parameters:Working voltage: DC3.3-5VPhotoresistor Model: 5516Module pins: 3-pin or 4-pin (an additional analog output AO for 4-pin)Common circuit diagram (3)Photoresistor application circuit diagramThe following figure is a schematic diagram of the application of the photoresistor in the light control switch. The photoresistor is connected in series with the resistor R1. When there is no light, that is, the voltage across R1 does not reach the turn-on voltage of the Q1 transistor. Once exposed to light, the resistance of the photoresistor drops rapidly. The voltage across R1 rises and the transistor turns on, which causes the transistor Q2 in the subsequent stage to turn on, and finally, the switch K opens and the bulb works.Figure6. Common Photoresistor Application Circuit Diagram(4) Photoresistor dimming circuitThe following figure is a typical light-controlled dimming circuit. Its working principle is: when the surrounding light becomes weak, the resistance of the photoresistor RG increases, which increases the partial voltage added to the capacitor C, which in turn makes the thyristor's conduction angle is increased to achieve the purpose of increasing the voltage across the lamp. Conversely, if the surrounding light becomes brighter, the resistance of RG decreases, resulting in a smaller conduction angle of the thyristor, and the voltage across the lamp decreases at the same time, dimming the light, thereby controlling the illuminance of the lamp.Figure7. Photoresistor Dimming CircuitNote: The rectifier bridge in the above circuit must be a DC pulsating voltage, and it cannot be converted into a smooth DC voltage by capacitor filtering, otherwise the circuit will not work properly. The reason is that the DC pulsating voltage can not only provide the basic conditions for the zero-crossing shutdown of the thyristor, but also enable the charging of the capacitor C to start from zero every half cycle, and accurately complete the synchronous phase-shift triggering of the thyristor.V What Are the Types of Photoresistors?5.1 Classification by MaterialsBased on material composition, photoresistors are classified into intrinsic (pure semiconductor) and extrinsic (doped semiconductor) types. Polycrystalline and single crystal photoresistors can also be divided into cadmium sulfide (CdS), cadmium selenide (CdSe), lead sulfide (PbS), lead selenide (PbSe), indium antimonide (InSb) photoresistors, etc. 5.2 Classification by Spectral CharacteristicsSpectral TypeCommon MaterialsPrimary Applications (2026)Ultraviolet (UV)Cadmium sulfide, Cadmium selenideUV detection, environmental monitoringInfrared (IR)Lead sulfide, Lead telluride, Indium antimonideAstronomical detection, non-contact measurement, IR communicationVisible LightSelenium, Silicon, Germanium, Zinc sulfideIoT smart lighting, automatic street lights, exposure devices(1) Ultraviolet photoresistor: sensitive to ultraviolet rays, including cadmium sulfide, cadmium selenide photoresistors, etc., used to detect ultraviolet rays.(2) Infrared photoresistors: mainly lead sulfide, lead telluride, and lead selenide. Photoresistors such as indium antimonide are widely used in missile guidance, astronomical detection, non-contact measurement, human disease detection, infrared spectroscopy, infrared communication and other national defense, scientific research, and industrial and agricultural production.(3) Visible light photoresistors: including selenium, cadmium sulfide, cadmium selenide, cadmium telluride, gallium arsenide, silicon, germanium, zinc sulfide photoresistors, etc. Mainly used in various photoelectric control systems, which account for a significant portion of the projected $553.75 million global photoresistor market in 2025. Applications include IoT smart lighting, automatic turning on and off of navigation lights, street lights and other lighting systems, automatic water supply and automatic water stop devices, automatic protection devices on machinery and "position detectors" Thickness detectors for thin parts, automatic exposure devices for cameras, photoelectric counters, smoke alarms, photoelectric tracking systems, etc.Figure8. Light Dependent ResistorVI The Main Parameters and Basic Characteristics of the Photoresistor6.1 What Are the Main Parameters of a Photoresistor?The main parameters of a photoresistor define its operational limits, sensitivity, and response time in various lighting conditions.1) Bright resistance (kΩ): refers to the resistance value of the photoresistor when exposed to light.2) Dark resistance (MΩ): refers to the resistance value of the photoresistor when there is no light exposure (dark environment).3) Maximum working voltage (V): refers to the highest voltage the photoresistor is allowed to withstand under the rated power.4) Bright current: refers to the current that the photoresistor passes when it is irradiated by light under the specified applied voltage.5) Dark current (mA): refers to the current that the photoresistor passes under the specified applied voltage when there is no light.6) Time constant (s): refers to the time required for the photoresistor to start from the light jump to stabilize 63% of the bright current.7) Resistance temperature coefficient: refers to the relative change of the resistance value of the photoresistor when the ambient temperature changes by 1°C.8) Sensitivity: refers to the relative change of the resistance value of the photoresistor with and without light irradiation.Figure9. LDR6.2 Basic Characteristics(1) Dark resistance and bright resistanceThe stable resistance value measured by the photoresistor under room temperature and total darkness is called dark resistance. The current flowing at this time is called dark current. For example, MG41-21 type photoresistor dark resistance is greater than or equal to 0.1M.The stable resistance value measured by the photoresistor at room temperature and under certain lighting conditions is called bright resistance. The current flowing at this time is called the bright current. The bright resistance of MG41-21 type photoresistor is less than or equal to 1k.    The difference between bright current and dark current is called photocurrent.    Obviously, the larger the dark resistance of the photoresistor, the better, and the smaller the bright resistance, the better, that is, the dark current should be small and the bright current should be large, so the sensitivity of the photoresistor is high.Figure10. Bright Current and Dark Current(2) Volt-ampere characteristicsUnder a certain illuminance, the relationship between the voltage applied across the photoresistor and the current flowing through the photoresistor is called the volt-ampere characteristic. The volt-ampere characteristic of the photoresistor is approximately a straight line, and there is no saturation phenomenon. Due to the limitation of power dissipation, the voltage across the photoresistor cannot exceed the maximum operating voltage during use. The dotted line in the figure is the allowable power consumption curve, from which the normal operating voltage of the photoresistor can be determined. (3) Photoelectric characteristics    The relationship between the photocurrent of the photoresistor and the illuminance is called the photoelectric characteristic. The photoelectric characteristics of the photoresistor are nonlinear. Therefore, it is not suitable as a detection element, which is one of the shortcomings of the photoresistor. In automatic control, it is often used as a switching photoelectric sensor.Figure11. Characteristics of the Photoelectric Effect(4) Spectral characteristicsFor incident light of different wavelengths, the relative sensitivity of the photoresistor is different. The spectral characteristics of various materials are shown in Figure 2.6.4. It can be seen from the figure that the peak value of cadmium sulfide is in the visible light region, and the peak value of lead sulfide is in the infrared region. Therefore, when selecting the photoresistor, the types of components and light sources should be considered in order to obtain satisfactory results. (5) Frequency characteristicsWhen the photoresistor is exposed to pulsed light, the photocurrent will reach a steady-state value after a period of time. When the light suddenly disappears, the photocurrent will not be zero immediately. This shows that the photoresistor has time-delay characteristics. Because different materials have different time delay characteristics of photoresistors, their frequency characteristics are also different. Figure 2.6.5 shows the relationship between the relative sensitivity Kr and the light intensity change frequency f. It can be seen that the use frequency of lead sulfide is much higher than that of thallium sulfide. However, most photoresistors have large time delays, so they cannot be used in situations where fast response is required. This is a defect of photoresistors. (6) Temperature characteristicsLike other semiconductor devices, the photoresistor is greatly affected by temperature. When the temperature increases, its dark resistance will decrease. Changes in temperature also have a great influence on spectral characteristics. Figure 2.6.6 is the spectral temperature characteristic curve of the lead sulfide photoresistor. It can be seen from the figure that its peak value moves to the short wavelength direction as the temperature rises. Therefore, in order to improve the sensitivity, or in order to receive far-infrared light, cooling measures are taken.Figure12. Temperature CharacteristicsSpectral Temperature Characteristics of Lead Sulfide Photoresistor A commonly used photoresistor is a cadmium sulfide photoresistor, which is made of semiconductor material. The resistance of the photoresistor changes with the intensity of the incident light (visible light). Under dark conditions, its resistance (dark resistance) can reach 1~10MΩ; under strong light conditions (100LX), its resistance (Bright resistance) Only a few hundred to thousands of ohms. The sensitivity of the photoresistor to light (the spectral characteristics) is very close to the human eye's response to visible light (0.4~0.76) μm. As long as the human eye can sense the light, it will cause its resistance to change. Therefore, when designing the light control circuit, the incandescent bulb (small electric bead) light or natural light is used as the control light source, which greatly simplifies the design.Figure13. Photoresistor Characteristic CurveThe corresponding resistance change of the photoresistor with the intensity of the incident light is not linear, so it cannot be used for the linear conversion of the photoelectricity. This is where the user should pay attention. Beginners can purchase a photoresistor (MG45 type), at night a 60~100W incandescent lamp, use a multimeter to directly measure the resistance of the photoresistor. When measuring, the photoresistor should be aimed at the light of the incandescent lamp, and then gradually distance from the lamp (from near to far), observe the change of the resistance value indicated by the multimeter, and the special characteristics of the photoresistor can be visually verified.Commonly used photoresistor models are sealed MG41, MG42, MG43 and unsealed MG45 (cheap price). Their rated power is below 200mW.VII How to Use a Photoresistor with Arduino?7.1 LED Control with Photoresistor and ArduinoLED Control with LDR (Photoresistor) and Arduino7.2 How to Measure Light Intensity Using a Photoresistor (Arduino)In the data collection of modern smart home systems, the measurement of light intensity is highly necessary. For example, indoor IoT lighting can be automatically adjusted according to the intensity of the light to provide users with the most comfortable environment. The tutorial here will use a photoresistor to cooperate with Arduino to complete the light data collection.(1) MaterialsArduino UNO development boardBreadboardPhotoresistor1K-10K resistance(2)Wiring method Figure14. Wiring MethodThe resistance of photosensitive resistors is very high in the condition of no light. The stronger the light, the smaller the resistance. By measuring the voltage variation on both sides of the photosensitive resistance, the variation of the photosensitive resistance can be known and the light intensity can be obtained. In the connection diagram, we find that a partial voltage resistor is connected in series for the photosensitive resistor.Figure15. CircuitIn the above figure, RL is a photoresistor, R1 is a series resistor, Vout=RLR1+RL∗Vin, in the dark, the resistance of RL will be very large, so Vout is also very large, close to 5V. Once the light is irradiated, the value of RL will decrease rapidly, so Vout will decrease accordingly. It can be seen from the above formula that R1 should not be too small, preferably around 1k~10k, otherwise the ratio will not change significantly. (3) CodeThe code part is very simple, just read the analog value of the interface connected to the photoresistor.1 light = analogRead(0);Open the serial monitor of Arduino, illuminate the photoresistor with the flashlight of the mobile phone, and observe the result:2 Serial.println("lignt :");3 Serial.println(light);7.3 Use Experiment of Arduino Photoresistor(1) MaterialsArduino UNO x1Photoresistor x1resistance 10K, 4.7K, 1K x several (or need one, but you can test the difference between different resistance values and data)(2)Wiring method Figure16. Wiring Method(3)Program#define AD5 A5 //Define analog port A5#define LED 13 //Define digital port 13 int Intensity = 0;//Illuminance value void setup() //Program initialization{   pinMode(LED, OUTPUT);//Set LED to output mode   Serial.begin(9600);//Set baud rate 9600} void loop() // Program body loop{   Intensity = analogRead(AD5); //Read the value of analog port AD5 and save it in the Intensity variable   Serial.print("Intensity = "); //Serial output "Intensity = "   Serial.println(Intensity); //The serial port outputs the value of the Intensity variable and wraps   delay(500); //Delay 500ms}(4) Power on, view serial dataTest Results:Figure17. Test ResultsThe above data is the change of the value with the flashlight and no light.(5) SummaryThe positive and negative poles are reversed and the values are reversed. The larger the resistance value, the larger the change range. Using 5V, the range is larger than 3.3V.Recommended Reading: Arduino&mBlock light sensorVIII How to Use Multimeter to Detect the Quality of Photoresistor?Measure the dark resistance: Use a black piece of paper to cover the light-transmitting window of the photoresistor. At this time, the pointer of the multimeter remains basically unchanged, and the resistance value is close to infinity. The larger the value, the better the performance of the photoresistor. If this value is very small or close to zero, it means that the photoresistor has been burnt through and damaged and can no longer be used.Measure the bright resistance value: Point a light source to the light-transmitting window of the photoresistor. At this time, the pointer of the multimeter should have a large amplitude swing, and the resistance value is significantly reduced. The smaller the value, the better the photoresistor performance. If this value is large or even infinite, it indicates that the internal open circuit of the photoresistor is damaged and can no longer be used.Test intermittent light response: Align the light-transmitting window of the photoresistor with the incident light, and use a small piece of black paper to shake the upper part of the light-shielding window of the photoresistor to make it receive light intermittently. At this time, the pointer of the multimeter should swing left and right with the black paper. If the pointer of the multimeter always stops at a certain position and does not swing with the shaking of the paper, it means that the photosensitive material of the photoresistor has been damaged.IX A Quiz about the PhotoresistorPhotoresistors, potentiometers, and thermistors are all ________.A. OutputsB. Digital inputsC. Analog inputsD. ThroughputsAnswer: CFrequently Asked QuestionsWhat is the difference between a photoresistor and a photodiode?A photoresistor is a passive component that changes resistance based on light intensity, making it slower but easier to use. A photodiode is an active semiconductor with a P-N junction that converts light into current, offering much faster response times for high-speed applications.Is a photoresistor an analog or digital component?A photoresistor is fundamentally an analog component. Its resistance changes continuously in response to varying light levels. However, when paired with a microcontroller like an Arduino and a voltage divider, its analog signal can be easily converted into digital data.What are the main types of photoresistors?Photoresistors are primarily categorized into intrinsic and extrinsic types. Intrinsic photoresistors use pure semiconductors like silicon, while extrinsic types use doped materials to detect longer wavelengths, such as infrared light, making them ideal for specialized sensors.How is a photoresistor used in smart home circuits?In modern IoT and smart home systems, photoresistors act as ambient light sensors. They automatically trigger actions like turning on outdoor security lights, adjusting indoor smart bulb brightness, or activating motorized blinds when sunlight reaches a specific threshold.{ "@context": "https://schema.org", "@graph":[ { "@type": "Article", "headline": "Photoresistor Basics: Working Principle, Types, and Arduino Tutorial", "datePublished": "2020-06-19T00:00:00Z", "dateModified": "2026-03-14T15:57:00+08:00", "author": { "@type": "Organization", "name": "ApogeeWeb" }, "publisher": { "@type": "Organization", "name": "ApogeeWeb" } }, { "@type": "FAQPage", "mainEntity":[ { "@type": "Question", "name": "What is the difference between a photoresistor and a photodiode?", "acceptedAnswer": { "@type": "Answer", "text": "A photoresistor is a passive component that changes resistance based on light intensity, making it slower but easier to use. A photodiode is an active semiconductor with a P-N junction that converts light into current, offering much faster response times for high-speed applications." } }, { "@type": "Question", "name": "Is a photoresistor an analog or digital component?", "acceptedAnswer": { "@type": "Answer", "text": "A photoresistor is fundamentally an analog component. Its resistance changes continuously in response to varying light levels. However, when paired with a microcontroller like an Arduino and a voltage divider, its analog signal can be easily converted into digital data." } }, { "@type": "Question", "name": "What are the main types of photoresistors?", "acceptedAnswer": { "@type": "Answer", "text": "Photoresistors are primarily categorized into intrinsic and extrinsic types. Intrinsic photoresistors use pure semiconductors like silicon, while extrinsic types use doped materials to detect longer wavelengths, such as infrared light, making them ideal for specialized sensors." } }, { "@type": "Question", "name": "How is a photoresistor used in smart home circuits?", "acceptedAnswer": { "@type": "Answer", "text": "In modern IoT and smart home systems, photoresistors act as ambient light sensors. They automatically trigger actions like turning on outdoor security lights, adjusting indoor smart bulb brightness, or activating motorized blinds when sunlight reaches a specific threshold." } } ] }, { "@type": "HowTo", "name": "How to Use Multimeter to Detect the Quality of Photoresistor", "step":[ { "@type": "HowToStep", "name": "Measure the dark resistance", "text": "Use a black piece of paper to cover the light-transmitting window of the photoresistor. At this time, the pointer of the multimeter remains basically unchanged, and the resistance value is close to infinity. The larger the value, the better the performance of the photoresistor. If this value is very small or close to zero, it means that the photoresistor has been burnt through and damaged and can no longer be used." }, { "@type": "HowToStep", "name": "Measure the bright resistance value", "text": "Point a light source to the light-transmitting window of the photoresistor. At this time, the pointer of the multimeter should have a large amplitude swing, and the resistance value is significantly reduced. The smaller the value, the better the photoresistor performance. If this value is large or even infinite, it indicates that the internal open circuit of the photoresistor is damaged and can no longer be used." }, { "@type": "HowToStep", "name": "Test intermittent light response", "text": "Align the light-transmitting window of the photoresistor with the incident light, and use a small piece of black paper to shake the upper part of the light-shielding window of the photoresistor to make it receive light intermittently. At this time, the pointer of the multimeter should swing left and right with the black paper. If the pointer of the multimeter always stops at a certain position and does not swing with the shaking of the paper, it means that the photosensitive material of the photoresistor has been damaged." } ] } ]}
Kynix On 2020-06-19   15082
Resistors

What is a Light Sensor?

I IntroductionThe light sensor is developed based on the photoelectric effect principle of semiconductors. It can be used to detect the intensity of ambient light, and it can also be used to detect the difference in light between different colored surfaces. Users can make projects that interact with light with it, such as smart dimming lights, a laser communication system or something more awesome.Light Sensor Using Arduino and LDR | Arduino Light SensorCatalogI IntroductionII Definition  2.1 What is a Sensor?  2.2 Definition of the Light SensorIII Spectrum and Photometric Physical Quantity  3.1 Spectrum  3.2 Photometric Physical Quantities  3.3 MID Display's Perception of Backlight Brightness Under Different IlluminationIV How the Light Sensor WorksV Types and Characteristics of Light Sensors  5.1 Photodiode Type  5.2 Photoresistor TypeVI Applications of Light Sensors  6.1 Types of Light Sensors in Application  6.2 Typical Applications  6.3 Practical Application CasesVII The Circuit Diagram of a Light Sensor  7.1 Model Introduction  7.2 Appearance and Size  7.3 Application  7.4 Functional Framework Diagram  7.5 Application CircuitVIII Programming Guide  8.1 mBlock Programming  8.2 Arduino Programming  8.3 SchematicIX A Related Question about Light Sensor  9.1 Question  9.2 AnswerⅩ FAQII Definition2.1 What is a Sensor?In a broad sense, a sensor is a sensor that converts a measurement into a signal that can be perceived or quantified. In a narrow sense, a device that senses the measurement and converts it into an output signal of the same or another nature according to a certain law. The sensor is generally composed of a sensor element, a conversion element, a measurement circuit, and an auxiliary power source. The sensor element and the conversion element may be combined into one, and some sensors do not require an auxiliary power source.2.2 Definition of the Light SensorThe light sensor usually refers to a device that can sensitively sense the light energy of ultraviolet light to infrared light and convert the light energy into an electrical signal. The light sensor is a kind of sensing device, which is mainly composed of light-sensitive elements. It is mainly divided into four categories: ambient light sensor, infrared light sensor, sunlight sensor, and ultraviolet light sensor. It is mainly used in the field of changing body electronics applications and intelligent lighting systems. Modern electrical measurement technology is becoming more and more mature. Due to its advantages such as high accuracy and easy microcomputer connection for automatic real-time processing, it has been widely used in the measurement of electrical and non-electrical quantities.  However, the electrical measurement method is susceptible to interference. In the AC measurement, the frequency response is not wide enough and there are certain requirements on the withstand voltage and insulation. Today, the rapid development of laser technology has been able to solve the above problems.Figure1. Light SensorIII Spectrum and Photometric Physical Quantity3.1 SpectrumThe spectrum is a pattern in which monochromatic light, which is dispersed by the dispersive system (such as a prism and a grating), is sequentially arranged according to the size of the wavelength (or frequency). The largest part of the visible spectrum is the visible part of the electromagnetic spectrum of the human eye. Electromagnetic radiation in this wavelength range is called visible light. The spectrum does not include all the colors that the human brain can distinguish, such as brown and pink.Figure2. Spectrum3.2 Photometric Physical Quantities3.2.1 Light Intensity(I/Intensity)(1) Definition: the intensity of light emitted by a monochromatic light source (frequency 540 × 1012 Hz, wavelength 555nm) in a unit solid angle in a given direction (radiation intensity in this direction is 1/683 watts per spherical degree) .(2) Unit: cd (Candela)(3) Luminous intensity of common light sources:●  Sun, 2.8E27 cd●  Highlight flashlight, 10000 cd●  5mm super bright LED, 15 cd 3.2.2 Luminous Flux(F/Flux)(1) Definition: The energy emitted by a point light source or a non-point light source in a unit time. Among them, the visual person (radiation flux that humans can feel) is called luminous flux.(2) Unit: Lm (lumens)(3) Efficiency of common light sources (lumens / watt, Lm / W)● Incandescent, 15● White LED, 20● fluorescent lamp, 50● The sun, 94● Sodium lamp, 120 3.2.3 E/Illuminance(1) Definition: Luminous flux irradiated onto a unit area.(2) Unit: Lx / Lux (1), 1 (Lx) = 1 Lm / m2.(3) Common Illumination (Lx):● Direct sunlight (noon), 110,000● Overcast day, 1000● Inside the mall, 500● Cloudy room with window, 100● Under normal room lighting, 100● Full moon, 0.2 3.2.4 L / Luminance(1) Definition: The intensity of light emitted by the unit light source area in the normal direction and within the unit solid angle.(2) Unit: nt (nits), 1 (nt) = 1 cd / m2.(3) Brightness of common luminous body (nt):● Solar surface, 2,000,000,000● Incandescent filament, 10,000,000● White paper under the sun, 30,000● Brightness that human eyes can get used to, 3,000● The human eye can better distinguish the brightness of the color, 1● No moon night sky, 0.00013.3 MID Display's Perception of Backlight Brightness Under Different IlluminationFigure3. Ambient Illumination-LUXIV How the Light Sensor WorksThe light sensor actually works according to the principle of the photoelectric effect. The so-called photoelectric effect refers to the phenomenon that certain special substances can convert light energy into electrical energy after absorbing light. The photoelectric effect can be divided into two types: an external photoelectric effect and an internal photoelectric effect. The external photoelectric effect refers to the fact that under light irradiation, electrons can be emitted from the inside of the material to generate electricity. The photocell and photomultiplier are originals based on the external photoelectric effect.  Correspondingly, the internal photoelectric effect occurs inside the substance. When light is irradiated onto the substance, the resistivity inside the substance is changed, thereby generating electromotive force. Photoelectric elements such as photoresistors and photovoltaic cells are made based on the internal photoelectric effect. Take the light sensor on the mobile phone as an example:The light sensor in a mobile phone should actually be an ambient light sensor, which is mainly composed of two parts, a light projector, and a light receiver. The white dot next to the front camera acts as a lens that focuses the light in the environment and transmits it to the receiver via the projector. According to the photoelectric effect, the light receiver can convert various light signals into corresponding electrical signals, and then further process them into various switching and control actions to realize the sensitivity adjustment of the mobile phone. An infrared cut-off film is often attached to the chip of the ambient light sensor to eliminate the interference of infrared light so that our electronic devices such as mobile phones and laptops can accurately detect the visible light intensity in the environment. When the display consumes too much power, the light sensor can also automatically reduce the screen brightness to extend the operating time of the battery. Figure4. Light Sensor in PhoneV Types and Characteristics of Light Sensors5.1 Photodiode TypePhotodiodes and semiconductor diodes are similar in structure, and their die is a PN junction with photosensitive characteristics, which has unidirectional conductivity, so a reverse voltage needs to be added when working. When there is no light, there is a small saturation reverse leakage current, that is, a dark current, at which time the photodiode is turned off. When exposed to light, the saturation reverse leakage current greatly increases, forming a photocurrent, which changes with the intensity of the incident light. When light irradiates the PN junction, an electron-hole pair can be generated in the PN junction, which increases the density of minority carriers. These carriers drift under the reverse voltage, causing the reverse current to increase. So you can use the light intensity to change the current in the circuit. It is turned off when there is no light and turned on when there is light. Features:(1) High sensitivity can reduce the influence of stray light(2) Photodiode (photodiode) is a photoelectric conversion device, which can convert the received light into a current change(3) The working mode of the photodiode (photodiode) is to increase the reverse voltage or not increase the voltage. When a reverse bias is applied to it, the reverse current in the tube will change with the intensity of the light. The greater the light intensity, the greater the reverse current.Figure5. Photodiode5.2 Photoresistor Type(1) PrincipleIt works based on the semiconductor photoelectric effect. The photoresistor is non-polar and is purely a resistive element. It can be applied with DC voltage or AC voltage.(2) Working characteristics of the photoresistor: When the light is on, the resistance is small; when the light is off, the resistance is large. The stronger the light, the smaller the resistance; when the light stops, the resistance returns to its original value.(3) Spectral range: from ultraviolet to infrared.(4) Features:● The internal photoelectric effect has nothing to do with the electrode (only related to the photodiode), that is, a DC power supply can be used.● Sensitivity is related to the semiconductor material and the wavelength of the incident light● Epoxy resin package, high reliability, small size, high sensitivity, fast response speed, and good spectral characteristics.Figure6. PhotoresistorVI Applications of Light Sensors6.1 Types of Light Sensors in Application(1) Ambient light sensorThe ambient light sensor can sense the surrounding light conditions and tell the processing chip to automatically adjust the backlight brightness of the display to reduce the power consumption of the product. On the other hand, the ambient light sensor helps the display provide a soft picture. When the ambient brightness is high, the LCD monitor using the ambient light sensor will automatically adjust to high brightness. When the external environment is dark, the display will be adjusted to low brightness to achieve automatic brightness adjustment. (2) Infrared light sensorThe infrared light sensor uses a charged thermopile and a scandium bromide iodide (KRS-5) window to sense wavelengths from 580 to 40,000 nm. The sensor can be used to measure a range of phenomena, including infrared radiation from the palm of your hand. (3) Sunlight sensorSolar sensor. It can recognize horizontal and vertical 360 degrees. The location of the sun, identification, cloudy, cloudy, semi-cloudy, sunny and evening during the day. Tracking bearing identification. Identification circuit processing and server drive. A digital chip is used to complete the processing of the above information. It can serve a variety of ordinary motors, stepper motors. The power consumption of the whole machine is 3mA, and the chip working voltage is 5V.  International advanced solar tracking equipment uses computer data theory, which requires data and settings for the latitude and longitude of the earth. The circuit principle and equipment technology are complicated. Intelligent sun tracker uses recognition theory technology, simple circuit and few components, no theory of latitude, longitude and data information. There is no need to consider the route that the sun runs through the year. From which direction the sun rises and from which direction it falls, it can accurately identify the position where the sun rises and falls. If he is placed on a walking car or boat, the tracker can face the sun no matter where he goes. (4) UV light sensorThe UV light sensor uses a filter to measure the UV light band (315nm-400nm). Remove the filter, the sensor can sense visible light at the same time. The sensor includes a UV filter, a sight, and a sensor handle. Figure7. Types of Light Sensors6.2 Typical ApplicationsBacklight adjustment: TV, computer monitor, LCD backlight, mobile phone, digital camera, MP4, PDA, GPS;Energy-saving control: outdoor advertising machines, induction lighting appliances, toys; instruments and meters: instruments and industrial controls for measuring light intensity;Environmentally friendly replacement: Replace traditional photoresistors, photodiodes, phototransistors6.3 Practical Application Cases6.3.1 Changing Body Electronics Applications(1) Ambient light detectionIn body electronics applications, ambient light sensors are used to adjust the backlight intensity of the dashboard, as well as the LCD backlight intensity in navigation systems (GPS), temperature control, and DVD screens. This is especially important for displays like BMW's iDrive and Prius' Multi-Info. For example, when daylight becomes dim and dark, the dashboard backlight will be adjusted to varying degrees to achieve the best visibility and reduce the glare that may be caused to the driver. Using these sensors eliminates the problem of turning on the headlights during the day, and the display automatically adjusts brightness. The key function of the ambient light sensor is to use the sensitivity visible wavelength of 380nm ~ 780nm to replicate the sensitivity of the human eye. (2) Tunnel detectionTunnel detection requires the input of two sensors. The first sensor has a wider field of view "looking up" and a relatively long average moving period, which prevents the lights from turning on and off. The second sensor has a narrower field of view "looking forward" and a relatively short average moving time. This allows the tunnel sensor to respond quickly to sudden changes in daylight, turn on the car's headlights, and adjust the display's backlight brightness when entering the tunnel. Forward-facing sensors eliminate the need to turn lights on and off when entering under a bridge or a tree covering the sun. In these cases, the sensor will still "see" the light ahead. When entering the tunnel, the signal from the tunnel sensor will drop, while the signal from the wide-field sensor will remain high; the headlights of the car will be turned on. When exiting the tunnel, the signal from the tunnel sensor will increase and the signal from the wide field of view sensor will decrease; the headlights of the vehicle will be turned off. With different average moving periods, the controller makes a clear distinction. 6.3.2 Intelligent Lighting SystemTo improve the comfort of the working environment, the lighting control system adopts a light sensor to automatically control the lighting equipment according to the illuminance of the current environment, so that the illuminance is controlled within a comfortable range. In traditional lighting control systems, ordinary light sensors are often combined with A / D converters (ADCs). Because the light signal detected by the light sensor contains both visible light components and infrared light components, the infrared light is filtered to detect the light sensor detection results.VII The Circuit Diagram of a Light Sensor7.1 Model IntroductionThe light sensor shown below is a low-cost I2C digital light sensor (ALS), which can convert light intensity into a digital output signal that can directly interface with I2C, providing a wide dynamic range from 0.01lux to 64K lux The linear response is very suitable for applications under high ambient brightness.Figure8. Model7.2 Appearance and SizeFigure9. Appearance and Size of the model7.3 Application(1) Back-lighting Control in mobile / portable devices(2) Touch Panel Control in mobile / portable devices7.4 Functional Framework DiagramFigure10. Functional Framework Diagram7.5 Application CircuitFigure11. Application CircuitVIII Programming GuideThe programming described below is based on the Me light sensor developed based on the photoelectric effect principle in semiconductors.8.1 mBlock ProgrammingThe light sensor module supports the mBlock programming environment. The following is a brief description of the module instructions:Figure12. Programming GuideHere is an example of how to use mBlock to control a light sensor moduleWhen the LED receives the light, M-Panda will move left and right and say I love sunshine; Cover the LED light, M-Panda will stop moving and say I love night. The results are as follows:Figure13. Result8.2 Arduino ProgrammingIf you write a program using Arduino, you should call the library Makeblock-Library-master to control the Me Light Sensor. This program instructs Me Light Sensor to read the current light intensity through Arduino programming.Figure14. Arduino ProgrammingFunction list of light sensor:Figure15. Function List of Me Light Sensor8.3 SchematicFigure16. SchematicIX A Related Question about Light Sensor9.1 QuestionHow to combine these 2 circuits together so that during complete darkness on the LDR, the LED would turn on instantly and when light falls on the LDR there would be around a 1 or 2-second delay before completely shutting off?The circuit would be running on a 5V DC power supply and powering an LED array.How to combine them together? Figure17.Circuit1Figure18. Circuit29.2 AnswerIn the 555 circuit the capacitor controls the wait time, if the capacitor is short-circuited the circuit will wat forever.In the LDR circuit the transistor acts like a switch but unfortunately it's switching to ground but the capacitor in the 555 circuit is connected to +9VTo resolve this I swapped the parts in the 555 circuit upside down to have the capacitor to ground. Then it was simple to I merge the two circuits.Figure19. AnswerIn the dark R1 turns Q1 on the keesp C1 duscharged so 555 output will be high.when there is light the LDR turns Q1 off and C1 charges , once it gets enough charge the 555 output goes low.We could have instead built the upside-down version of the LDR circuit using a BC557 transitor (or other similar PNP type) instead of the BC547 NPN transistor and merged that with the original 555 circuit.Ⅹ FAQ1. How is a relay added to a light sensor circuit?Presumably, your light sensor will be generating a variable voltage signal in response to how much light is hitting it, and you want to trip a relay when this light is above (or possibly below) a threshold. One way to do this is with a comparator circuit, which will compare two voltages and output a high or low depending on which one is higher. You then compare the signal from the light sensor to a reference voltage that you can set with a potentiometer and generate a high or low output signal from that. You can also use a microcontroller and read the signal from the light sensor with an analog input pin. This is more complex but useful if you want to implement features like hysteresis in the comparison. Now, the logic level signal can’t drive a relay coil directly, so you will need to use a transistor to switch the relay coil current. Which transistor to use will depend on the voltages involved and the amount of current you need to switch, but it’ll be a small signal transistor of some kind. You also need a current limiting resistor on the gate, possibly a pull-down on the gate as well, and a flyback diode across the relay coil. 2. What is a light sensor?Light sensors respond to changes in infrared light to detect motion or proximity to another object. Proximity sensors help robotic machines navigate obstacles and avoid bumping into objects. They are also used for devices in vehicles that sound an alarm when the vehicle is close to bumping into an object. 3. What are the disadvantages of a light sensor?Following are the disadvantages of Light sensor :• LDRs are highly inaccurate with high response time (about 10s or 100s of milliseconds).• Resistance varies continuously (analog) in photoresistors and is rugged in nature.• Photodiodes are temperature sensitive and are uni-directional, unlike photoresistors. 4. What does a light sensor do?Light sensors are electronic devices that indicate the intensity of daylight or artificial light. They convert light energy to electrical signal output. Light sensors have several uses in industrial and everyday consumer applications. 5. Where are light sensors used?Light sensors have a lot of uses. The most common use in our daily lives is in cell phones and tablets. Most portable personal electronics now have ambient light sensors used to adjust brightness. 6. How many types of light sensors are there?By using LDR as a circuit, we can calibrate the changes in its resistance to measure the intensity of Light. There are two other Light Sensors (or Photo Sensors) that are often used in complex electronic system design. They are Photo Diode and Photo Transistor. All these are Analog Sensors. 7. How long does a light sensor last?Long Duration Settings – In most cases, your motion detector light should only stay on for 20 to 30 seconds after it's triggered. However, you can manipulate the settings so it will stay on longer. For example, many lights come with settings ranging from a few seconds to an hour or more. 8. Is a light sensor analog or digital?Analog sensors that are used for detecting the amount of light striking the sensors are called light sensors. These analog light sensors are again classified into various types such as photo-resistor, Cadmium Sulfide (CdS), and, photocell. 9. What is a light sensor in a phone?Ambient-light sensors (ALS) are widely used in smartphones to provide information about ambient-light levels, in support of the backlight LED power circuit. 10. How do you wire a light sensor to an outside light?Connect one black wire on the photocell to the black wire that comes from the building. Be sure to twist the exposed copper wire so that it forms a tight connection. Connect the second black wire on the photocell to the black wire on your light fixture, making sure that the copper wire is twisted together completely.  
kynix On 2020-02-22   17909

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Follow us

Join our mailing list!

Be the first to know about new products, special offers, and more.

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserve.