Description: 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. The circuit came out to be very simple and compact. The ATMEGA8 is the lowest pin count AVR controller that I could find that has an onboard 10 bit A-to-D converter. It had no problem directly driving the four digits delivering an average approximately 50 milliamps to the display. The on-chip clock oscillator also saved some parts. I am not sure whether the 8 uH inductor and 0.33 uF decoupling capacitor on the analog VCC was necessary, but I used them as a good practice. Better to put a couple of extra parts on the board than to take the chance of having to take the board back and add them later. The schematic above shows an ISP (In Circuit Programming) connector, which I had originally built onto the board so I could debug the firmware, using the crash-and-burn method - write the code and see if it runs. After I was satisfied with the performance of the meter, I cut off the portion of the board that had the ISP connector on it. Power for the chip is regulated with a 7805 regulator. In this particular case, I used a TO-92 LM78L05 regulator. Measuring the current into the 5 volt input, I find a maximum of about 56 milliamps current drain, when displaying 08.88 volts. When powered from a 9 volt power source, the dissipation of the LM78L05 will be 224 mW. With a 200 degrees C per watt thermal resistance, junction temperature should be about 45 degrees above ambient. A little more calculation showed that the maximum safe input voltage to the LM78L05 is just a little above 12 volts if my maximum ambient temperature is 40 degrees C. In Don's case, where he would power the meter from 30 volts, it would be best to use a TO-220 version of the LM7805. When in the 102.3 volt range, some additional resistors, R2, R3, and R4, are connected to ground, so the input divider reduces 102.3 volts to 2.5 volts (40:1). These additional parts are switched in and out of the circuit by switching PORTB bit 0 I/O pin between being an input with no pullup to a low output. I have noticed that with some AVR controllers, one cannot switch the mode of the output pin directly between these two states, so be sure to consult individual data sheets if you try this on other controllers. Notably, on the ATTINY861, it took a little bit more "bit twiddling" to switch an I/O pin between high impedance and low impedance states. The 0.1 uf capacitor from the input of the A-to-D converter is there to not only keep the impedance seen by the input from being too high, but also to act, in conjunction with the input resistors, a low pass filter to reduce noise on the input. The fixed resistors in the divider are 1%, 50 ppm/C metal film resistors that I bought at a literal fire sale in Bangkok. I realize that not everybody has these exact values on hand. But don't worry. Carbon film resistors should work about as well, though you might see the calibration drift a little with temperature. Just pick carbon film values that are close to the values of the resistors shown in the schematic, and it should work fine. You have the divider ratios, so if you feel the need, you can work out the optimum component values.
The circuit utilizes the ATmega8 microcontroller, which features an integrated 10-bit Analog-to-Digital Converter (ADC) capable of handling a voltage range from 0 to 2.5 volts, achieved through a resistive divider network. This divider allows for scaling of higher voltage inputs, such as the specified 102.3 volts, down to the ADC input range. The design incorporates a bandgap reference voltage of 2.5 volts to ensure consistent performance across varying conditions.
In order to accommodate the higher voltage range, resistors R2, R3, and R4 are employed to create a voltage divider that reduces the input voltage to the ADC. The switching of these resistors is controlled by PORTB bit 0, which toggles between high impedance (input mode) and low output mode. This configuration allows for seamless integration of the resistive divider into the circuit while maintaining control over the ADC input.
Power regulation is handled by a LM78L05 voltage regulator, which provides a stable 5V output from a higher voltage source, such as 9V or 30V. The choice of TO-92 or TO-220 packages for the regulator depends on the maximum input voltage and thermal considerations. The circuit has been designed to ensure that the maximum power dissipation does not exceed safe limits, taking into account the thermal resistance of the regulator.
Decoupling capacitors and inductors are strategically placed on the analog VCC line to stabilize the voltage and reduce noise. A 0.1 μF capacitor is implemented at the ADC input to maintain low impedance and act as a low-pass filter, minimizing noise that could affect the ADC readings.
The resistors used in the voltage divider are precision resistors with low temperature coefficients to ensure accuracy in the voltage scaling. While metal film resistors are preferred, carbon film resistors can also be utilized with acceptable results, provided they are selected to match the desired divider ratios.
Overall, the circuit is compact and efficient, making it suitable for applications requiring precise voltage measurements within the specified range. The design emphasizes good practices in component selection and layout to enhance reliability and performance. 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.
The circuit came out to be very simple and compact. The ATMEGA8 is the lowest pin count AVR controller that I could find that has an onboard 10 bit A-to-D converter. It had no problem directly driving the four digits delivering an average approximately 50 milliamps to the display.
The on-chip clock oscillator also saved some parts. I am not sure whether the 8 uH inductor and 0.33 uF decoupling capacitor on the analog VCC was necessary, but I used them as a good practice. Better to put a couple of extra parts on the board than to take the chance of having to take the board back and add them later.
The schematic above shows an ISP (In Circuit Programming) connector, which I had originally built onto the board so I could debug the firmware, using the crash-and-burn method - write the code and see if it runs. After I was satisfied with the performance of the meter, I cut off the portion of the board that had the ISP connector on it.
Power for the chip is regulated with a 7805 regulator. In this particular case, I used a TO-92 LM78L05 regulator. Measuring the current into the 5 volt input, I find a maximum of about 56 milliamps current drain, when displaying 08.88 volts. When powered from a 9 volt power source, the dissipation of the LM78L05 will be 224 mW. With a 200 degrees C per watt thermal resistance, junction temperature should be about 45 degrees above ambient.
A little more calculation showed that the maximum safe input voltage to the LM78L05 is just a little above 12 volts if my maximum ambient temperature is 40 degrees C. In Don's case, where he would power the meter from 30 volts, it would be best to use a TO-220 version of the LM7805.
When in the 102.3 volt range, some additional resistors, R2, R3, and R4, are connected to ground, so the input divider reduces 102.3 volts to 2.5 volts (40:1). These additional parts are switched in and out of the circuit by switching PORTB bit 0 I/O pin between being an input with no pullup to a low output.
I have noticed that with some AVR controllers, one cannot switch the mode of the output pin directly between these two states, so be sure to consult individual data sheets if you try this on other controllers. Notably, on the ATTINY861, it took a little bit more "bit twiddling" to switch an I/O pin between high impedance and low impedance states.
The 0.1 uf capacitor from the input of the A-to-D converter is there to not only keep the impedance seen by the input from being too high, but also to act, in conjunction with the input resistors, a low pass filter to reduce noise on the input. The fixed resistors in the divider are 1%, 50 ppm/C metal film resistors that I bought at a literal fire sale in Bangkok.
I realize that not everybody has these exact values on hand. But don't worry. Carbon film resistors should work about as well, though you might see the calibration drift a little with temperature. Just pick carbon film values that are close to the vales of the resistors shown in the schematic, and it should work fine.
You have the divider ratios, so if you feel the need, you can work out the optimum component values.
The circuit utilizes a 4046 Phase-Locked Loop (PLL) that incorporates a voltage-controlled oscillator (VCO), two phase comparators, a source follower, and a Zener diode to generate a low-frequency pulsed output of approximately 40 Hz. The frequency range of the VCO...
The LED operates at 3V, and based on information available online, a blue LED typically supports a maximum current of 0.03A. Given the available current from the USB source, the intention is to construct a parallel circuit. However, the last...
The brightness of an LED display is adjusted by utilizing a photocell in place of one timing resistor in a 555 timer configuration, while bypassing the other timing resistor to enhance the timer's maximum duty cycle. The outcome is a...
This was designed to flash a pair of LEDs to be mounted on the wing tips of a Parkzone Citabria R/C (remote control) airplane. The unmodified Parkzone Citabria only weighs 20 grams (about 0.7 oz), so weight, and therefore the...
Most PC enclosures provide only a single LED to indicate hard disk access, with the LED being connected to the motherboard via a two-pin connector. However, this LED only works with IDE drives, and if a SCSI disk controller is...
Displays up to eight different DC voltages on a CRT terminal of a microprocessor under keyboard control, using BASIC commands and a BASIC routine provided in the article. Utilizes a modified Motorola MC14433 dual-lamp integrating analog-to-digital converter. An unknown voltage...
This is a simple flashing LED circuit featuring two LEDs and two NPN transistors. It demonstrates the behavior of transistors and capacitors, and it can be used in an oscillating configuration.
The circuit consists of two NPN transistors, which function as...
All LED negatives are connected to the "COM" pad, then through a 220 Ohm resistor to ground. There is no need for additional current limiting resistors, even with supply voltages up to 16 volts.
The described circuit employs a simple yet...
A Very Simple circuit and some Variations. Play with it.
All parts are cheap and should be easily obtained. None are very critical.
The circuit in question is a basic electronic assembly designed for educational purposes and experimentation. It typically consists of...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more