Here is a more detailed explanation of how it works:
1. Photocell: The photocell or light sensor is usually mounted on the top of the streetlight pole. It is made of a semiconductor material whose resistance changes when exposed to different light levels. When the sun is out and the light level is high, the photocell has a low resistance. As the evening approaches, the light level drops, and the photocell's resistance increases.
2. Relay: The photocell is connected to a relay, which is a switch controlled by electricity. When the resistance of the photocell increases, it completes a circuit that energizes the relay's coil. This causes the relay's contacts to close, allowing electricity to flow through them.
3. Circuit: The relay contacts are connected to the streetlight circuit. When the relay contacts close, the electricity flows through the circuit and turns on the streetlight. The streetlight will remain on until the light level rises again at sunrise, causing the photocell's resistance to decrease and the relay contacts to open, turning off the light.
4. Timer: In some cases, streetlights may also be equipped with a timer to control their operation. The timer can ensure that the lights only come on during certain hours (e.g., from sunset to sunrise), preventing them from turning on during the daytime.
Overall, the combination of a photocell, relay, and sometimes a timer ensures that streetlights automatically turn on when the level of natural light decreases, providing illumination during dark hours.