Weeks after showing you TorrentMeter Mk.1 (video) and TorrentMeter Mk.2 Steampunk Edition (video), I finally get to document how it was made. 

I got inspired by reading Tom Igoe's article in Make Magazine issue 11, about an antique gauge displaying air quality data from the web.  It hit a nerve: friends and I had once built a steam powered teletype.  Since we've got fiber optical intertubes at home, I wanted a big brass gauge telling me how big my pipe was.  And that's the idea of my TorrentMeter. 

TorrentMeter Mk.  1

The TorrentMeter Mk.  1 is a prototype.  It's made from a a custom made voltmeter, scale 0-150, 150=5V. Thus it's rather easy to use a PWM output pin of an arduino to drive it.  The gauge draws only a few mA, thus damaging the micro controller by dragging too much current out of the output pins was no issue.  Unfortunately, neither is a micro controller's pin output necessarily 0V for low nor 5V for high.  Thus a simple switching transistor came to help. 

Depending on your setup you might want to protect the transistor output from current flowing back from the gauge coil by adding a suppressor diode to the output. 

Software

So far a gauge is connected to a micro controller, Arduino that is.  That sure is overkill, but it is readily available.  Getting the gauge to actually display the desired information?  In my case I want to simply have my router post the current incoming bits per second (the torrent) to the Arduino.  Check out my repository on github!  There is a perl script, grepping the desired information from my Linux router's /proc, and a loop that's started on boot.  That loop calls the script periodically and pipes the output to the serial port emulated by the FTDI chip on the Arduino.  The Arduino converts it into a pulse width.  If that was too fast for you, you might want to read the above mentioned Make Magazine article.  For the Arduino software, just combine what you can learn from the Arduino AnalogInSerial and Dimmer examples. 

TorrentMeter Mk.  2

I got a 1908 voltmeter in a brass housing, about 20cm (8in) in diameter.  It had a resistor made from a wire wick.  The gauge's internal resistance without that is now about 67 ohms, eats up 150mA when the handle is at full scale, and wants about 10V. That's too much to be driven directly by a micro controller.  A switching amplifier, made from a couple parts, shall help. 

Notice the two parts.  They have different power sources but common ground.  The left side is just a pull-down resistor, a power LED and a switching transistor.  Its output is connected to the right part, which is the actual switching amplifier.  From a software perspective it works similar to TorrentMeter Mk.1.  Yet, my antique gauge had an aperiodic scale.  Thus I had to come up with a calibration array that would map input values to the appropriate pulse width. 

The Scale

Look at the aperiodic scale that my antique voltmeter came with: Volts as unit, manufacturer logo (Siemens-Halske) and down below it says "aperiodic, DC". 

I needed a linear scale from 0 through 100, saying Mbps, thus making it a TorrentMeter.  I chose the logo of Dingfabrik as manufacturer logo, since that is where @PylonC and I disassembled the voltmeter when it arrived in the mail.  And I needed it to look as old as the original, so I stained it.  To do so, I just took a clean baking tray, filled it with black tea and slowly shoved in a sheet of paper sideways.  That's rather important to avoid having bubbles under the sheet, thus creating an even stain.  I let it sit for a couple of minutes and let it dry in the oven at 50°C (120 F).  Ready to be printed on!  The scale was drawn with Inkscape, see repository on github for files. 

By the time I was done with TorrentMeter Mk.  1 and thinking about how to make the scale of TorrentMeter Mk.  2, @saschaludwig contacted me.  We live only about half an hour from each other.  He helped me to draft the Mk.  2 scale and I showed him how the TorrentMeter was driven.  He was working on his own version: Megabitmeter, a modern gauge with a laser cut and laser edged scale, qualified for series production.  And boy, I can't wait for its release!