ldr Related Articles
Stay Ahead with Expert Electronics Insights,
Industry Trends, and Innovative Tips
- Electronic Components
- News Room
- General electronic semiconductor
- Components Guide
- Sort by
- Robots
- Transmitters
- Capacitors
- IC Chips
- PCBs
- Connectors
- Amplifiers
- Memory
- LED
- Diodes
- Transistors
- Battery
- Oscillators
- Resistors
- Transceiver
- RFID
- FPGA
- Mosfets
- Sensor
- Motors, Solenoids, Driver Boards/Modules
- Relays
- Optoelectronics
- Power
- Transformer
- Fuse
- Thyristor
- potentiometer
- Development Boards
- RF/IF
- Semiconductor Information
- Sensors
- PCB
- transistor
Catalog Introduction How does an LDR work? How to setup ADC in STM32 Introduction The majority of streetlights and outdoor lights are typically operated manually. To manually turn on and off lights is not only risky, but it also wastes energy well as the timing of turning on and off is not optimized. Therefore, an optimized, efficient, and automatic light system is needed to efficiently control light brightness and turn on and off them automatically. In this article, a brief introduction to automatic control of light brightness is given as well as its practical implementation using an STM32 microcontroller and a cheap LDR sensor shown in Figure 1 is demonstrated. Figure 1 LDR breakout board In an automatic light control system, a light detection system is employed that senses the light intensity. If the application requires only to turn on and off a light system, then a threshold value of light intensity is set below which the light will turn on, and above it, the light will turn off. However, if the application is to control the light brightness based on the light intensity in the environment, then a PWM-controlled voltage is provided to the automatic light system. For light detection, a Light Dependent Resistor commonly known as LDR is used. LDR is a sensor whose resistance varies with the intensity of light. This property of an LDR can be used to sense darkness and brightness. Thus, it can be used to automatically control the turn on and off as well as the intensity of the light system. A typical LDR has a maximum resistance value in mega ohms and a minimum resistance value in several kilo ohms. Materials 1STM32 F401/F1032LDR sensor3Potentiometer4LED How does an LDR work? So, how exactly does an LDR operate? LDR works on the principle of photoconductivity. It is an optical phenomenon in which material conductivity increases when light falls upon it. When light or photon strikes the material, the electrons in the semiconductor material's valence band are stimulated to the conduction band. The incident photons must have energy larger than the bandgap of the semiconductor material to cause the electrons to move from the valence band to the conduction band. Hence as light intensity increases more and more electrons are excited to the conduction band which produces a large number of charge carriers. This means that more current will flow in the circuit, and as a result, the resistance will decrease. LDR resistance that changes with the intensity of light cannot be read in a microcontroller. To make it readable in a microcontroller the resistance is represented in terms of voltage. For this purpose, a circuit needs to be designed. Many circuits can be used for LDR. These can be based upon MOSFET, BJET, or an amplifier. However, the most commonly used circuit for LDR to convert its resistance into voltage is the voltage divider circuit. In this circuit, two resistors are installed in series. One side is attached to the positive terminal of the battery while the other is attached to the ground. The schematic of the voltage divider is shown in Figure 2. The output of the voltage divider can be fed to another circuit for other purposes such as a comparator i.e LM393. Usually, a comparator is used in on-off operations where the lights are needed to be turned on and off when a threshold value of light intensity is absorbed by the LDR. A typical circuit for the LM393 comparator is shown below. Figure 2 LM393 comparator usage with LDR The calculation for the voltage divider circuit is pretty easy. Referring to Figure 2, the following equation can be used to measure the output voltage. In this equation, it is assumed that there is no load on the output voltage because that load can affect the output voltage. The output of the circuit is shown in Figure 2 where the change in resistance changes the voltage at the IN1+ pin of the comparator. As we know the voltage changes with the intensity of light. The circuit gives maximum voltage in complete darkness while minimum voltage when placed in bright light. The ADC of the STM32 controller can be used to sense the change in the voltage while the results obtained via ADC can be used to generate PWM. It is the PWM that generates average voltage and hence controls the intensity of light. In this article, both the manual and automatic light intensity control is demonstrated using an LED light. The program and procedure for automatic and manual light brightness control is same, the only difference is that in automatic light brightness control and LDR is used while in manual mode simple potentiometer is used. How to setup ADC in STM32 In STM32, ADC can be configured in three different ways. 1) Polling 2) Interrupt 3) DMA. Polling: In the polling method when ADC conversion starts the CPU operation halts. It is only after the conversion is completed, the CPU resumes working. Interrupt: The second method is by using the interrupt service routine. When ADC conversion competes, it generates an interrupt during which required functions are executed which in our case is to update the PWM value. DMA: The third method is to use direct memory access (DMA). In this method, the ADC directly transfers the data to memory bypassing the CPU altogether. This is the most efficient method of all as it does not involve CPU in the ADC operations and keeps it available for other tasks. In this experiment, we will be using interrupt methods which are both simple and efficient. Required hardware STM32 F401/F103LDR sensor (breakout board will be better)PotentiometerLED Let's build the program step by step Open STM32CubeIDE and start a new projectSelect an MCU which in our case is STM32F401CDGo to SYS -> Debug and select Serial Wire. Select SystTick in TimeBase Source. Go to RCC-> High Speed Clock and select Crystal/Ceramic Resonator. Configure ADC1. Select IN1 and set it to be triggered by software. From the NVIC controller tab check the global interrupt box. Configure Timer 1 in PWM mode with output on CH1. Set the counter period register value to 839 and Prescaler register value to 100. This will ensure 1000 Hz frequency at the output. The following formula can be used to set PWM frequency Setting Prescaler value to 99 while the required frequency is 1000 Hz, the ARR value can be calculated as 839. Finally set the clock frequency to 84 MHz and select HSE as the clock source. And generate the code. The final code is given below #include "main.h"ADC_HandleTypeDef hadc1;TIM_HandleTypeDef htim1;void SystemClock_Config(void);static void MX_GPIO_Init(void);static void MX_ADC1_Init(void);static void MX_TIM1_Init(void);uint16_t AD_Data = 0; uint16_t minimumADC = 1000; uint16_t maximumADC = 3000;int main(void){ HAL_Init() SystemClock_Config(); MX_GPIO_Init(); MX_ADC1_Init(); MX_TIM1_Init(); HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1); while (1) { HAL_ADC_Start_IT(&hadc1); TIM1->CCR1 = ((AD_Data-minimumADC)*840)/maximumADC; }}void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc){ AD_Data = HAL_ADC_GetValue(&hadc1);} Figure 3 Duty Cycle in Bright Light Figure 4 Duty Cycle in Low Light Resources Automatics Light.zip
Victoria On 2022-10-06
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
Today I want to share a project of making a simple automatic street light controller using relay and LDR I found in circuitdigest with you. You have seen street light which automatically gets turned on in the night and gets turned off in the morning or day time, there are sensors who senses the light and control the light accordingly. These Street lights are an important project in smart cities. So here in this project, we are going to make a Simple Automatic Street Light Controller Using Relay and LDR. This circuit is very simple circuit and can be built with Transistors and LDR, you don’t need any op-amp or 555 IC to trigger the AC load. Here we have used an AC bulb as street light. Some applications of this circuit are street light controlling, home/office light controlling, day and night indicators, etc. Components Required: Transistor BC547 -2 LDR (Light Dependent Resistor) Relay Resistor 1k 100k Potentiometer Power Supply 12v -1 Connecting wires Jumper wires Screw terminal Block 2 pin or 3 pin Bread Board or Perf Board 1n4007 Diode AC supply AC Load or Bulb Here you may want to know: what is LDR? LDRs are made from semiconductor materials to enable them to have their light sensitive properties. There are many types but one material is popular and it is cadmium sulphide (CdS). These LDRs or PHOTO REISTORS works on the principle of “Photo Conductivity”. Now what this principle says is, whenever light falls on the surface of the LDR (in this case) the conductance of the element increases or in other words the resistance of the LDR falls when the light falls on the surface of the LDR. This property of the decrease in resistance for the LDR is achieved because it is a property of semiconductor material used on the surface. LDR (Light Dependent Resistor) Circuit Diagram and Explanation: Below is the circuit diagram of this Light sensing Street Light: In this project, we have used an LDR (Light Dependent Resistor) which is responsible for detecting light and darkness. The resistance of LDR increases in darkness and reduces in presence of light. This circuit is same as a Dark Detector or Light Detector Circuit, only here we have replaced simple LED with a AC load, using a Relay. Two BC547 NPN transistors are used to drive the relay. Automatic Street Light circuit using LDR and relay Whenever light falls over LDR its resistance get decreased and transistor Q1 turns ON and collector of this transistor goes LOW, and this makes the second transistor turns OFF due to getting a LOW signal at its base, so relay also remain turned OFF due to second transistor. Now whenever LDR senses Darkness, mean no light, then transistor Q1 turned ON due to increase in the resistance of LDR which is responsible for voltage drop at the base of Q1. Due to a LOW signal at the Q1 base, Q2 transistor gets a HIGH signal from the collector of Q1 and turns ON the relay. Relay turned ON the AC load that is connected to relay. A 10K pot is also used for setting up the sensitivity of the circuit. So this is how automatic Street Lights turns on in the night and turn off in the day, and below is the effect pictures. >>>>> > >>>> Ref. KY56-BC547A KY32-1N4007
kynix On 2017-09-22
Join our mailing list!
Be the first to know about new products, special offers, and more.
Feature Posts
How Resistors Work: From Basic Principles to Advanced Applications2025-07-30
DC Switching Regulators: Principles, Selection, and Applications2025-05-30
FPGA vs CPLD: In-depth Analysis of Architecture, Performance and Application2025-05-07
MOSFET Technology: Essential Guide to Working Principles & Applications2025-05-04
SMD Resistor: Types, Applications, and Selection Guide2025-04-30