The Traffic Light Controller enables you to gain control of your road rage with a sense of understanding!

We all have it to some degree and we all know somebody who has it worse than us—road rage! The Traffic Light Controller teaches you street smarts, giving you the knowledge to keep your road rage at bay. If you understand what's going on with the red light, maybe you'll be able to wait more patiently for the green light!

 


BOM:

 

Traffic light setup using an Arduino, LEDs, and 330Ω resistors!

 

Why?

You see, my wife, Debra, and I love taking our Sunday drives but we're sick of sitting at red lights. I figured I could build something to control the traffic lights so we always have green.

I eventually realized that the original project was merely for LEDs and couldn't actually control a real traffic light, but I built the project anyway and thereby gained an understanding of why traffic lights can't switch from red to green solely for our driving convenience. The Traffic Light Controller helps keep Debra and me levelheaded in road-rage situations—ultimately saving our marriage!

 

Debra, Lazy T, Busy B, and Me!

 

How?

It's really a pretty simple concept and makes even more sense with the chart below. The code uses For loops and delay statements to implement the on-time for each LED.

The two streets in our example, Busy Bunny Lane and Lazy Tortoise Ave, have different traffic volumes, and thus one has a longer green light (and a shorter red light).

Busy Bunny Lane is pretty . . . well, busy. It has a green light that stays on for 12 seconds. There is much less traffic on Lazy Tortoise, and the city has declared that it needs a green light that stays on for only one-third of the time of Busy Bunny's. So it gets a 4-second green light. Fair is fair.

As Busy Bunny switches from green to yellow to red, Lazy Tortoise briefly maintains its red light in case any stragglers try to make a last-minute dash through the busy intersection. So don't forget about this red-light-overlap interval if your mayor ever asks you to design the traffic light system for your town's newest intersection. When the coast is clear, Lazy Tortoise gets the green light it has been patiently waiting for.

 

This chart will help you understand the traffic light timing. Taken from the original project.

 

When Lazy Tortoise reaches its red light, there is another red-light-overlap period, and then the loop restarts! Of course, this is a pretty basic, antiquated traffic light. Modern traffic lights are "smart"—they detect vehicles, adjust their own timing, and make interruptions for crosswalks. There is always room for improvement!

 

  Arduino Traffic Light Code  


Remember, MIT-i is filmed on set, in front of a live studio audience. The Traffic Light Controller, or any other MIT-i innovation, should not be used in a vehicle or while operating machinery. Road rage is not an excuse to fight with your loved ones.

We think it's great when viewers take our project, modify it, and make it their own. Turn this boring intersection into a "smart" one by adding a crosswalk interruption button! You can even change light patterns based on the time of day! Take this knowledge and run with it, and remember to share your creations!

 

Other MIT-i Innovations:

 

Comments

1 Comment


  • Glenn Stewart 2016-10-10

    Coming from Sydney, this brings back memories for my parents. It’s exactly this type of issue that led to engineers in Sydney in the 60’s trying to resolve the issue. In the 70’s Sydney’s traffic system was completely overhauled with an automatic detection system called SCATS (Sydney Coordinated Adaptive Traffic System). In the past 40 years it’s been rolled out to 154 cities around the world including crazy traffic cities like Shanghai, Hong Kong and Tehran.

    Basically it uses sensors in the road to perform dynamic, real-time chases of traffic signals. No more road rage required. If Busy Bunny Lane is busy, and Lazy Tortoise Ave doesn’t have traffic, the light doesn’t change. You could technically get hours of continuous flow on the main road, until a car enters from the lighter street to trigger a change.

    It’s actually a lot more complex than this and worth looking into.