Building a bandwidth meter

posted Nov 24th 2010 12:00pm by
filed under: arduino hacks

Here’s an analog bandwidth meter made to look like an old pressure gauge. It’s actually new, but the paper showing the graduated scale was stained in a bath of black tea, then dried in an oven to give it an aged appearance. We think it’s quite effective.

The dial itself is a volt meter driven by an Arduino in much the same way as the multimeter clock. Bandwidth data is pulled from a Linux router, filtered down to the target data using ‘grep’, and sent over the serial connection by a Perl script. Since the meter itself is just waiting for serial data, alterations to the router’s scripting make it easy to represent a count of unread emails, tweets, or whatever data your code can scrape.

[Thanks Ben]



15 Responses to Building a bandwidth meter

  • CGross says:

    Lifehacker takes from HAD, HAD takes from Lifehacker about 5 days late.

  • ladz says:

    Why not just send a constant serial data stream to a buffer, filter, and op-amp?
    Sending a stream of 0×00 will have a higher RMS voltage than 0xFF.
    seems much simpler.

  • Anon says:

    Now that’s a beautiful thing.

  • kristian says:

    @ladz: idk, that sounds like a bit of a hack-solution ;)

    sending data over serial to arduino can also mean sending data via usb, so there’s not necessarily a serial port involved here.

    i checked the writeup, just to be safe: “output to the serial port emulated by the FTDI chip on the Arduino”

  • Harvie says:

    It should be even better if the device was connected directly to ethernet cable (ethernet can pass through it) between router and modem… well we need to find a way how to simply determine bandwith from ethernet cable… i guess there’s at least way to count packets per second or some similar – almost analog solution.

  • Simon says:

    Looks like a current-limiting resistor is needed between the Arduino PWM pin and the transistor. Perhaps everything getting hot is part of the steampunk effect!

  • Evan says:

    What would be cool is to link this to cpu useage rather than bandwidth.

  • Nice work with the meter , but adding the diode across the coil ,and driving it with IRL series MOSFET should work better.

    @Harvie . There is a way , at least with every good router or switch – the SNMP protocol . I made such device to work with my Cisco 2610 a year ago using a Wiznet chip and an AVR microcontroller .

  • Friction57 says:

    Can anyone provide a solution for this where instead of an analog meter, it’s connected to a digital number display (like an alarm clock display) that will show you bandwidth use across any spectrum?

  • mrlinconnu says:

    Hi everybody,

    Is it possible to give more details on how bandwith value are recovered from the PC ?
    It’s wrote that datas are pulled from a linux router ?
    Is it possible to get the same function from a basic provider XDSL modem ? Or in this case the solution is it to use software programmes ?
    In a windows how can I get the real time bandwith usage ?
    Many thanks for some links…

  • DarkFader says:

    And then you get a feeling that someone is downloading just at the moments you’re not looking :)
    I will try to compile istatd for my linksys router. Now if only I could subtract the bandwidths… would be nice to know what my dad and brother are using. I already can see which sites they visit :)

  • skytee says:

    Actually, the gauge is old. Manufactured in 1908.

  • Name (required) says:

    Nice, this was also shown on the 27c3.

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks










         




    Hacks

    Resources