A traffic light showing green at a busy city crossing, with cars moving and people crossing the street in daylight

How Does a Traffic Light Work?

By Zorium Daily Technology Desk

SUMMARY OF THIS ARTICLE

  • A traffic light is a set of red, amber, and green lamps that tells drivers and people on foot when to stop, wait, and go, so everyone can share the same crossing safely.
  • Red means stop, amber means get ready and stop if you safely can, and green means go — but only when the way ahead is clear.
  • Many lights run on a fixed timer, while smarter ones use sensors in the road to notice when a car is waiting and change at the right moment.
  • The most common sensor is an inductive loop, a wire buried under the road that can tell when a car’s metal body is sitting above it.
  • A small controller box at the junction runs the whole show, and lights along a road can be timed together so drivers catch a run of green lights.

The Morning the Light Turned Red — and Saved the Day

It is eight in the morning. You are walking to school, bag on your back, and the road ahead is packed. Buses crawl past. A delivery van beeps. You reach the crossing, press the button on the pole, and wait.

Then the light turns red. Every car stops. The little green walking person lights up, and you cross the road in peace, while a whole line of traffic waits for you.

It feels so normal that you hardly think about it. Yet think for a moment about what would happen without that light. Every driver would have to guess. Every person on foot would have to guess too. That simple idea — three coloured lamps, taking turns — keeps millions of crossings safe every single day.

So how does it actually work? Who decides when the light changes? How does the light know a car is waiting, when nobody is there to press a button? And why did the very first traffic light run on gas, more than 150 years ago? This article answers all of that, in plain words.

What Is a Traffic Light, in Simple Words?

A traffic light is a signal that tells road users what to do at a crossing. It hangs above the road or stands on a pole at the side, and it shows one colour at a time: red, amber, or green. Each colour is a short message. Stop. Get ready. Go.

The job of the light is to share the road. At a busy junction, cars come from four directions, and people on foot want to cross too. They cannot all move at once. So the light gives each group its turn. One direction gets green while the others get red. Then the turns swap. Nobody has to shout or wave. The colours do the talking.

Most traffic lights have three lamps in a tall box, one above the other. Red sits at the top, amber in the middle, and green at the bottom. The order is the same almost everywhere in the world. Even if you are colour-blind, or the sun is shining right into the lamp, you can still tell which light is on by where it sits in the box. Top means stop. Bottom means go.

Inside each lamp there used to be a normal bulb, with a coloured glass cover in front of it. Today most lights use LEDs, the same kind of bright, low-power lights you find in a torch. LEDs last far longer, use far less power, and stay bright even in strong sunlight.

What Do the Three Colours Mean?

Red means stop. When the red lamp is on, you wait behind the white line on the road. You do not creep forward. You stop, and you stay stopped until the light changes. Red is the most important colour of the three, because it is the one that prevents crashes. When your light is red, someone else’s light is green, and they are moving through the crossing. If you go on red, you drive straight into their path.

Green means go — but with a small condition. Green means it is your turn, and you may move forward, but only if the way ahead is clear. If the crossing is still full of cars, or a person is still walking across, you wait, even on green. Green is a permission, not an order. It says “you may go now”, not “you must go right now”.

Amber sits between the two, and it causes the most confusion. Amber means get ready, and stop if you safely can. When green changes to amber, the light is warning you that red is coming in a few seconds. If you are far from the crossing, slow down and stop. If you are already so close that stopping would mean slamming on the brakes, carry on carefully and clear the road. Amber is not a signal to speed up and beat the red light. That is how crashes happen.

In many places, after red, the light shows red and amber together for a moment before turning green. That is a “get ready” signal too. But red and amber together still means stop. You wait until the green lamp alone is on.

How Does a Traffic Light Know When to Change?

The first kind is the fixed timer. The controller box is set to a timetable, a bit like a school bell. Green for this direction for 30 seconds, amber for 3 seconds, red for 30 seconds, then back to green. The pattern repeats all day, or changes at set times: longer greens on the busy main road during the morning rush, shorter ones late at night.

A fixed timer is cheap, simple, and reliable. But it has one clear weakness. It cannot see the road. At two in the morning, when the streets are empty, a fixed timer will still make you sit at a red light for a full minute, staring at an empty crossing, waiting for cars that are not there. It follows the clock, not the traffic.

That is why many junctions use the second kind of plan: a light that reacts to what is actually happening on the road. If no cars are waiting on a side road, the light stays green for the main road. If a car pulls up on the quiet side road, the light notices, and after a safe pause it changes to let that car through.

A close-up of a traffic light with red, amber, and green lamps in a vertical row, the red lamp glowing against a soft blue sky

The Hidden Loop Under the Road

Next time you stop at a red light, look down at the road just before the white line. If you look closely, you may see thin dark lines cut into the tarmac, forming a rectangle or a circle. That is not a repair. That is the sensor.

Under that rectangle sits a loop of wire, buried in a shallow slot cut into the road surface. Engineers call it an inductive loop, and it is the most common traffic sensor in the world.

Think of the wire loop as a quiet hum. A small electric current runs through it all the time, making a weak magnetic field, a bit like the invisible pull around a fridge magnet. When nothing is above it, the hum stays steady. But when a car drives over the loop and stops on top of it, the car’s metal body changes that magnetic field. The detector, a small device in the controller box, notices the shift at once and sends a message: a car is waiting here.

That is all it takes. The controller hears “car waiting on the side road” and works it into the plan. It waits for a safe moment, lets the main road traffic finish, then turns the side road green. When the car drives away, the loop goes quiet again.

Motorbikes and bicycles are lighter, with less metal, so some loops struggle to notice them. That is why you sometimes see a bike waiting at a light that never seems to change. Newer junctions fix this by making the loop more sensitive, or by adding a second sensor.

There are other kinds of sensors too. Some junctions use small cameras on top of the pole. Others use radar, the same kind of invisible waves that help planes and ships spot things far away.

The Little Box That Runs the Whole Junction

If the lamps are the face of a traffic light, the controller box is the brain. Walk past any busy junction and you will see it: a grey or green metal cabinet, about the size of a tall fridge, standing on the pavement near the corner. Inside it sits a small computer, and it runs everything.

The controller holds the timetable. It knows how long each green should last, how long amber should last, and how long the pause between one green and the next should be. That pause matters. It gives cars that are already in the crossing time to get out before the next direction gets green. Without it, two streams of traffic would meet in the middle.

The controller also listens to the sensors. When the loop under the road reports a waiting car, the controller notes it. When a person on foot presses the crossing button, the controller notes that too. Then it fits those requests into the timetable, in a safe order. It never gives two directions green at the same time.

The controller also keeps the lights safe when something goes wrong. If a bulb fails, or a wire breaks, the controller notices and switches the junction to a safe mode. Often that means flashing amber in all directions, telling every driver to slow down and treat the crossing like a normal junction, giving way and taking care.

The Green Wave: How Lights Work Together

Now picture a long, straight road through a city, with traffic lights every few hundred metres. You drive down it, catch a green at the first light, and then — red at the next one. Green again, then red again. Stop, start, stop, start. It is slow, annoying, and it wastes fuel.

Engineers have a fix for this, and it has a lovely name: the green wave. If the lights along a road are timed so that each one turns green just as the cars from the previous light arrive, drivers can ride a wave of green lights all the way down the road. One green after another, with hardly any stopping.

It works like this. Say the lights are 300 metres apart, and cars travel at about 40 kilometres per hour. At that speed, a car takes about 27 seconds to travel from one light to the next. So the second light is set to turn green about 27 seconds after the first one. The third light turns green 27 seconds after the second, and so on.

The green wave does not work perfectly all the time. If traffic is very heavy, or a bus stops, the wave breaks, and cars bunch up again. And a green wave in one direction often means a red wave in the other direction, because the same lights cannot favour both ways at once. So engineers usually set the wave for the busier direction during the morning rush, then flip it for the evening rush.

Still, when it works, it is a small joy. Fewer stops mean less waiting, less fuel burned, and less dirty air. The next time you catch three green lights in a row, you are not just lucky. Someone timed them that way, on purpose.

A Short History: From Gas Lamps to Computers

Traffic lights feel modern, but they are older than cars. The very first traffic signal was put up in London, in December 1868, near the Houses of Parliament, on the corner of Great George Street and Bridge Street.

It looked nothing like the lights we know today. It was a tall pole, about 22 feet high — taller than a two-storey house — with arms that moved like railway signals, and a gas lantern on top that shone red or green at night. It was designed by a railway engineer named John Peake Knight, who borrowed the idea from railway signals.

A police officer stood at the base of the pole and worked it by hand, turning a handle to move the arms and change the coloured glass in the lantern. During the day, the arms did the talking: arm up flat meant stop, arm lowered at an angle meant go with care.

It did not last long. Just a few weeks later, on 2 January 1869, the gas leaked, the lantern exploded, and the officer working it was badly hurt. The signal was taken down, and for many years nobody tried again.

Electric lights changed everything. In 1912, a police officer in Salt Lake City, in the United States, built one of the first electric traffic lights, a wooden box with red and green bulbs. In the 1950s, computers began to help, and lights could finally react to traffic instead of just following a clock.

Today’s traffic light is a long way from that gas lamp in 1868. It has LED lamps, buried sensors, a computer in a box, and sometimes a link to a city control centre. Yet the core idea has not changed at all. Three colours. Take turns. Share the road.

What About the Person on Foot?

So far we have talked mostly about cars. But traffic lights are for people on foot too, and the crossing is where the two meet. That is why almost every busy junction also has signals for walkers.

The most common kind is the push-button crossing. You press the button on the pole, a small light on the box comes on to say “wait”, and the controller adds your request to its plan. After a short while, the traffic light turns red, the green walking person lights up, and you cross. In some places there is also a sound — a steady beep while it is safe to cross.

Some crossings do not need a button at all. At a big junction, the walking signal comes on by itself, as part of the normal cycle, every time the lights change. At quiet crossings, a sensor above the road may notice you standing and waiting, and call the green person for you, with no button to press.

There is also a clever safety feature on many modern crossings. The sensor watches you while you cross. If you are walking slowly, perhaps with a stick, a pram, or a small child holding your hand, the green person stays on a little longer, giving you time to reach the other side.

The rule for walkers is the same as for drivers: red means wait, green means go, but look anyway. A green person does not make the road safe by magic. A driver may run a red light, or turn across your path. So look left, look right, and listen, even when the little green person says it is your turn.

What Happens When a Traffic Light Breaks?

Traffic lights are tough, but they do break. A storm knocks out the power. A lorry clips a pole. A bulb fails. When that happens, the junction does not just go wild. It has a plan for failure too.

The first thing the controller does is try to stay safe. If one lamp fails, the controller may switch the junction to flashing amber on all sides. Flashing amber is a warning, not a permission. It tells every driver: slow down, look carefully, and give way, as if this were a normal crossing with no lights at all.

If the power goes out completely, all the lights go dark. Then the normal rules of the road take over. Drivers must slow down, look in every direction, and let the car that arrived first go first — depending on the local rules where they live.

Power cuts are rarer now than they used to be, because many modern lights have a small battery backup inside the controller box. If the mains power fails, the battery keeps the lights running for a while, often long enough for engineers to arrive and fix the problem.

If you see a broken traffic light, slow down, take extra care, and if you can, report it. Most cities have a phone number or a website for reporting faulty lights. One call can get an engineer out the same day, and fix a junction before it causes a crash.

Simple Tips for Crossing Safely

If you are driving, slow down as you reach a light, even on green. A green light can change at any moment, and a car ahead may stop suddenly. Keep a safe gap to the car in front, so you are never stuck in the middle of the crossing when the light turns red. And never try to beat an amber light by speeding up.

If you are walking, press the button and wait for the green person. Do not cross on red, even if the road looks empty. A quiet road can change in a second, and a car can appear around a corner faster than you expect. Teach children this early, on the walk to school: wait for the green person, look both ways, and walk across the road.

If you are cycling, remember that the lights apply to you too. A bicycle is a vehicle on the road, and the red light means stop for you just as it does for a car. Stop at the line, wait for green, and be extra careful when turning, because drivers may not see you in their mirrors.

And for everyone, one more habit: put the phone away at a crossing. A text message can wait ten seconds. A crossing cannot. Eyes up, ears open, and then cross.

Cars waiting at a red traffic light at a city junction at dusk, with brake lights glowing and street lights coming on

Frequently Asked Questions

What does each colour on a traffic light mean?

Red means stop and wait behind the line. Amber means get ready, and stop if you safely can, because red is coming next. Green means go, but only if the way ahead is clear. For people on foot, a red standing person means wait, and a green walking person means cross, while still looking both ways.

How does a traffic light know a car is waiting?

Most junctions use an inductive loop, a wire buried in a slot under the road just before the white line. When a car’s metal body sits above the loop, it changes the loop’s magnetic field, and a detector notices the change and tells the controller that a car is waiting. Some junctions also use cameras or radar.

Why do some traffic lights stay red when no cars are coming?

That usually happens with a fixed timer, which follows a set timetable instead of watching the road. The light stays red for its full time even when the crossing is empty. Smarter lights with sensors change sooner, but on a simple junction a fixed timer is still common because it is cheap and reliable.

What is a green wave?

A green wave is a set of traffic lights along one road timed so that each light turns green just as cars from the previous light arrive. Drivers who keep a steady speed catch green after green, with far fewer stops. It is usually set for the busier direction during rush hour.

When was the first traffic light made?

The first traffic signal was put up in London in December 1868, near the Houses of Parliament. It was a tall pole with moving arms and a gas lantern showing red and green at night, worked by hand by a police officer. It exploded a few weeks later, in January 1869, after a gas leak, and was removed. One of the first electric traffic lights was built in Salt Lake City in 1912.

What should I do if a traffic light is broken or has no power?

Slow down and treat the junction with extra care, as if there were no lights at all. Look in every direction, give way to other traffic, and take your turn patiently. If the lights are flashing amber, that is a warning to slow down and give way. If you can, report the broken light to your local council or traffic authority so engineers can fix it.

More from Zorium Daily

The next time you stand at a crossing, waiting for the light to change, take a second to notice what is happening around you. A wire under the road felt your car arrive. A small computer in a grey box fitted your turn into its plan. Lights further down the road are already getting ready, timed to let you through. And all of it — the red, the amber, the green — comes from one simple idea that started with a gas lamp in London more than 150 years ago: take turns, share the road, and get everyone home safe.

Similar Posts