After looking around ebay I found a meter that was inexpensive and I thought would like good for an "old timey" clock.
DC 05V Round Analog Voltmeter Voltage Panel meter DH62 Neednt with Shunt http://r.ebay.com/TFlw4T At $9.00 each with free shipping from China, I was a little hesitant on the quality. After about a week they showed up. First thing I did was test out the calibration. Well guess what it was pretty far off. All in all I had to do a number of modification to each meter. In order of execution.
- Open up the meter and remove the measurement panel
- Remove the crappy wiring and calibration resistor
- Drill a 1/4" hole in the middle of the back, so that a WS2812 LED can be mounted later
- Drill a 1/16" hole above the 1/4 hole for access to the 10Kohm 10 turn pot. To calibrate the needle
- Wire the negative terminal to the top side of the movement
- Connect the center and one of the wipers on the pot to the + Terminal
- Connect the other side of the pot to bottom side of the movement
- Put the new measurement panel on. Made in power point and printed out on cardstock
- Close it up.
- I then calibrated using an Arduino sketch were I type in a PWM value (0 to 255). Calibration consisted of setting the PWM to zero and then using the cam to set the zero point. I then set the PWM to 255 and adjusted the pot to full scale.
/*
Quick hack to test meters
*/
#define OUTPIN (5)
char pwm_val = 0x00;
String in_cmd = "";
void setup() {
pinMode(OUTPIN, OUTPUT);
Serial.begin(57600);
Serial.println("Meter tester started");
Serial.print("PWM out on pin ");
Serial.println(OUTPIN);
Serial.print("PWM initialized to: ");
Serial.println(pwm_val, DEC);
Serial.println();
analogWrite(OUTPIN, pwm_val);
}
void loop() {
while (Serial.available())
{
Serial.print("cmd] ");
in_cmd = Serial.readString();
pwm_val = in_cmd.toInt();
Serial.println(in_cmd);
Serial.print("PWM set to:");
Serial.println(pwm_val, DEC);
analogWrite(OUTPIN, pwm_val);
}
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.