blogblog

Light-Activated Switch Using a MOSFET

Jan 08, 2026 411

A MOSFET is a special type of field-effect transistor. Unlike BJTs, which are current-controlled devices, MOSFETs are voltage-controlled. A typical MOSFET has three terminals: gate, source, and drain, while a BJT uses a base, collector, and emitter.

When a voltage is applied to the gate of a MOSFET, it creates an electric field that controls the flow of current through the channel between the source and drain. No current flows directly into the gate, which is one of the key advantages of MOSFETs.

MOSFETs are widely used in many electronic circuits, including voltage regulators, motor speed controllers, solar tracking systems, light-activated switches, and more. This article explains how to design a light-activated switch using a MOSFET.

Light-Activated Switch Using a MOSFET

The main idea of this circuit is to build a simple system that automatically turns a load, such as an LED, ON or OFF based on the surrounding light level. In this circuit, the load is controlled using a MOSFET.

Required Components

The components needed to build this light-activated MOSFET switch include an IRFZ44N MOSFET, an LDR (light-dependent resistor), a 4.5 MΩ resistor, a 12 V LED strip as the load, and a 9 V battery for the power supply.

Light-Activated Switch Connections

The connections for the light-activated switch using a MOSFET are as follows:

Light-Activated Switch Circuit with MOSFET

Light-Activated Switch Circuit with MOSFET

The drain terminal of the IRFZ44N MOSFET is connected to the negative terminal of the LED.

The negative end of the 4.5 MΩ resistor is connected to the source terminal of the MOSFET, while the positive end is connected to the positive terminal of the LED.

The positive terminal of the LDR is connected to the gate of the MOSFET, and its negative terminal is connected to the MOSFET’s source terminal.

One terminal of the resistor is connected to the positive terminal of the battery, and the gate terminal is connected to the negative terminal of the battery (GND).

Working Principle

A night light is a small lighting device used to provide visibility in dark areas or during low-light situations, such as at night or during emergencies. In this circuit, a MOSFET is used to build a simple, homemade light-activated switch. High-efficiency lighting systems can be automatically controlled based on factors such as ambient light availability or occupancy.

An LDR (light-dependent resistor), also known as a photoresistor, is a variable resistor whose resistance changes with light intensity. This behavior is known as photoconductivity. As the light level increases, the resistance of the LDR decreases. Photoconductive materials show higher electrical conductivity when exposed to stronger light, which makes LDRs suitable for light- and dark-activated switching circuits as well as light-sensing detector applications.

A light-dependent resistor is typically made from a high-resistance semiconductor material. When light of sufficient frequency strikes the surface, the absorbed photons provide enough energy for bound electrons to move into the conduction band. This increases current flow and reduces the resistance of the device. In this circuit, the LDR must be placed where it is exposed to ambient light so it can accurately sense changes in light level.

The photosensitivity of an LDR can vary with ambient temperature. In addition, LDRs usually exhibit a small response delay—typically around 10 ms or less—between changes in light intensity and the corresponding change in resistance.

In this circuit, the LDR controls the operation of an LED through a MOSFET. When the LDR detects high light intensity, its resistance decreases, causing the LED to turn OFF automatically. When the light level drops, the resistance increases and the LED turns ON. This simple light-activated switch automatically turns the light ON at night and OFF during the day. It is low-cost, energy-efficient, and well suited for everyday automation in homes, gardens, and similar applications.

Advantages and Disadvantages

Advantages

The advantages of a light-activated switch include the following:

  • No manual operation is required.
  • The circuit consumes very little power.
  • It is simple to design and uses only a small number of components.
  • The LDR provides a high resistance difference between light and dark conditions.

Disadvantages

The disadvantages of a light-activated switch include the following:

  • Care must be taken while operating and handling the circuit.
  • The spectral response of the LDR is limited.
  • The circuit has poor temperature stability.
  • The resistance of the LDR changes with a slight delay when switching between light and dark, which limits its use in applications where light levels change rapidly.

Applications

The applications of a light-activated switch include the following:

  • Used in security systems, where the light turns off or triggers a response when darkness is detected by the LDR.
  • Helps automatically switch lights ON when ambient light levels drop; the LDR has high resistance in darkness and low resistance in bright light.
  • Commonly used in garden and outdoor lamps that turn ON automatically at night.
  • Used in drawer alarm systems, which activate when a dark drawer is opened.
  • Used to switch OFF a single lamp or a group of lamps based on changes in ambient light.
  • Can also be used as an automatic street lighting control system.

Related Articles

Guide to Hybrid Potentiometer

Diode Dynamics: Real-World Behavior in Fast Power and RF Circuits

How Can You Fix an Oil Pressure Sensor?

Guide to Corner Reflector

Guide to 1N5408 Power Diode

What is a CMOS Sensor?

Guide to Ryzen AI Max+ 395

Guide to Coprocessor

SL2002 Laser Driver IC

Christopher Anderson

Christopher Anderson has a Ph.D. in electrical engineering, focusing on power electronics. He’s been a Senior member of the IEEE Power Electronics Society since 2021. Right now, he works with the KPR Institute of Engineering and Technology in the U.S. He also writes detailed, top-notch articles about power electronics for business-to-business electronics platforms.

Subscribe to JMBom Electronics !

Email
Email

Leave Us A Message!

We`re not around but we still want to hear from you! Leave us a note:

SEND
EmailWhatsApp
*You can contact us directly on WhatsApp!