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.

Comments

  1. ds18s20 says:

    Fix the schematics please oh mighty hackers…:)

  2. gmchar says:

    hey, there were people from revspace and whitespace involved as well!! :)

  3. Ian says:

    Er, “turning it on and off again”? I might recommend a different order.

  4. Electroalek says:

    Not very useful, you could check the speed instead of the connection.

    • gmchar says:

      That was in release 5 of the control software :) It would blink the red one with the green one constant in a frequency related to the package loss..

    • jacubillo says:

      I´ve always wondered how to check internet speed with terminal commands. How does it work? You download a known size file and record the time it takes to complete the transfer??

      • gmchar says:

        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

  5. psy says:

    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.

  6. mixadj says:

    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…..

  7. JA12 says:

    What’s it with traffic lights today?

    • signal7 says:

      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…

  8. david says:

    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.

  9. signal7 says:

    i’ve said it before: you can just buy these things online. owning one does not mean you stole it from an intersection somewhere.

    http://www.trafficlights.com/polysigs.htm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,656 other followers