blog

What is photo relay?

33 3

Overview

Many people may ask, “What is a photoresistor?” In fact, it is a special type of resistor, also known as a photo resistive sensor or LDR (Light-Dependent Resistor). It is typically made from semiconductor materials such as cadmium sulfide (CdS) or cadmium selenide (CdSe). Its working principle is based on the internal photoelectric effect — this is also the core of  how does a photoresistor work. As the light intensity increases, its resistance decreases rapidly. This is because the charge carriers generated by light all participate in conduction: under the influence of an external electric field, electrons move toward the positive electrode of the power supply, while holes move toward the negative electrode—causing the photoresistor’s resistance to drop sharply. In the absence of light, it is almost in a high-resistance state with a very large dark resistance.

A relay is an electrical control device that uses signals such as electromagnetic or optical signals to control the on/off state of a circuit. It can realize the function of controlling high-power circuits with low-power electricity or achieving electrical isolation. A microcontroller, on the other hand, is a low-power device that generally operates at 5V or even lower voltages. Its drive current is below the milliampere level, which makes it unsuitable for high-power applications (e.g., controlling electric motors). Therefore, a connecting component—known as a power drive unit—is required. Relay driving is a typical and simple type of power drive unit. For a microcontroller, the relay itself acts as a power component; in essence, the relay serves as an interface for the microcontroller to control high-power loads.

A simple light-controlled switch (also called an automatic light-sensor switch) can be made using a photoresistor and a relay. The module introduced in this article integrates a photoresistor and a relay, making it easy to use and suitable for light-sensing control scenarios. Moreover, it can be used directly once wired up—no programming is needed, so even beginners can handle it.

Working Principle

A photo relay circuit triggers the on/off state of a circuit via light signals (such as natural light and infrared light), eliminating the need for manual operation.

First, the photosensitive element receives the light signal and converts changes in light intensity into an electrical signal. Specifically, when the photoresistor is exposed to light, its resistance drops sharply, generating an electric current. This electrical signal then drives the relay coil to energize or de-energize, which in turn switches the contacts and controls the load (e.g., lights, motors).

Due to its non-contact triggering, high anti-electromagnetic interference capability, and long service life, it is widely used in light-controlled scenarios. For example, the automatic on/off of street lamps, infrared sensing for automatic doors (when a human body blocks the infrared light, the relay is triggered to operate and open the door), and “paper out detection” in printers (when paper blocks the light path, the relay signal changes, triggering a shutdown and alarm) are all practical applications of light sensing control.

Module Introduction

  • Control Capability: The photoresistor detects light, and the relay directly controls AC/DC loads.Load specifications for the normally open (NO) interface: AC 0~250V/10A, DC 0~30V/10A.
  • Adjustment Characteristics: A potentiometer is used for sensitivity adjustment— the relay energizes in low light and de-energizes in bright light. After the relay operates, it automatically fine-tunes the threshold to prevent critical jitter.
  • Protect Indication: Equipped with reverse power connection protection. Includes a red power indicator light and a blue relay status indicator light.
  • Mounting Specifications: Features 4 mounting screw holes. Dimensions: 5.0×3.0×1.8cm. Includes a 30cm detection lead wire for the photoresistor.
  • Function: Detects changes in ambient light intensity to control the relay’s on/off state.
  • Relay Logic:

      When darker than the threshold: Relay energizes (common terminal COM connects to NO terminal and disconnects from normally              closed (NC) terminal).

      When brighter than the threshold: Relay de-energizes (COM disconnects from NO terminal and connects to NC terminal).

  • Wiring:

      Power Supply: DC – connects to the negative terminal; DC + connects to the positive terminal.

      Load: For AC (live wire connects to NO, neutral wire connects to COM); for DC (positive pole connects to NO, negative pole connects          to COM).

      Expansion: The module has a temperature sensor interface.

  • Operating Current:

     <90mA at 5V;

     <50mA at 12V;

     <30mA at 24V;

     <5mA when the relay is not energized.

  • Operating Temperature: Recommended range: -20℃~60℃; Operating range: -30℃~70℃.
  • Load Capacity:

      Relay NO terminal: DC 0-30V/10A, AC 0-250V/10A;

      Relay NC terminal: DC 0-28V/10A, AC 0-125V/10A.

Introduction to the Circuit

图片1 32

Light-Dependent Resistor (LDR) Dimming Circuit

The component on the far left is the rectifier bridge, which converts alternating current (AC) into unidirectional pulsating direct current (DC); the maximum voltage can reach 310V, and the frequency becomes 100Hz (equivalent to “fluctuating” 100 times per second). This circuit can be simply divided into two phases: charging and triggering.

During the charging phase, in the positive half-cycle of the pulsating DC (when the “water flow” is rising), current flows along the path: Positive terminal of rectifier bridge → Regular resistor → LDR → Diode → Capacitor → Bidirectional trigger diode (closed) → Gate of thyristor → Cathode of thyristor → Negative terminal of rectifier bridge. At this time, the capacitor is like a cup filling with water, and its voltage increases gradually.

When it comes to the triggering phase, once the capacitor voltage rises to 30V, the bidirectional trigger diode (DB3) “clicks” open, and the electricity in the “cup” (capacitor) flows through it to the thyristor’s gate—this is like handing an “opening key” to the switch.

The thyristor is the main “switch” in the circuit, and there are two key rules you need to know about it:

for the opening condition, two requirements must be met at the same time—first, the gate receives the “key” (trigger current) from the bidirectional trigger diode, and second, there is a positive voltage between the anode and cathode (you can think of this as “water flow waiting to pass through both ends of the switch”);

for the closing condition, when the circuit voltage drops to 0 (when the pulsating DC reaches its lowest point), the thyristor will close automatically regardless of whether it has the “key,” and wait for the next “key” to arrive.

Now you can probably guess how its light-controlled function works, and it’s quite simple: when the light is strong, the LDR has a low resistance, so the “water flow” (current) charging the capacitor is fast, and the “cup” fills up to 30V quickly; the bidirectional trigger diode opens early, the thyristor receives the “key” early, stays open longer (with a large conduction angle), more current flows through the bulb, and the bulb is bright.

When the light is weak, the LDR has a high resistance, so the “water flow” charging the capacitor is slow, and the “cup” takes a long time to reach 30V; the bidirectional trigger diode opens late, the thyristor receives the “key” late, stays open for a shorter time (with a small conduction angle), less current flows through the bulb, and the bulb is dim. That’s a very clear logic, right? Next, let’s use the same method to look at other light-controlled circuits.

图片2 26

Light-Controlled Switch with LDR

The core logic of this circuit works as follows: during daytime, when light intensity is high, the LDR has a low resistance, which keeps the base voltage of transistor VT1 high—so VT1 cuts off and no current flows through it. At night, when light intensity is low, the LDR resistance increases, causing the base voltage of VT1 to drop—this turns VT1 on and allows it to conduct current.

Potentiometer RP is a knob for adjusting the light sensor sensitivity. Turning RP to increase its resistance also lowers the base voltage of VT1, triggering the switch earlier (resulting in a more sensitive threshold). Turning RP to decrease its resistance means a darker environment is required; only when the LDR resistance becomes much larger will VT1 turn on (creating a stricter threshold).

Transistors VT1 and VT2, which handle amplification and driving, act like relay teammates. VT1 (the “front teammate”) is responsible for signal amplification—it converts the resistance change of RL (a weak signal) into a current change. VT2 (the “back teammate”) takes charge of current amplification: the relay needs more current than VT1 can supply, so VT2 specifically gives a strong boost to provide the relay with enough current to operate. It’s important to note that only when VT1 turns on first will VT2 follow and turn on, just like a domino effect. In a dark environment, both transistors must meet their respective trigger conditions to operate together.

Relay K acts as a main switch. When VT2 turns on, the relay coil is energized; this causes the normally open contact to close and the normally closed contact to open.

Freewheeling diode VD functions like an airbag. The moment the relay loses power, its coil generates a reverse high voltage—this happens because the coil is an inductive load and releases rebound energy when de-energized. VD absorbs and diverts this high voltage, preventing it from breaking down VT2. You can simply understand this as putting a “bulletproof vest” on VT2.

图片3 23

Dark-Activated Light-Controlled Switch

This is also a circuit that controls a load switch via light. The operational amplifier (op-amp) here is not a regular comparator, but a hysteresis comparator—it like a switch with elasticity—it wont flip at the slightest touch.

Inverting input (Pin 2): Both R1 and R3 are 10K resistors, which divide the 12V power supply into 6V. So the inverting input has a fixed voltage of 6V, serving as a reference line. Non-inverting input (Pin 3): It is connected to the LDR (R6), R2 (10K resistor), and feedback resistor R5 (1M resistor).

The brighter the light, the lower the resistance of the LDR. At night (when it is dark), the LDR resistance increases, which raises the voltage at the non-inverting input above 6V. The op-amp detects that the non-inverting input voltage is higher, so it outputs a high level (≈12V). During the day (when it is bright), the LDR resistance decreases, dropping the non-inverting input voltage below 6V. The op-amp then detects that the inverting input voltage is higher, so it outputs a low level (≈0V).

Since R5 feeds the op-amp output back to the non-inverting input (this is positive feedback), two things happen: when the op-amp outputs a high level, the feedback further raises the non-inverting input voltage, making it harder for the voltage to drop below 6V; when the op-amp outputs a low level, the feedback further lowers the non-inverting input voltage, making it harder for the voltage to rise above 6V. This prevents the circuit from flipping on and off repeatedly when the light intensity hovers around the 6V threshold—for example, when light flickers on and off at dusk, the circuit wont flip erratically.

Application

You can absolutely combine these circuits with microcontrollers. Enthusiasts often explore how to use photoresistor arduino and apply photoresistor with arduino to wireless light control system. When paired with wireless remote control light switch or control light switch with remote, these setups can realize functions like motion sensor lights outdoor and motion sensing light control. They can also form light with remote control switch, among which remote light switch and receiver are the key to wireless control. In addition, lighting control sensors and sensor light controls technologies also frequently require the use of these circuits.

6344ee48947342ffc046ed16febd42d7

FAQ

Is a photoresistor the same as an LDR?

Yes! LDR is the abbreviation of “Light-Dependent Resistor”, which is synonymous with photoresistor. Both refer to semiconductor devices whose resistance changes with light intensity.

What are the two types of photoresistors?

The most typical classification is based on spectral response:

Visible light-sensitive: It responds to visible light in the range of 400~700nm and is used for daily light control.

Infrared-sensitive: It responds to infrared light and is used for night vision and infrared detection.

What are the disadvantages of photoresistors?

Slow response: It has a millisecond-level response and cannot handle high-frequency light signals (such as rapid flickering).

Poor accuracy: The resistance-light intensity relationship is nonlinear, and it is greatly affected by temperature (when temperature rises, the dark resistance decreases).

Narrow spectrum: It is only sensitive to specific wavelengths (for example, CdS does not respond to infrared/ultraviolet light).

Easy aging: Long-term light exposure causes material characteristic drift (such as gradual decrease in dark resistance).

What is a resistor type relay?

A resistor type relay is triggered by changes in external resistance. When the resistance in the control circuit (such as a photoresistor) reaches a threshold, the relay coil is energized and the contacts switch. For example, in a light-controlled circuit, the resistance change of the photoresistor triggers the relay to control the power supply of street lamps.

What is a relay used for?

A relay is a switch that controls a large current with a small current, and its uses include:

Power amplification: Controlling high-power loads (such as motors and electric lamps) with weak signals.

Circuit isolation: Isolating high-voltage and low-voltage circuits through relays (such as automobile ECUs controlling oil pumps).

Logic switching: Realizing delay functions with time relays and expanding contacts with intermediate relays.

fe2ae6c5 c345 450d 9824 6a512f1c89ce

Why use relay instead of MOSFET?

Scenario

Relay

MOSFET

High voltage/current

Easily switches (low cost)

Requires high-voltage/current models

Electrical isolation

Naturally isolated

Requires additional isolation

Visibility

Contact status visible to the naked eye

Needs measurement with a meter

High-frequency switching

Mechanical contacts have limited lifespan

Can operate at high frequencies (no mechanical wear)

What is the difference between a photodiode and a photoresistor?

Parameter

Photodiode

Photoresistor

Principle

Photoelectric effect (PN junction photocurrent)

Photoconductive effect (resistance change in semiconductor bulk)

Response speed

Fast (nanoseconds–microseconds, suitable for high-speed signals)

Slow (milliseconds, unsuitable for high-frequency scenarios)

Electrical characteristics

Reverse leakage current variation (essentially current)

Direct resistance variation

Typical applications

Fiber optic communication, high-speed light metering

Street light control, low-speed light sensing

Leave a Reply

Your email address will not be published. Required fields are marked *