Checking Network Status With A Traffic Light

If you’ve ever dealt with a buggy Internet connection, you know how frustrating it can be. This project takes the guesswork out of mashing F5 over and over, or simply walking over to your router and ‘turning it on and off again.’

Necessity is the mother of invention, and when the folks at the Bitlair hackerspace in Amersfoort, Netherlands got tired of opening up a terminal to see if their network connection was down at this weekend’s Haxogreen camp they did what any self-respecting hackerspace would do: make a traffic light monitor the Internet.

The traffic light is controlled by a Raspberry Pi the Bitlair folks had lying around attached to a spare traffic light they somehow obtained with a relay. Green means the Raspi can reach 8.8.8.8, red means there is no connection, and flashing lights means there is packet loss.

Not bad for a project put together in a few hours. Now if we only knew how they obtained a traffic light, ‘just lying around.’

Video after the break.

[youtube=http://www.youtube.com/watch?v=uxdJv-h0Fks&w=470]

14 thoughts on “Checking Network Status With A Traffic Light

      1. Well, there’s several ways of doing that. You could use curl or whatever to download one of those bin files, or use ping with large packets.

        If you have access to the router, you could read out internet speeds from the ifconfig or netstat command.

        Speed isn’t that interesting to me though. Packet loss is more interesting. I don’t need 100gbit/sec to check my email, but it would help if not too many of my openvpn packets get lost :)

        The schematic is really simple. Raspberry pi outputs ttl (or 3.3v, i forgot) from it’s gpio pins. Just hook that up with a transistor to a relay (we used 5v relays). Don’t forget the diode on the relay to prevent power-surges going back into the raspberry pi of course!

        http://pcbheaven.com/wikipages/Transistor_Circuits/

        For some code examples using the raspberry pi gpio pins from various programming languages:

        http://elinux.org/RPi_Low-level_peripherals

  1. The traffic light was bought in germany and brought to haxogreen by us, so piet could find it “just laying around” in front of our tent. Displaying the speed is not very useful if u have only 2 binary outputs, so displaying the connection state is ok.

  2. Wow nobody’s complained about it using a raspi yet!

    I really want to do this some time. The arcade I work at has about 4 of the 3-light models up in their rear storage that they never use. I just need to have the time and motivation to actually do something with them…..

    1. warning to anyone else watching the above video: Skip to about 45 minutes into the video if you want to see what’s related to this discussion.

      i had to watch nearly the whole thing to figure that out and that’s nearly an hour of my life i’m never getting back. most of this is an uninteresting documentary of moving from a house to a lab space and i think most of us have lived through something like that before. a bit of editing would have helped, imho.

      ps – while telling someone to rotate something axially is technically accurate, it tends to grate on other people’s nerves…

  3. there are a couple traffic lights for sale in the window of a local thrift store. Also my friend got one at a garage sale once and had me build a little controller for it. But I don’t know how either of those places got one.

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.