Posts | Comments

Planet Arduino

Archive for the ‘traffic light’ Category

[beshur]’s 2-year-old is obsessed with transportation, so he lifted a few DUPLO blocks from the bin and made this toy traffic light as a birthday present. Hey, might as well get him used to the realities of traffic, right? It also makes for a good early hacker lesson: why buy something when you can make it yourself?

The traffic pattern is determined by an Arduino Nano V3 situated inside the carved-out rear block. There’s a push button on the side in case there’s a spill and the lights need to go blinking red until the issue is dealt with. Instead of trying to solder everything in situ and risk melting the plastic, [beshur] dead-bugged the LEDs and resistors to the Nano with a helping hands and then worked everything into the case. The 5mm LEDs fit perfectly into the drilled-out posts of a second block and produce a nice, soft glow. Proceed with caution and check it out after the break.

Of course, plastic building blocks can do real work, too. This LEGO chocolate pantograph is pretty sweet.

If you have ever thought what is missing in your life is a pedestrian traffic light, be sure to check out Ronald Diaz’s recent build.

The project uses a pair of lights that Diaz had in storage for the past decade, to which he’s finally added an Arduino controller that takes care of the walk/stop sequence.

The device is initiated by a pushbutton, which then cycles between a red light that implores pedestrians to wait, to a green signal that tells people to go, to a flashing red light and back to solid red. A piezo speaker was also included, which plays sounds based around actual Australian tones depending on the light state. 

Code can be found over on GitHub, and you can see it demonstrated in the video below.

Getting an old traffic light and wiring it up to do its thing inside your house isn’t exactly a new trick; it’s so common that it wouldn’t normally pass muster for these hallowed pages. Even using one up to show the real-time status of your build or system resource utilization would be pushing it at this point. To get our attention, your traffic light is going to need to have a unique hook.

So how did [Ronald Diaz] manage to get his project to stand out from the rest? Interestingly enough, it’s nothing you can see. His traffic light doesn’t just look the part, it also sounds like the real thing. With far more effort and attention to detail than you’d probably expect, he’s made it so his Australian pedestrian traffic light correctly mimics the complex chirping of the original.

Working from a video of the traffic light on YouTube, [Ronald] was able to extract and isolate the tones he was after. Performing spectral analysis on the audio sample, he was able to figure out the frequency and durations of the eleven individual tones which make up the complete pattern. From the 973 Hz tone that only lasts 25 ms to the continuous 500 Hz “woodpecker”, every element of the sound was meticulously recreated in his Arduino code.

The Arduino Pro Mini used to control the traffic light is not only responsible for playing the tones through a piezo speaker, but as you might expect, for firing off the relays which ultimately control the red and green lamps. With everything carefully orchestrated, [Ronald] can now get that authentic Australian side-of-the-road experience without having to leave the comfort of his own home.

If you’d rather your in-home traffic light be more useful than realistic, we’ve got plenty of prior art for you to check out. This traffic light that tells you how the value of Bitcoin is trending is a great example. Or maybe this one that can tell you if the Internet is down.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook