Arduino Traffic Light Sings The Song Of Its People

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.

29 thoughts on “Arduino Traffic Light Sings The Song Of Its People

    1. Lol that’s what I thought first, they really mean pedestrian crossing lights which make sound to alert people of when to cross or when the light is about to change soon.

  1. makes no sense at all..
    a busy sound meaning go and dialing sound meaning stop?
    and a red walking man and a stopped green man?

    Australia must have a lot of accidents involving red/green colorblind people, especially unsuspecting tourists..

    1. Our pedestrian crossings use actual color, light intensity, sound, position, haptic feedback and sometimes brail and animation.

      On the other hand globally some car indicators have traded perceived color for actual color and removed positional and light intensity information. So now many color blind people can’t see these indicators.

      The world was once much kinder to color blind people. For instance the resistor color code was also a grey scale so that color blind people could read it too. Cheap Chinese imports ended that.

      1. Years ago I was walking around a town on the Mississippi Gulf Coast which had mounted its traffic lights horizontally instead of vertically. I was approached by a total stranger who apologized for interrupting me but politely asked if I could tell him which side of the traffic light was red. And this was before LED’s made it practical for a single indicator to just change color.

        1. I believe that horizontal traffic lights are oriented Red-Left, Yellow-Middle, Green-Right. That being I’ve always thought that for colour blind people traffic lights should also have shapes, Red-Octagon (Or circle), Yellow-Diamond and Green-Triangle (pointing up), but that’s just me.

        2. I believe that the layout of horizontal traffic lights is Red-Left, Yellow-Middle, Green-Right. That being said I’ve always thought that traffic lights should also have shapes, Red-Octagon (or Circle), Yellow-Diamond and Green-Triangle (point up), but no one ever listens to me.

      2. True – but cheap chinese imports also mean cheap smart phones with resistor code readers, which also fit with the magnified view of the really small surface mounts. Progress, it taketh and it giveth.

    2. There is a reason traffic signals place lights in a specific order (eg red on top, green at the bottom)

      The position of the light source, regardless of its color, tells a colorblind person as much as the color of the light tells the rest of us

  2. (I’ve clicked the “Reply” below pax’s post… let’s see where *this* post lands… probably not where the “Leave a reply” suggests it will.)

    > a busy sound meaning go and dialing sound meaning stop?

    The telephone dial sound is almost continuous pair of tones whereas the telephone busy signal is a single tone turned on/off with a 50% duty cycle.

    Neither sound anything like a traffic light pedestrian signal.

    1. This is the exact video I reversed engineered the frequencies and timings from so not sure what you are hearing. My neighbour is going to try and get me a real button (w/ built-in speaker) from his work site. I suspect that the sound will then be identical as the real crossing coming from the same transducer. No further code updates will be required though…

  3. As a Queenslander who uses these things on a regular basis I can tell you that what this guy has built sounds nothing like the ones I see and hear. Cool project though.

    1. The real ones have strong haptic feedback and strong low frequency components.

      I’d imagine they’re using a strong voice coil or solenoid to flex a metal or ridged plastic disk to achieve that so doing this with a small piezoelectric disk is going to sound a lot different even if you get the frequencies right.

      I wonder if completely deaf people can feel a vibration in their chest when close.

    2. I’d say the small piezo I used vs the actual (5w or so) speaker used within the real button will make the difference here. The tones and timing are the same though. :)

  4. Thanks to everyone who noticed that the person silhouettes were reversed! It has been fixed since. As for those who think it doesn’t sound like the real thing, I mirror @Rob’s comments in regards to the spectral colour / audio intensity a small piezo produces vs the real (5w or so) speaker used in a real button. With any luck though, my neighbour will acquire one from his next work site (he works replacing traffic lights) and then it will definitely sound very much like the real thing, if not a little too loud! :)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.