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]
Fix the schematics please oh mighty hackers…:)
hey, there were people from revspace and whitespace involved as well!! :)
Also, it was a real life-saver after the evacuation during the very heavy thunderstorm to indicate that (unlike some tents) the internet had survived:
https://twitter.com/pietdevaere/status/228981132371320832/photo/1
Er, “turning it on and off again”? I might recommend a different order.
Not very useful, you could check the speed instead of the connection.
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..
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??
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
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.
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…..
What’s it with traffic lights today?
http://www.youtube.com/watch?v=v__t8ISywGc&feature=player_detailpage#t=2356s
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…
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.
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