Transistor as a Switch Using LDR

LDR Symbol

A light-dependent resistor (LDR), such as an ORP12, is a special type of component whose resistance changes in an inversely proportional manner to the light intensity falling upon it. In the dark, its resistance increases; however in light, its resistance decreases. The ORP12 increases its resistance to approximately 1 MΩ in the dark, and in the light its resistance decreases to approximately 5.4 kΩ. By using this type of resistor to bias a transistor, we can make a transistor switch power to a load depending upon the light conditions. Simple transistor circuits with LDR are very common and used in night lighting and emergency lighting systems. The transistor may directly drive a low-current LED or bulb, or a relay coil, which then acts as a switch to control a high-current load.


LDR Basics

When you buy a new LDR, it is always a good idea to test the component using a multimeter to ensure it is working properly. You will see that the resistance will vary as the amount of light falling upon it varies. Just as with fixed resistors, Ohm's Law (V = I × R) also applies to this component. Hence with current (I) as constant, voltage and resistance are directly proportional. Consequently, as resistance (R) increases, then the voltage (V) across the resistor must increase too, and if the resistance decreases, then the voltage across the resistor must decrease too.

Transistor with LDR Circuit Diagram

Transistor Circuit with LDR

Building a simple light detecting circuit is very easy. It does not need special components and requires only a low-current torch bulb, 4 × 1.5 V dry cells, a BC548 transistor, and an ORP12 LDR. When choosing a suitable NPN transistor, make sure its maximum DC collector current (Ic) is sufficiently large enough to drive the torch bulb you are using. A BC548 can switch up to 100 mA of drive current, the 2N3904 can switch up to 200 mA drive current.

To use a LDR, we usually make it part of a Potential Divider (PD) network consisting of a fixed resistor R. The output voltage of this network, which is taken from the centre connection relative to ground determines the voltage across the base junction. When the resistance of the LDR changes, the voltages across the two resistors changes in a predictable manner, because their sum is always equal to the supply voltage which is 6 V for this circuit. When the LDR resistance decreases, the voltage across it decreases too, but the voltage across R increases. When the LDR resistance increases, the voltage across it increases too, but the voltage across R decreases. Hence when the voltage across one resistor increases, the voltage across the other has to decrease such that the sum of voltages is equal to the supply voltage. Top tip: In these types of circuits, we tend to focus on the voltage formed across the lower resistor because this is also the voltage across the base junction of the transistor.

In this circuit configuration, the bulb is ON in the light, and OFF in the dark. When light falls on the LDR, its resistance drops, and so does the voltage across it, however the voltage across R increases. Hence the voltage across the base junction increases and the transistor conducts switching ON the bulb.

Captain Kirk’s Emergency Lights

Let us say that you are Captain Kirk of USS Enterprise. You are always in battle with the Klingons and they always knock out the main engines. You are getting tired of shouting, "Emergency Lights Scotty!" As a captain of one of the most advanced state-of-the-art galaxy-class federation starships, you should not have to tell your subordinates to switch ON the lights, as it should happen automatically.

You need an automatic emergency lighting system utilising a NPN transistor, light-dependent resistor, and batteries. When the auxillary power fails, the system should automatically switch ON the emergency lights to maintain basic life support to the crew.

You speak to your Chief Engineer Scotty in the UK who tells you that the system will cost 1.3 billion pounds of taxpayer’s money and should be ready in six years time. However, as usual, he cannot guarantee it! Being a clever captain, you know that you can build the circuit with a couple of light bulbs and batteries from the corner store.


Emergency Light Circuit Diagram

Emergency Light using LDR Circuit Diagram

In the light, the LDR resistance decreases, and the voltage across it decreases too. Consequently, the voltage across the base junction is not sufficient to make the transistor conduct. In the dark, the LDR resistance increases, and the voltage across it increases too. This increase in voltage across the base junction thereby causes the transistor to conduct. Consequently, the bulb lights up! Hence, the bulb is OFF in the light and ON in the dark.

Related Articles

The Transistor
Transistor as a Switch Biasing
Darlington Transistor
Phototransistor
Transistor as a Switch Using LDR
Metal Oxide Semiconductor Field Effect Transistor (MOSFET)
Using a Transistor to Drive a Motor
Transistor Circuit to Drive LED
Transistor as a Switch for Relay
Transistor as a Logic Switch
Transistor as a Switch PDF