What Is a Photocell: How It Works and Its Uses

A photocell is a sensor that detects light and responds by changing its electrical properties. The most common type is the light-dependent resistor (LDR), a small disc of semiconductor material whose electrical resistance drops as light intensity increases. You’ve almost certainly benefited from one: photocells are the reason street lights turn on at dusk and off at dawn without anyone flipping a switch.

How a Photocell Works

The most widely used photocell relies on a property called photoconductivity. Inside the sensor is a thin layer of semiconductor material, most often cadmium sulfide (CdS). In darkness, this material resists the flow of electricity. When photons of light strike its surface, they knock electrons free from their atoms, creating a path for current to flow. More light means more free electrons, which means lower resistance.

The relationship between light and resistance is dramatic. In near-total darkness, a typical CdS photocell can have a resistance in the megaohm range (over a million ohms). Under bright light, that resistance can plummet to just a few hundred ohms. The change isn’t perfectly linear. It follows a power-law curve, meaning resistance drops steeply at first as light increases, then levels off under brighter conditions. Individual photocells can vary by 50% or more from the same manufacturing batch, so precise light measurement isn’t their strong suit. What they excel at is detecting whether it’s light or dark.

Photocells vs. Photodiodes and Phototransistors

Photocells aren’t the only light sensors available. Photodiodes and phototransistors serve similar purposes but work differently and suit different jobs.

  • Photocells (LDRs) are the simplest and cheapest option. They need no amplifier circuit, just a resistor to create a basic light-sensing setup. Their response time ranges from about 5 to 100 milliseconds, which is slow by electronic standards but far faster than the human eye can perceive. They’re ideal for applications where you simply need to know “is it light or dark?”
  • Photodiodes respond much faster and can measure light with greater precision, but they produce a tiny current that typically requires an amplifier circuit to be useful. This adds complexity and cost.
  • Phototransistors fall in the middle. They’re more sensitive than bare photodiodes because they have built-in amplification, and they work well at standard circuit voltages (3.3V and above). They cost roughly 80 cents each in quantity, making them affordable for manufactured products.

For hobbyists and simple on/off applications, photocells remain the go-to choice because of their simplicity. For high-speed or precision tasks like optical communication or scientific instruments, photodiodes are the better pick.

Spectral Sensitivity

Photocells don’t respond equally to all colors of light. A CdS photocell’s sensitivity peaks in the green-yellow portion of the visible spectrum, roughly matching the sensitivity of the human eye. This makes CdS cells a natural fit for applications that mimic how people perceive brightness, like automatic lighting controls. Other semiconductor materials shift the sensitivity curve toward red, infrared, or ultraviolet wavelengths, depending on the application.

Street Lights and Dusk-to-Dawn Controls

The single most common use of photocells is controlling outdoor lighting. Municipalities and homeowners alike use photocell sensors to switch street lights, porch lights, and parking lot fixtures on at dusk and off at dawn. Modern street lighting photocells are designed for long service lives. Some industrial-grade models are engineered for 20 years of continuous outdoor operation, handling temperature swings, rain, and UV exposure without replacement.

These sensors typically mount on top of or beside the light fixture, with a small dome-shaped lens pointing toward the sky. As ambient light falls below a set threshold, the photocell triggers a relay that completes the circuit to the light. When the sun rises and light levels climb back above that threshold, the relay opens and the light shuts off. Digital versions can also dim lights during certain hours rather than simply switching them on and off, saving energy during low-traffic periods.

How Dusk-to-Dawn Sensors Are Wired

A standard residential dusk-to-dawn photocell has three wires. The black wire connects to the incoming power supply from your house. The red wire connects to the black (hot) wire of the light fixture. All three white (neutral) wires, from the house, the sensor, and the light, connect together. The photocell sits between the power source and the fixture, acting as an automatic switch. When the sensor detects darkness, it completes the connection between the house’s power and the light. When it detects daylight, it breaks that connection.

Because the black supply wire carries 120 volts in a standard North American installation, you need to turn off the circuit breaker or wall switch before working on the wiring.

Other Everyday Applications

Beyond street lights, photocells show up in a surprising number of places. Night lights use them to turn on only when a room gets dark. Camera light meters historically relied on photocells to gauge exposure. Security lighting systems use them to ensure floodlights only activate after dark, so a motion sensor doesn’t trigger the lights in broad daylight. Some alarm systems use photocell beams, where breaking the light path between an emitter and a sensor triggers the alarm.

In industrial settings, photocells detect objects on conveyor belts, count items passing through a production line, and monitor flame presence in furnaces and boilers. Automatic doors in retail stores often use photocell-based sensors to detect when someone is approaching.

The Physics Behind It

The photocell’s operation traces back to the photoelectric effect, which Einstein explained in 1905. When light hits certain materials, individual photons transfer their energy to electrons in the material. If a photon carries enough energy, it frees an electron entirely. Three features of this process puzzled physicists before Einstein’s explanation: electrons are emitted almost instantaneously with no lag time, the energy of the ejected electrons depends on the color (frequency) of light rather than its brightness, and below a certain frequency of light, no electrons are emitted at all regardless of how bright the source is.

In a photocell, this same principle is at work in a slightly different form. Rather than ejecting electrons from a metal surface, light frees electrons within the semiconductor crystal so they can carry current through the material. The result is the same basic trade: light energy in, electrical signal out.