Summary of A 10 Bit LED Digital Panel Meter With Auto Ranging Based On The ATMEGA8
This article describes a 10-bit digital panel meter designed for positive voltage measurement, featuring auto-ranging capabilities between 0–10.23V and 0–102.3V scales. Built around the ATMEGA8 microcontroller, it addresses resolution limitations by utilizing two resistive dividers to switch ranges automatically. The project includes an over-range indicator and offers approximately 130k input resistance, solving remote troubleshooting challenges for a power supply application.
Parts used in the 10 Bit LED Digital Panel Meter With Auto Ranging:
- ATMEGA8 microcontroller
- 10 bit A-to-D converter
- Internal 2.5 volt band gap reference
- Resistive divider (for scaling)
- LED display components
- Two resistive dividers for range switching
Downloads
Download the AVRStudio assembly source for the program: M8DPM091109A.asm
Download the AVRStudio hex file: M8DPM091109A.hex
Find updates at www.projects.cappels.org
Overview
– A 10 bit digital panel meter for positive voltage only.
– Input resistance: about 130k
– Ranges: 0 to 10.20 volts and 0 to 102.3 volts.
– Over range indication.
This project came from friend named Don’s need for a digital panel meter for a power supply project. This was further complicated by Don and me being on different continents, and the problems that go with troubleshooting remotely.
Don had considered an ATMEGA8 project that was posted on the web, but when contacted, the author was not helpful and seemed very discouraging. So rather than pick through his code, trying to figure out what he had done, I thought about writing the code myself. Most of it could be taken from other projects.
Then I realized that with only the 10 bit A-to-D converter on the available AVR controllers, the resolution would only be 100 millivolts because Don intended his power supply to supply over 20 volts.
The 10 bit A-to-D converter has a range of 0 to 1023. To explain in a little more detail, using the ATMEGA8’s internal 2.5 volt band gap reference means that by using a resistive divider ahead of the A-to-D converter, the input could be scaled such that any voltage range from 0 to 2.5 volts or higher could be accommodated. If the range had less than 1024 steps, then some resolution would be lost. For Don’s application, a 102.3 volt scale would be necessary. The least significant digit would be 100 millivolts. And when he used the meter to measure (for example) 10.0 volts, the 100 millivolt resolution would be a little bit coarse.
“Ok, no problem”, I thought. “He can have two ranges on the meter. He can switch between two resistive dividers on the input to get a 10.23 volt full scale range and a 102.3 volt full scale range.
And why not have the meter switch between the two ranges automatically. That would make the project a lot more interesting. I had always taken it for granted that auto ranging voltmeters were pretty simple, and this would be a chance to do something unusually analog with an AVR controller, so why not?
For more detail: A 10 Bit LED Digital Panel Meter With Auto Ranging Based On The ATMEGA8
- What is the primary function of this project?
It serves as a 10 bit digital panel meter for measuring positive voltage only. - How does the device handle different voltage ranges?
It switches automatically between two resistive dividers to achieve 10.23 volt and 102.3 volt full scale ranges. - Why was the internal 2.5 volt band gap reference chosen?
It allows the input to be scaled via a resistive divider so that any voltage range from 0 to 2.5 volts or higher can be accommodated. - What is the input resistance of the meter?
The input resistance is about 130k. - Does the meter indicate when the voltage exceeds its range?
Yes, the project includes an over range indication feature. - Can the meter measure voltages up to 102.3 volts?
Yes, one of the available ranges covers 0 to 102.3 volts. - What problem did the author solve regarding the ATMEGA8?
The author resolved the coarse resolution issue of the 10 bit A-to-D converter by implementing an automatic ranging system.


