Hacking a cheap LED voltmeter

I’m planning to build a EEVblog-ish constant dummy load for battery and power supply testing. Dave in his build used a LCD voltmeter for the display. In the senseless pursuit of difference, I tried other display solutions including character LCD, graphics LCD, OLED, TFT, AMOLED, IPS, which resulted in several previous blogs but nothing ends up to be satisfactory.
Hacking a cheap LED voltmeter
Along with the complexity grows exponentially from one  solution to another, I slowly start to feel the importance of KISS concept, keep it simple stupid. All I need is just a number display, nothing fancy, nothing pricey, nothing takes my attention away from the analog circuitry. I decided to go back to the basic 7-segment LED display. “Simplicity is the ultimate sophistication”, how elegant it is!
I ordered several LED voltmeters from a taobao seller. It costs RMB16 each, about US$2.6 excluding shipping. The original design was for battery measurement on scooters. The advertised accuracy is 0.2%, which turns on my bullshit detector immediately. So the first thing I did after receiving it, was “don’t turn it on, tear it apart”. The manufacture did not scratch off the markings so the schematic can be easily traced out.
The heart of the voltmeter is “STM8S003F3P6″, a 8-bit MCU with 16MHz clock and 8K flash by STMicroelectronics. Datasheet shows this MCU has built-in 10-bit ADC. Driving 4 digits 10000 counts with 10-bit ADC is definitely overrating. While somebody may argue that ADC resolution can be increased using oversampling, without proper noise injection circuitry I cannot confirm it actually works. Furthermore the MCU does not have a dedicated ADC reference input. Supply voltage is used as reference. As the display needs to scan each digit continuously, supply fluctuation is inevitable. How to maintain ADC accuracy with changing reference? The original designer may have considered this problem initially. He/She added D9 (TL431 2.5V reference) and connected its output to analog input AIN6. So before measuring the input voltage at AIN5, 2.5V at AIN6 can be measured and then AIN5 calculated relatively. However D9 was not populated on the board I receive.
I was in the verge of desolder the LED and suddenly an idea bumped into me: why not reprogram this module and use it as a sole display? By doing so I can offload the LED driving task to the STM8. The original designer has reserved footprint for a 6-pin connector with SWIM programming/debugging interface and TX/RX serial port, reprogram should not be too difficult. A second thought is that it would be even better if I can emulate a popular serial LED module so that all existing codes can be used. The “Adafruit 4-digit 7-segment LED backpack” is soon identified. Ladyada did some remarkable work to develop Arduino library and wrote a tutorial for it. Make something compatible with her work is my honor.

For more detail: Hacking a cheap LED voltmeter


About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation and engineering. My writing style is clear and simple, and I am skilled in using infographics and diagrams. I am a great researcher and am able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter
Scroll to Top