Description
The 12V Relay Module with LDR is a complete, self-contained light-activated switching solution designed specifically for 12V DC systems — including automotive, marine, solar power installations, industrial control panels, and 12V battery-backed applications. Unlike 5V versions that rely on USB or microcontroller power, this module operates directly from 12V power sources, making it ideal for vehicles, boats, RVs, off-grid cabins, and commercial 12V control systems.
The module integrates a photoresistor (LDR) with a powerful 12V relay output on a single compact board. As ambient light levels change, the resistance of the LDR changes proportionally. An onboard LM393 comparator processes this signal against a reference voltage set by the blue potentiometer, providing clean, stable switching without the jitter or noise associated with simple transistor-based circuits.
The module features an SPDT relay (Single Pole Double Throw) with screw terminals for COM (Common), NO (Normally Open), and NC (Normally Closed). The relay contacts are rated for 10A at 250V AC or 30V DC, making it capable of switching most common loads directly — from 12V LED lighting and automotive spotlights to exhaust fans, water pumps, and security alarms.
Key features include a red power indicator LED, a blue relay status LED, an onboard potentiometer for precise sensitivity adjustment, and four mounting holes for secure installation. The module operates directly from a 12V DC power supply (vehicle battery, marine battery, 12V adapter, or solar battery) and requires no microcontroller or programming for basic operation — though it can easily be interfaced with one if more complex logic is needed.
This module is ideal for automatic vehicle lighting, boat navigation light control, security lighting, darkroom equipment, solar-powered garden lighting, daylight-responsive ventilation systems, and any 12V-powered application where light level triggers an action. It is suitable for both hobbyist projects and commercial installations such as signage lighting control, agricultural lighting, and marine equipment automation.
Features
-
Designed for 12V DC operation — vehicles, boats, solar systems, industrial 12V panels
-
All-in-one design — LDR sensor and relay on a single PCB, no external components required
-
Adjustable light sensitivity via onboard blue potentiometer — set any brightness threshold
-
LM393 comparator for stable, jitter-free switching
-
SPDT relay contacts — COM, NO, NC terminals for flexible load wiring
-
High load capacity — 10A at 250V AC or 30V DC, suitable for most 12V loads and AC loads
-
Dual LED indicators — Red LED for power, Blue LED for relay status
-
Standalone operation — works with just a 12V power supply, no microcontroller needed
-
Four mounting holes (3mm) for secure panel or enclosure installation
-
Screw terminal blocks for reliable, tool-free wiring
-
Automotive-grade compatibility — operates within typical vehicle voltage range (10V–14V)
Technical Parameters
Usage Guide
1. Module Overview
The board has three main sections:
-
LDR Sensor — The photoresistor (often with a clear or blue epoxy coating) detects ambient light. The LDR may be mounted directly on the board or on a short cable for remote positioning.
-
Comparator Section — Contains the LM393 IC and blue potentiometer for setting the light threshold.
-
Relay Section — Contains the 12V relay, screw terminals (COM, NO, NC), and status LEDs.
2. Wiring Instructions (12V DC Power)
3. Understanding Relay Operation
The relay acts as an electrically operated switch:
Typical configurations:
4. Sensitivity Adjustment
The blue potentiometer sets the light level threshold at which the relay changes state:
Adjustment tip: Cover the LDR completely with your hand. Slowly turn the potentiometer until the relay clicks (or the blue LED lights). This sets the “dark” threshold. Test by uncovering the LDR — the relay should change state when ambient light returns.
5. Standalone Operation (No Microcontroller Required)
The module works entirely on its own with just a 12V power supply:
-
Connect 12V and GND to a vehicle battery, marine battery, 12V wall adapter, or solar battery
-
Connect your 12V load (lamp, fan, alarm, etc.) to the relay terminals (COM and NO or NC)
-
Adjust sensitivity with the potentiometer
-
When ambient light crosses the threshold, the relay automatically switches
No programming — truly plug-and-play!
6. Vehicle Application Example (Automatic Headlight / Courtesy Light)
To control a 12V vehicle accessory (e.g., courtesy light that turns ON when dark):
12V Vehicle Battery (+) ──→ COM (Relay)
Courtesy Light (+) ──→ NO (Relay)
Courtesy Light (-) ──→ Vehicle Chassis Ground / Battery (-)
Module VCC ──→ 12V Vehicle Battery (+)
Module GND ──→ Vehicle Chassis Ground
LDR Position ──→ Mount on dashboard or near windshield to detect outside light
Result: The courtesy light turns ON automatically when it gets dark (e.g., at dusk) and turns OFF when daylight returns.
7. Marine Application Example (Navigation Light Control)
To control a 12V boat navigation light that turns ON at dusk:
12V Marine Battery (+) ──→ COM (Relay)
Navigation Light (+) ──→ NO (Relay)
Navigation Light (-) ──→ Battery (-)
Module VCC ──→ 12V Marine Battery (+)
Module GND ──→ Battery (-)
LDR Position ──→ Mount in a location exposed to sky (but protected from spray)
8. AC Load Wiring Example (Using 12V Module to Control AC Lights)
The module can also switch 110V/220V AC loads while being powered by 12V DC:
AC Live (110V/220V) ──→ COM (Relay)
AC Load Live ──→ NO (Relay)
AC Neutral ──→ Load Neutral (direct)
Module VCC ──→ 12V DC Power Supply
Module GND ──→ 12V DC Power Supply GND
⚠️ Safety Warning: The module uses 12V DC power, but the relay contacts can switch dangerous AC voltages. Always disconnect AC power before wiring, use proper insulation, and mount the module in an enclosure.
9. Solar Lighting Application Example
For an off-grid solar-powered light that turns ON at night:
Solar Battery (12V) (+) ──→ COM (Relay)
LED Light (+) ──→ NO (Relay)
LED Light (-) ──→ Solar Battery (-)
Module VCC ──→ Solar Battery (+)
Module GND ──→ Solar Battery (-)
LDR Position ──→ Mount in a location that sees ambient light (not shaded by the light itself)
10. Using With a Microcontroller (Optional)
The module can also be used as a light sensor input for Arduino, ESP32, or other microcontrollers. Many versions provide a digital output (DO) pin that changes state based on the light threshold.
Important: The digital output is typically 12V. Do NOT connect directly to a 5V or 3.3V microcontroller pin without a voltage divider or level shifter.
11. Important Notes
-
Power supply: Use a regulated 12V DC power supply or a stable 12V battery. The module is designed for 10V–14V range. Do not exceed 15V.
-
Vehicle use: The module will tolerate typical automotive voltage variations (including charging voltage up to ~14.5V). For protection against load dump spikes, we recommend adding a 16V or 18V TVS diode across VCC and GND.
-
LDR placement: Position the LDR to measure the ambient light you want to detect — away from the load’s own light output to prevent feedback loops.
-
Response time: The module responds within milliseconds of the light threshold being crossed.
-
Reverse polarity: Most versions do not have reverse polarity protection. Double-check wiring before applying power.
Q: What is the difference between the 12V and 5V versions of this module?
Choose the 12V version if your power source is a vehicle battery, marine system, solar battery, or industrial 12V control panel.
Q: Does this module need a microcontroller to work?
No. The module works in standalone mode with just a 12V power supply. When the light level crosses the adjustable threshold, the relay automatically switches. This makes it perfect for simple 12V applications like automatic vehicle lighting, boat navigation lights, or solar-powered night lights without any programming.
Q: How do I set the light threshold?
Adjust the blue potentiometer on the board:
-
Apply 12V power to the module
-
Expose the LDR to the light level at which you want the relay to switch
-
Slowly turn the potentiometer until the relay clicks (or the blue LED changes state)
-
Fine-tune by moving the LDR between dark and bright conditions
For a “lights ON at dusk” application, set the threshold at the desired evening light level.
Q: What loads can I control with this module?
The relay contacts are rated for 10A at 250V AC or 10A at 30V DC — sufficient for most 12V loads and AC loads:
For inductive loads (motors, pumps, solenoids), we recommend derating to ≤5A or adding a flyback diode (for DC loads) or snubber (for AC loads).
Q: Can I use this module in a vehicle? Is it protected against voltage spikes?
Yes, the module is designed for 12V automotive systems (10V–14V range). However, vehicles can experience voltage spikes during load dump (e.g., disconnecting a battery while the alternator is charging). For maximum reliability:
-
We recommend adding a 16V or 18V TVS diode (e.g., 1.5KE16A) across VCC and GND
-
Alternatively, use a 12V automotive-grade power filter upstream of the module
-
The module alone will work for most passenger vehicles, but heavy trucks and industrial equipment may require additional protection
Q: Can I use this module in a marine environment (boat)?
Yes, with precautions:
-
The PCB is not waterproof — mount inside a waterproof enclosure (IP65 or better)
-
Use marine-grade connectors and heat-shrink tubing on all connections
-
Apply conformal coating to the PCB for moisture resistance
-
Avoid mounting directly above bilge water or in areas prone to condensation
-
For navigation light control, mount the LDR where it can see sky light but is protected from spray
Q: Can I use this module with a 24V vehicle system (truck, bus, heavy equipment)?
No, not directly. The module is designed for 12V nominal (10V–14V). For 24V systems, you have two options:
Do NOT connect the module directly to 24V — it will be permanently damaged.
Q: Why is my module triggering randomly or too easily?
Possible causes:
-
Sensitivity too high — turn the potentiometer clockwise to reduce sensitivity
-
LDR exposed to changing light — position the LDR away from headlights, passing vehicles, or the load’s own light output
-
LDR facing a light source directly — point the LDR toward the area you want to measure, not directly at a lamp
-
Vehicle electrical noise — add a 1000µF / 25V capacitor across VCC and GND to filter noise
-
LDR near hot engine components — the LDR is temperature-sensitive; keep away from exhaust manifolds, turbochargers
-
Reflective surfaces — light bouncing off shiny surfaces can cause inconsistent readings
Q: Why isn't my module switching at all?
Troubleshooting steps:
-
Check power — measure 12V across VCC and GND (the red power LED should be lit)
-
Check sensitivity — turn the potentiometer fully counter-clockwise (maximum sensitivity)
-
Cover the LDR completely — the relay should activate (blue LED lights)
-
Shine a bright light on the LDR — the relay should deactivate
-
Check load wiring — if the relay clicks but the load doesn’t work, verify your COM/NO/NC connections
-
Check LDR cleanliness — dust or grime on the LDR can reduce sensitivity
Q: Can I use this module outdoors?
Yes, but with precautions:
-
The PCB is not weatherproof — mount inside a weatherproof enclosure (IP65 or higher)
-
The LDR can be placed behind a clear window (but note that glass may slightly reduce sensitivity)
-
For outdoor use, position the LDR to avoid direct sunlight saturation (early morning/late afternoon light is best for dusk/dawn switching)
-
Use weather-resistant cable glands for power and load wiring
-
For marine or high-humidity environments, use conformal coating on the PCB