One was damaged, but I will fix it. This one seemed to be in perfect condition. The reason they were abandoned was that they use digital multimeters nowadays. These analog things are just too fragile. Perhaps another reason is the backwardish terminals. A common +. Then 3V and 30V - which probably should read -3V and -30V. Bad to teach kids that!
Using a 1.5 V battery and a multimeter, I found out that the current running through the voltmeter is some 0.3 mA, so I thought it's safe to connect the voltmeter straight onto a PWM pin on a Leonardo. I ran this test program:
void loop() {
// fade in from min to max in increments of 5 points:
for (int fadeValue = 0; fadeValue <= 128; fadeValue += 16) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
delay(2000);
}
// fade out from max to min in increments of 5 points:
for (int fadeValue = 128; fadeValue >= 0; fadeValue -= 16) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
delay(2000);
}
}
Here's how it runs:
I forgot to adjust the zero point.
I'm planning to use this as a display for my crank organ, where I have a bellows, which shouldn't be allowed to extend over a certain limit. An ultrasonic sensor will measure its extension and the value will be translated to a reading on this meter.
The fun thing is that I can open the device and replace the scale with whatever I want. What I want is a scale from 8 cm to 30 cm. In some fancy 1920's font.
It might not be important, but you of you want to maximise the resolution with which you can control the needle, you could use a voltage divider to reduce the 5V from the Leonardo to 3V. Then, analogWrite(pin, 255) should give full scale reading on the meter. Probably best to use a low-value trim pot so you can adjust easily in order to get the needle to 3V, because the old meter will probably have quite a low impedance compared to a modern digital meter.
Good point! I'd definitely use that, if I'd need accuracy. Another thing is that I'd almost need a lookup table for this old device to get it show correct readings. After some changes in the code, I have it tick back and forth through each 10th of the 3 V scale once in a second. It hits the scale mark almost along the whole scale, but at 2.5 it suddenly starts to deviate, meaning the needle doesn't act quite linearly to the input values. So, for precision, I'd anyway need say a 7 step lookup table and then some linear interpolation inbetween.
I worked in telecoms all my life and telecoms kit is positive ground. I'm going to guess this meter was designed with positive ground in mind. Negative ground is so ubiquitous that people think negative == ground == 0V, as if they are synonyms for each other. I have seen people refer to 'the battery ground', of course a battery, or any other component, does not have a ground.
Nice meter! Interesting project, thanks for sharing with us.
It might be that cars that use positive ground tend to corrode more. It might also be that if a car with positive ground collides with a car with negative ground, a 24 V short circuit might occur as a worst case scenario.