Voltmeter Becomes One-Pin LED Display
erco
Posts: 20,256
Spoiler alert: off-brand processor!
Nonetheless, I'm sharing this little experiment because it can apply to any processor that can output a PWM signal (or just bit bang one). I wanted to retask some of the dollar (ten for $10) digital voltmeters I got off Ebay. Ignoring the decimal place, these voltmeters can make general purpose 3-digit LED displays, using just ONE I/O pin. I did some curve-fitting and came up with a linear conversion to make a variable into its corresponding voltage. That is, value 1=0.01V, 37=0.37V, 127=1.27V, etc. It's surprisingly accurate over the whole range, 0-2.55V.
Nonetheless, I'm sharing this little experiment because it can apply to any processor that can output a PWM signal (or just bit bang one). I wanted to retask some of the dollar (ten for $10) digital voltmeters I got off Ebay. Ignoring the decimal place, these voltmeters can make general purpose 3-digit LED displays, using just ONE I/O pin. I did some curve-fitting and came up with a linear conversion to make a variable into its corresponding voltage. That is, value 1=0.01V, 37=0.37V, 127=1.27V, etc. It's surprisingly accurate over the whole range, 0-2.55V.
Comments
I did something similar and slightly crazy - I wanted to display kilowatts 0 to 20 with a decimal place, so I used one of these little meters. Of course, the microprocessor could only output lower voltages, but no problem, use a cheap stepup converter (under $2) to make a 25V supply, then an op amp to multiply the voltage.
-Phil
I'd be worried about using to display numbers that have to be correct. Any drift in your clock or mis-calibration of the meter gets you the wrong display in at least the last digit.
Would be great for displaying continuous variable values though.
And you can drive many of them with the multi-channel PWM objects.
This was just a wild hair I tried since I put these little DVMs on my student breadboards. They can easily display supply voltage, analog sensor voltage, and I'm trying to come up with a few other novel uses.
Great find, erco!
A piece of black tape over that last digit works wonders...!
I was pleasantly surprised that these little DVMs auto-range the decimal point. They go up to 32V, so obviously they show one digit after the decimal, in tenths of a volt. But under 10 volts, the decimal shifts to show 2 digits, of hundredths of a volt. Pretty spiffy for a buck.
And thanks to xanadu for my spiffy certificate of achievement!
I'm going to get some nice certificate paper and print on them for the multirotor class
Give it a shot, boss!
Here displaying ADC results on the DVM with good correlation. Round trip: analog to digital to analog. I'll be building a dozen setups like this soon, it will be interesting to see how much the accuracy varies between units.
Edit: And here's a 2-pin ultrasonic distance display: