• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Light Controlled Switch Circuit using IC LM311 and LDR

Light Controlled Switch Circuit using IC LM311 and LDR

Last updated on 19 June 2026 by Admin-Lavi Leave a Comment

This article talks about Light Controlled Switch Circuit using IC LM311 and LDR, as it simple and very useful and it feel light change near it.

We find this circuit in many place like automatic light, street lamp and security system and main thing is about voltage comparator with LM311 IC.

Then LDR sees light and LM311 IC turns ON the relay and relay control other devices.

Also, circuit uses BC547 transistor to control outside loads and the circuit uses 12V DC power or 12V battery.

Circuit Working:

Light Controlled Switch Circuit Diagram using IC LM311 and LDR

Parts List:

ComponentsValuesQuantity
Resistors (All resistors are 1/4 watt unless specified)10k2
1k1
2.2k1
Preset 47k1
LDR as sensor1
SemiconductorsIC LM3111
Transistor BC5471
Diode 1N40071
LED 5mm 20mA1
Relay 12V SPST1

LM311 comparator is main part of this circuit and it compare two voltage levels.

First, pin 2 Non-Inverting positive get reference voltage from preset VR1 and resistor R1 and then pin 3 Inverting negative get voltage from LDR and resistor R2 as voltage divider.

When light is bright the LDR resistance goes down and voltage at pin 3 goes up and then if pin 3 voltage is higher than pin 2 and output pin 7 goes LOW and this turns OFF the transistor and relay.

Therefore, when light is dim LDR resistance goes up and voltage at pin 3 goes down and further, if pin 3 voltage is lower than pin 2 then output pin 7 goes HIGH and this turns ON the transistor Q1 and relay.

Hence, LED1 glows to indicate relay operation and diode D1 protects the circuit from voltage spikes generated by the relay coil.

Formulas with Calculations:

Voltage at Pin 3 (Inverting input):

Pin 3 voltage come from LDR and R2 voltage divider:

Formula:

V3 = (R2 / (LDR + R2)) × V_supply

Example:

If LDR in dark is 50kΩ

V3 = (10k / (50k + 10k)) × 12V = 2V

If LDR in bright light is 5kΩ

V3 = (10k / (5k + 10k)) × 12V = 8V

How to Build:

To build a Light Controlled Switch Circuit using IC LM311 and LDR follow below steps for connection:

  • First, pin 1 of LM311 IC goes to GND
  • Next, pin 2 of LM311 IC goes to Non-Inverting input between R1 and R2
  • After that, pin 3 of LM311 IC goes to Inverting input between VR1 preset and LDR
  • Also, pin 4 of LM311 IC goes to GND
  • Then pin 5 and pin 6 of LM311 IC connects together
  • Further, pin 7 of LM311 IC goes to base of transistor Q1 through resistor R3
  • Now pin 8 of LM311 IC goes to positive supply +12V
  • Collector goes to positive supply through diode D1 and emitter goes to GND
  • Also, one coil pin connects to positive supply and other coil pin connects between diode D1 and transistor collector
  • LED anode connects to positive supply and LED cathode connects to one end of resistor R4 and also other end of resistor R4 connects between diode D1 and transistor collector

Conclusion:

To conclude, this Light Controlled Switch Circuit using IC LM311 and LDR is simple and works good, also LM311 comparator make switching exact.

Here, transistor BC547 help relay work strong and if required we can change sensitivity by preset VR1.

In addition , circuit is good for automatic night lights, security alarms and for saving energy.

References:

Datasheet IC LM311

Filed Under: Automation Circuits, DIY Projects, LDR Circuits, LED and Lamps, Sensors and Detectors

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « IC 555 Timer Based Mini Flasher Circuit
Next Post: PWM Dimmer Circuit for 12V DC Lamp »

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar




Categories

  • 555 Timer Projects (123)
  • Alarm Circuits (75)
  • Amplifier Circuits (92)
  • Arduino Projects (103)
  • Audio Circuits (189)
  • Automation Circuits (113)
  • Automobile Circuits (38)
  • Battery Charger Circuits (86)
  • DIY Projects (368)
  • Free Energy (12)
  • Heater and Temperature Controllers (32)
  • High Voltage (23)
  • Hobby Circuits (198)
  • Indicator Circuits (62)
  • Inverter Circuits (18)
  • IoT projects (10)
  • LDR Circuits (45)
  • LED and Lamps (196)
  • Meters and Testers (43)
  • Mini Projects (299)
  • Motor Controllers (25)
  • Oscillator Circuits (63)
  • Power Supply Circuits (228)
  • Radio Frequency (7)
  • Remote Control Circuits (11)
  • Renewable energy (13)
  • Security and Protection (108)
  • Sensors and Detectors (224)
  • Solar Circuits (31)
  • Timer Circuits (62)
  • Transistor Circuits (176)
  • Transmitter Circuit (19)
  • Tutorials (29)
  • Voltage Regulator (38)
  • Water Level Controller (10)

Recent Posts

  • Low Current Controlled Battery Charger Circuit using LM723 IC
  • 741 Op-Amp Treble Booster Circuit
  • Simple Diode and Transistor Based Audio Limiter Circuit
  • Simple 500mW Speaker Driver Circuit
  • Easy DIY LM386 Audio Amplifier Circuit

Recent Comments

  1. Tony Gallegos on NTC Thermistor Based Temperature to Voltage Converter Circuit
  2. colin on Simple Single Transistor Audio Amplifier Circuit
  3. How to Make a Bird Chirping Noise Easily on Chirping Bird Sound Generator Circuit
  4. Transistor Based Medium Impedance Preamplifier Circuit - Circuit Ideas for You on Low Impedance Input Transistor Preamplifier Circuit
  5. Admin-Lavi on Alternate Red Green LED Flasher Circuit

Copyright © 2026 | New Circuit Ideas