Monitor your PC with an analogue meter

Dave Barton shows you how to use an audio signal to monitor anything you like on a retro analogue needle-meter.

Okay, we know what you're thinking - haven't we already done this guide? At first glance, it might look eerily similar to our analogue hard drive meter guide, but this issue's guide will show you how to do much more with an analogue meter. While the previous guide showed you how to monitor your hard drive's activity with a simple on or off signal, this guide will show you how to monitor pretty much anything on your PC using a variable signal that's perfect for an old-school analogue needle. Of course, there are guides on the Web that show you how to do this using pulse width modulation, PIC micro controllers and various other fancy gubbins connected to custom USB interfaces. However, such methods are complicated, not to mention expensive. Conversely, the method we explain in this article offers similar results but dispenses with the scary electronics and programming. Instead, it uses a plain audio output to drive the meter - just like an old-style vu meter. With the help of some nifty volume-controlling software, you can move the gauge to roughly any part of the scale to show your CPU load, download rate, CPU speed or whatever you fancy. At the moment, the Windows software used (programmed by yours truly) only monitors CPU load, but I plan to add more features at a later date. What you need:
» » » »

» » » » » »

A 1N914 signal diode (Maplin, part number QL71N - 16p) A 10uF capacitor (Maplin, part number VH07H - 12p) Selection of various resistors, or a 22k potentiometer (Maplin, part number JM72P - 69p) An analogue panel meter - any salvaged voltmeter or vu meter should be fine (or Maplin, part number LB80B - £4) Pieces of wire Soldering iron and solder Breadboard Heatshrink and heat gun A 3.5mm audio jack plug An unused audio source

You'll be using audio to control the meter, so you need a spare audio source. If you've added a sound card to your PC, you may well have an on-board audio source that isn't being used; otherwise you'll need to add an extra audio device. We found this little USB audio stick, which is perfect for the job, for just £4 on eBay. After installing this, make sure that your original sound device is set up as the default playback device in the Windows Control Panel.

For the best results, you'll need to play a constant tone into the meter. Most sound-editing software provides a tone generation facility, but we recommend downloading Audacity for free from http://audacity.sourceforge.net. When you've installed Audacity, click on the Generate menu at the top and select Tone. Stick with the default settings (440Hz), but enter ten seconds into the Length field and then click Generate Tone. After that, go to the File menu and select Export as WAV to save the tone as a WAV file.

Solder two wires to your 3.5mm jack as shown, with one on the central ground and another to either the left or right channel.

Use your breadboard to test the circuit; this lets you easily swap components around before soldering. Follow the circuit diagram and connect your diode and capacitor as shown, along with the wires connecting to your jack plug, and solder a couple of wires to the positive and negative points on the meter.

Place either a resistor or a potentiometer between the meter’s positive wire and the positive output from the circuit, as shown with a potentiometer. Make sure that you also remove any resistors already present in the meter’s casing. After that, plug the jack into your audio source, and you’re ready to test the circuit.

Play the WAV file at full volume, and the needle should move. At 100 per cent volume, the gauge should point to its maximum value, so adjust your potentiometer or change your resistor value until the needle does this. The needle should also be somewhere in the middle at 50 per cent volume, and at 0 when silent. Depending on your meter, you may find that removing the capacitor and just using a diode and a resistor/potentiometer works better.

If the circuit works, you can remove the breadboard and solder it together permanently, using heatshrink to secure the joints. As there are only a few components, you can get away with mounting the circuit directly on the jack, or you can leave it loose with some heatshrink to protect it from short circuits. Alternatively, you could mount it in your meter’s casing if there’s room. It’s now time to set up the software and get the needle moving.

Windows users can download the meter software from http://tinyurl.com/6qyhnb. This is a small .NET application that lets you select a sound card, a WAV and an input (what the needle measures). It also has a testing option, which plays the WAV repeatedly, so you can manually change the volume for calibration. Linux users can download a C code meter from http://tinyurl.com/6m6zez. This code changes the volume depending on the network download rate. Compiling instructions are in the text file.

Finishing touches For a final bit of polishing, open up your meter and carefully remove the faceplate. You should be able to flip it over and use the reverse side for your own custom scale. Try scanning the current scale and replacing the text with something more meaningful. If you’re looking to make an accurate scale, remember that the audio output is non-linear (the needle jumps will move further apart with each increment). Refer to our previous analogue hard drive meter guide for instructions on adding LEDs to your meter.