Shop OBEX P1 Docs P2 Docs Learn Events
Voltmeter Becomes One-Pin LED Display — Parallax Forums

Voltmeter Becomes One-Pin LED Display

ercoerco Posts: 20,256
edited 2015-06-07 12:57 in General Discussion
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.

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2015-06-04 20:04
    Very handy! And possibly the cheapest way to display a value.

    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 Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-06-04 21:25
    This is freakin' brilliant, erco! It would be hard to imagine a less expensive way to get a digital value displayed, especially if you're not too fussy about the last digit ±1.

    -Phil
  • xanaduxanadu Posts: 3,347
    edited 2015-06-04 22:00
    ercosaward.jpg
  • Heater.Heater. Posts: 21,230
    edited 2015-06-05 01:56
    Cool.

    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.
  • ercoerco Posts: 20,256
    edited 2015-06-05 07:52
    Agreed, not recommended for mission-critical applications or life support systems! Interestingly, the values displayed are rock-solid after about a second, it takes the dollar DVM a while to stabilize. Any variations here are because I sped up the numbers to keep the video from being too boring. Further, the chip here is run off of unregulated DC power, namely 3x AA cells. The supply voltage should be well regulated for accuracy.

    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.
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-06-05 08:47
    Cool, the perfect single pin, inexpensive, IP address display for all those IPV4 IoT devices! Just have your little IoT thingie run through the 4 PWM values.

    Great find, erco!
  • ercoerco Posts: 20,256
    edited 2015-06-05 09:47
    ... especially if you're not too fussy about the last digit ±1.

    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! :)
  • ercoerco Posts: 20,256
    edited 2015-06-05 11:29
    The madness continues. I continue to be surprised at the accuracy/repeatability. Until the batteries weaken and my calibration fails...
  • xanaduxanadu Posts: 3,347
    edited 2015-06-05 20:52
    erco wrote: »
    ...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 :)
  • xanaduxanadu Posts: 3,347
    edited 2015-06-05 21:02
    What about providing a fixed source voltage and injecting PWM into the cal trimmer?
  • ercoerco Posts: 20,256
    edited 2015-06-07 12:57
    xanadu wrote: »
    What about providing a fixed source voltage and injecting PWM into the cal trimmer?

    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:
Sign In or Register to comment.