Skip to the explanation
On the move
Choose language, current: English

How does a traffic light know you're there?

You ride your bike up to an intersection and the light is red. You don't see a button or a camera. Still, after a few seconds the light turns green, as if someone saw you coming. Who spotted you there?

The short answer

There's a loop of copper wire in the asphalt, with an invisible magnetic field above it. When metal from a bike or car ends up over the loop, that field changes a tiny bit. Electronics notice this and report it to the control box, the intersection's computer. The control box gives you a green light as soon as it's safe.

About 5 minutes to read, plus two things to try yourself.

1. Lines in the asphalt

Take a good look at the road just in front of a traffic light. You'll often see thin black lines in the asphalt, shaped like a rectangle or a diamond. Those are saw cuts: narrow grooves a few centimeters deep. Inside is copper wire, laid in a few turns, one on top of the other. Then the groove is sealed up again.

A loop of wire like this is called a detection loop, or just a loop. To detect means to discover or notice. On the bike path, the loops are often slanted or diamond-shaped, and sometimes there's a little bike painted on them. That's where you want to put your wheel. Why? You'll see in a moment.

Spotting mission: find the loop. Do this together with an adult. Find an intersection with traffic lights and stay on the sidewalk. Look for the lines in the asphalt, just before the stop lines on the road and on the bike path. What do the loops look like? And where would you put your bike wheel?

Be careful: only look from the sidewalk. Never step onto the road or the bike path to get a better look, not even when the light is red.

2. A wire with a magnetic field

Electric current is a whole lot of tiny particles, called electrons, moving together through a wire. Around every wire with current flowing through it, there's a magnetic field: an invisible area where magnetic forces act.

A small electronic device in the control box sends alternating current through the loop: current that keeps switching direction. That current goes back and forth very fast, about 20,000 to 150,000 times per second. Because of that, there's a magnetic field above the loop that switches back and forth just as fast. You don't notice it at all.

How many times per second something goes back and forth is called the frequency. The device keeps a constant eye on it. As long as there's nothing on the loop, the frequency stays the same, like a guitar string that keeps playing the same note.

3. Metal changes the field

Metal contains electrons that can move freely. When metal comes into the changing magnetic field, the field sets those electrons moving: they start flowing in circles through the metal. These circling currents are called eddy currents. In an induction cooktop, they make the pan hot. Here they're much weaker, but they do make their own magnetic field. That field works against the field of the loop.

Because of this, the frequency in the loop changes a tiny bit: the note of the string gets slightly higher. The device notices and passes on the message: someone is here.

Many people think the loop feels how heavy you are. That's not true: it's not about weight, it's about metal. A car has lots of metal. A bike has much less. The rims count the most: the metal rings that your tires sit on. That's why it's best to put a bike wheel right above the wire, where the field is strongest. And a pedestrian without any metal? The loop doesn't see them at all.

Try it yourself: drag the bike to the stop line, or move it with the arrow buttons. When does the “detected” light come on? Try putting the bike next to the loop instead of on it. Then try the car and the pedestrian.

A traffic lane seen from above. Just before the stop line lies a purple rectangle of wire: the loop. The light purple band along the wire is the magnetic field. At the top right is the control box with the “detected” light, at the bottom right a traffic light. You can slide a bike, a car or a pedestrian across the road. Purple circles in the metal are eddy currents. loop stop line control box detected

What's on the road?

Move

Change in the field
nothing

Past the mark, the device reports: detected.

A simple model, not scaled to a real measurement. The more metal there is above the loop and the closer it is to the wire, the more the field changes. A car above the loop makes the biggest difference. For a bike, only the metal rims count here, and they only make enough difference right above the wire. Real loops have different sizes, and the device can be set to be more or less sensitive.

With JavaScript on, you can slide a bike, a car or a pedestrian over the loop yourself. In the picture, the bike is still far back from the loop, and the light is red. If a car drives over the loop, the field changes a lot and the “detected” light comes on. A bike is only detected when a wheel is right above the wire. A pedestrian without metal is never detected.

4. The control box decides

At every intersection with traffic lights, there's a gray cabinet: the control box. In the Netherlands, the whole system of box, loops and lights is officially called a traffic control installation, or VRI for short (after its Dutch name). Inside the box is a small computer. It gets the reports from all the loops and keeps track of who's waiting.

When traffic from two directions could run into each other at the intersection, those directions have a conflict. The most important rule: two directions with a conflict never get green at the same time. After green comes yellow first (some people call it amber) and then red. Then the computer waits a moment before a direction with a conflict gets green. This is called the clearance time: anyone who was just going through can clear the intersection first.

How long a direction gets green is called the green time. If nobody is waiting in a direction, the computer skips it: it stays red. That way, nobody has to wait while an empty road gets a green light.

Try it yourself: let someone arrive and press “Next second.” Who gets green, and who has to wait? Then let car A and car B arrive at the same time, and watch for the moment when everything is red.

An intersection seen from above with three directions An intersection seen from above. Car A drives from bottom to top, car B from left to right. To the right of the road runs a bike path: cyclists F also ride from bottom to top. Car B has a conflict with car A and with the cyclists, because their routes cross. Car A and the cyclists ride side by side and can get green at the same time. There's a traffic light for each direction. A B F conflict point

Someone is arriving

A simple example without turning traffic. Here, green lasts 4 seconds, yellow 3 seconds for cars and 2 for cyclists, and the clearance time 2 seconds. Real intersections have many more directions, and the control box works out a separate clearance time for every pair of directions with a conflict.

With JavaScript on, you can let cars and cyclists arrive yourself and see how the control box gives green. In the picture, everything is red, because nobody is waiting. If car A and car B arrive at the same time, one gets green first, and the other only after the first one's light is red and the intersection has been cleared. Car A and cyclist F can get green at the same time: their routes don't cross.

5. Even without a loop

A loop isn't the only way to spot you. At a crosswalk, you press a push button yourself. More and more often, there are also cameras or radar at the intersection. Radar sends out invisible waves and picks up what bounces back, like an echo. Sensors like these, parts that measure something, can also see a pedestrian or a bike with little metal.

Traffic lights are getting smarter, too. In the Netherlands, an iVRI is an intelligent traffic control installation. It can also use data from apps and vehicles. That way, an ambulance or fire truck can get green sooner. In some places, a bus or a group of cyclists also gets green sooner.

Under the road lies a loop of wire with a magnetic field around it: as soon as metal from your bike or car comes over it, that field changes, and that's how the control box knows you're there.

Did you know?

The first traffic light exploded

The world's first traffic light went up in December 1868 in London, right near Parliament. A police officer worked it by hand, and in the evening a gas lamp burned inside it. A few weeks later, on January 2, 1869, it exploded because of a gas leak. The officer was injured.

One box, twenty lights

The Hague, in the Netherlands, has about 250 traffic control installations. One control box can run as many as 20 traffic lights at once. On a busy road, there are often loops not only at the stop line, but also farther back, sometimes tens of meters before the intersection.

Want to know more?

Induction: the same trick as in the kitchen

Generating current with a changing magnetic field is called induction. An induction cooktop does this too: a coil under the cooktop makes a fast-changing magnetic field, and that makes eddy currents flow in the bottom of the pan. A detection loop is also a coil, just a very flat and large one. The eddy currents in a rim or a car are far too weak to heat anything up, but strong enough to measure.

Why the frequency shifts

The device and the loop together form an oscillating circuit. Besides the loop, it contains a capacitor: a part that can store electric charge for a short time. The current sloshes back and forth between the loop and the capacitor, just like a swing that keeps going back and forth. The frequency of this oscillation is:

f = 1 ÷ (2 × π × √(L × C))

Here, f is the frequency in hertz (times per second). L is the self-inductance of the loop: how strongly the loop resists a change in the current. C is the capacitance of the capacitor: how much charge it can store. The sign ÷ means divided by, × means times, π (pi) is about 3.14, and √ is the square root: the number that, multiplied by itself, gives the number under it. So √9 = 3.

The eddy currents in metal make L smaller. L is inside the square root, in the part you divide by. If L gets smaller, you divide by a smaller number and f gets bigger: the note goes up. The iron and steel in a car work a little in the opposite direction: they actually make L bigger. But the eddy currents usually win.

Carbon bikes and where to put your wheel

Carbon is a light, strong material made of carbon fibers in a kind of resin. It conducts electricity much worse than metal. So almost no eddy currents flow in a carbon frame or carbon rim, and then the loop sometimes doesn't notice the bike. Many bike tires do have a thin steel wire along the edge, but it gives only a weak signal. Tip: put your wheel right above the saw cut, preferably so that the wheel points in the same direction as the wire underneath. Then the rim is in the strongest part of the field, and the most eddy current flows through it. That's also one reason loops on bike paths are often slanted or diamond-shaped: that way, your wheel always runs along the wire for a bit. If you see a little painted bike, put your wheel there.

How long is the clearance time?

A cyclist who rides over the stop line at the very last moment of yellow still has to reach the conflict point after that. That's the spot where their route crosses the route of the other direction. Let's say that's 15 meters away, and they ride 4 meters per second (just over 14 km/h). Then they get there after:

15 m ÷ 4 m/s = 3.75 s ≈ 4 seconds

Here, m stands for meters and s for seconds, so m/s is meters per second. 3.75 seconds is three and three-quarter seconds. The sign ≈ means “about.” Only after that can the other traffic reach that point. In real life, traffic engineers also take into account how long the other traffic itself still needs to reach the conflict point. To do this, they follow guidelines from CROW, a Dutch knowledge institute for traffic. These guidelines also say how long yellow lasts in the Netherlands: 3.5 seconds for cars going straight at 50 km/h, and 2 seconds for cyclists.

Think further

On busy roads, there's often not just a loop at the stop line, but also a loop tens of meters before it. How does that faraway loop help the control box?

Give me a hint

What does the computer already know when someone drives over the faraway loop while the light is still green?

See a possible answer

The faraway loop tells the computer that someone is still coming. If the light is green, the computer can make the green time a few seconds longer, so that car doesn't have to brake right before the stop line. If nobody drives over the faraway loop anymore, the computer knows the line of traffic is gone and can give green to another direction. Can you think of why that's especially useful at high speeds?

Imagine a loop breaks, so the control box never again notices that someone is waiting there. What would happen? And how would you get the control box to solve that problem?

Give me a hint

Look at the intersection above. What does the computer do with a direction where it thinks nobody is waiting?

See a possible answer

Then that direction always stays red, and whoever is waiting there never gets to go. A safe solution: if the control box notices that a loop isn't working properly, it acts as if someone is always waiting there. Then that direction gets green every round, even if nobody is there. That costs the others some waiting time, but nobody gets stuck. Many real control boxes do something like this too. Can you think of another solution?

Words you now know

Detection loop (loop)
A few turns of wire in the asphalt that notice whether there's metal above them.
Detect
To discover or notice that something is there.
Saw cut
A narrow groove sawn into the asphalt. The wire of the loop lies in it.
Copper wire
Wire made of copper, a metal that electric current flows through very easily.
Metal
Materials like iron, steel, aluminum and copper. In metal, electrons can move freely.
Electron
A tiny particle. In metal, electrons can move freely.
Electronics
Parts like chips that use electricity to measure, calculate and switch things on and off.
Electric current
A whole lot of electrons moving together through a wire.
Alternating current
Current that keeps switching direction.
Magnetic field
An invisible area where magnetic forces act, for example around a magnet or around a wire with current flowing through it.
Frequency
How many times per second something goes back and forth.
Hertz
The unit of frequency. 1 hertz means going back and forth once per second.
Eddy current
A small current that flows in circles through a piece of metal, created by a changing magnetic field.
Rim
The ring of a bike wheel that the tire sits on.
Control box
The cabinet at the intersection with the computer that controls the traffic lights.
Traffic control installation (VRI)
The whole system of an intersection: the control box, the loops, the buttons and the lights.
Conflict
When two directions could run into each other at the intersection. They never get green at the same time.
Conflict point
The spot where the routes of two directions cross.
Green time
How long a direction gets green.
Clearance time
The time between red for one direction and green for a direction it has a conflict with, so the intersection is empty first.
Push button
The button at a crosswalk that you press to show you're waiting.
Sensor
A part that measures something.
Radar
A sensor that sends out invisible waves and picks up what bounces back.
iVRI
An intelligent traffic control installation that also uses data from apps and vehicles.
Induction
Generating current with a changing magnetic field.
Coil
A wire wound into loops. A detection loop is a large, flat coil.
Oscillating circuit
A coil and a capacitor together, in which the current keeps going back and forth.
Capacitor
A part that can store electric charge for a short time.
Self-inductance
How strongly a coil resists a change in the current.
Carbon
A light, strong material made of carbon fibers in resin. It conducts electricity poorly.

Test yourself

What does a detection loop in the road react to?

See the answer

Metal above the loop.

What happens when metal comes over the loop?

See the answer

Eddy currents start flowing in the metal, and they change the field of the loop.

Why are all the lights sometimes red at the same time for a moment?

See the answer

So the intersection is empty before another direction gets green.

Tricky question: you have a road bike with a carbon frame and aluminum rims. In front of the traffic light, there's a big rectangular loop. Where's the best place to put your bike?

See the answer

With one wheel right above one of the saw cuts.

Explore more