For today’s project I wanted to do something with the analog decibel meter that Tymm gave me on day one. My idea is to calculate some kind of signal to noise ratio in my email inbox and to display the value on this physical meter. Since I already get a lot of noise in there, maybe the value won’t change very dynamically, but be a steady din. Perhaps I could tie into the junk mail filter to show just how much work it’s doing, like a tachometer. Who am I kidding, really, I’m likely going to jump into what all the cool kids are doing and just come up with some type of Twitter visualization…
Regardless of the data source, for the output side I’m driving the analog decibel meter with an Arduino using pulse width modulation (PWM). Inside it seems to be a small electromagnet whose field moves the needle to the right. The movement is counteracted by several springs which keep the needle trying to pull back to the left.
It seems to take minimal current < 1mA at 5V to peg the needle. The face of the meter indicates “1mW 600 Ohm” which I assume means that the max input is 1mW and the resistance of the unit is 600Ohm. (Please correct me if I’m wrong). I’ve installed a 220Ohm resistor and small LED in series to provide more load to the PWM pin which allows finer steps in the meter as well as protects the Arduino from any possible reverse current as the needle’s springs pull it back past the electromagnet. I likely don’t need that, but it wouldn’t be an ITP project without an LED (it’s not blinking, though).
In this demo the Arduino is receiving data via a serial connection from a simple Processing sketch to control the position of the needle. In the above mentioned configuration I’m mapping the input value to a PWM output range of 0-40. Sending byte 255 will change modes in the program. The default mode is to accept ASCII values of 48-52 (that’s 0-9) so I can test in a terminal. The second mode will accept all bytes bytes of 0-254, and the third mode simply reports back the received values.
Next step is to figure out exactly what to do with the meter; since it accepts serial data it is pretty modular.