Do-it-yourself digital voltmeter. Digital voltmeter for very high accuracy. Features of voltage measurement by a microcontroller

In today's lesson, we will consider the option of making a home-made digital voltmeter for measuring voltage on a single battery. Voltage measurement limits 1-4.5 Volts. External additional power, except for the measured one, is not required.

25 years ago I had a cassette player. I fed it with Ni-Cd batteries NKGTS-0.45 with a capacity of 450 mAh. In order to determine which batteries have already sat down on the road, and which ones will still work, a simple device was made.


Battery-accumulator diagnostic and measuring complex.


It is assembled according to the voltage converter circuit on two transistors. An output LED is on. In parallel with the input connected to the battery, a resistor wound from nichrome is connected. Thus, if the battery is capable of delivering about 200mA, then the LED lights up.

Among the shortcomings - the dimensions of the contacts are rigidly curved to the length of the AA element, it is not convenient to connect all other standard sizes. Well, you can't see the pressure. Therefore, in the digital age, I wanted to make a more high-tech device. And of course on the microcontroller, where without it :)

So, the scheme of the designed device.

Used parts:
1. 0.91 inch 128x32 OLED display (about $3)
2. ATtiny85 microcontroller in SOIC package (about $1)
3. Boost DC/DC Converter LT1308 from Linear Technology. ($2.74 for 5 pieces)
4. Ceramic capacitors, soldered from a faulty video card.
5. Inductance of COILTRONICS CTX5-1 or COILCRAFT DO3316-472.
6. Schottky diode, I used MBR0520 (0.5A, 20V)

Voltage converter LT1308

Characteristics from the description of LT1308:

They promise 300mA 3.3V from one NiCd element, it suits us. The output voltage is set by a divider, resistors 330kOhm and 120kOhm, with the indicated ratings, the output voltage of the converter is about 4.5V. The output voltage was chosen to be sufficient to power the controller and display, slightly higher than the maximum measured voltage on a lithium battery.

To unlock the full potential of the voltage converter, you need inductance, which I don’t have (see paragraph 5 above), so the converter I assemble has obviously worse parameters. But my load is very small. When a real load is connected from the microcontroller and the OLED display, such a load table is obtained.

Great, let's move on.

Features of voltage measurement by a microcontroller

The ATtiny85 microcontroller has a 10-bit ADC. Therefore, the reading level is in the range 0-1023 (2^10). To convert to voltage, use the code:
float Vcc = 5.0; int value = analogRead(4); / read readings from A2 float volt = (value / 1023.0) * Vcc;
Those. It is assumed that the supply voltage is strictly 5V. If the supply voltage of the microcontroller changes, then the measured voltage will also change. Therefore, we need to know the exact value of the supply voltage!
Many AVR chips including the ATmega and ATtiny series provide a means to measure the internal voltage reference. By measuring the internal reference voltage, we can determine the value of Vcc. Here's how:
  • Set the voltage reference analogReference(INTERNAL).
  • Read the ADC readings for the internal 1.1 V supply.
  • Calculate the value of Vcc based on the measurement of 1.1 V using the formula:
Vcc * (ADC reading) / 1023 = 1.1 V
From what it follows:
Vcc = 1.1 V * 1023 / (ADC readings)
On the Internet, a function was found to measure the controller supply voltage:

readVcc() function

long readVcc() ( // Read 1.1V reference against AVcc // set the reference to Vcc and the measurement to the internal 1.1V reference #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) ADMUX = _BV (REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) ADMUX = _BV(MUX5) | _BV (MUX0); #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) ADMUX = _BV(MUX3) | _BV(MUX2); #else ADMUX = _BV(REFS0) | _BV(MUX3) | _BV( MUX2) | _BV(MUX1); #endif delay(75); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Start conversion while (bit_is_set(ADCSRA,ADSC)); // measuring uint8_t low = ADCL; // must read ADCL first - it then locks ADCH uint8_t high = ADCH; // unlocks both long result = (high<<8) | low; result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 return result; // Vcc in millivolts }


To display on the screen, the Tiny4kOLED library with the included 16x32 font is used. From the font, to reduce the size of the library, 2 unused characters (, and -) were removed and the missing letter "B" was drawn. The library code has been changed accordingly.
Also, to stabilize the displayed measurements, the function with was used, thanks to the author dimax, works good.

I debugged the code on the Digispark board in the arduino IDE. After that, ATtiny85 was desoldered and soldered to the breadboard. We assemble the breadboard, set the voltage at the output of the converter with a trimmer resistor (at first I set the output to 5V, while the current at the input of the converter was under 170mA, reduced the voltage to 4.5V, the current dropped to 100mA). When the ATtiny85 is soldered to the breadboard, I have to fill in the code using a programmer, I have a regular USBash ISP.


Program code

// SETUP /* * Set #define NASTROYKA 1 * Compile, fill in the code, run, remember the value on the display, for example 5741 * Measure the real voltage at the output of the converter with a multimeter, for example 4979 (this is in mV) * We consider (4979/5741) * 1.1=0.953997 * Calculate 0.953997*1023*1000 = 975939 * Write the result to line 100 as result = 975939L * Set #define NASTROYKA 0 * Compile, fill in the code, run, done. */ #define NASTROYKA 0 #include #include longVcc; float Vbat; // fine-tuning the smoothing algorithm shumodav() #define ts 5 // *table size* number of rows of the array for storing data, for a deviation of ± 2 counts, optimally 4 rows and one in reserve. #define ns 25 // *number samples*, from 10..to 50 is the maximum number of samples to analyze the 1st part of the algorithm #define ain A2 // which analog input to read (A2 is P4) #define mw 50 // *max wait* from 15..to 200 ms wait for the second part of the algorithm to repeat counting unsigned int myArray, aread, firstsample, oldfirstsample, numbersamples, rezult; unsigned long prevmillis = 0; boolean waitbegin = false; //flag of enabled countdown wait counter void setup() ( oled.begin(); oled.clear(); oled.on(); oled.setFont(FONT16X32_sega); ) void loop() ( for (byte i = 0 i< 5; i++) { Vcc += readVcc(); } Vcc /= 5; shumodav(); Vbat = ((rezult / 1023.0) * Vcc) / 1000; if (Vbat >= 0.95) ( oled.setCursor(16, 0);#if NASTROYKA oled.print(result); #else oled.print(Vbat, 2); oled.print("/"); #endif ) Vcc = 0; ) long readVcc() ( // read the actual supply voltage // Read 1.1V reference against AVcc // set the reference to Vcc and the measurement to the internal 1.1V reference #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) = _BV(MUX5) | _BV(MUX0); #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) ADMUX = _BV(MUX3) | _BV(MUX2); #else ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #endif delay(75); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Start conversion while (bit_is_set(ADCSRA, ADSC)) ; // measuring uint8_t low = ADCL; // must read ADCL first - it then locks ADCH uint8_t high = ADCH; // unlocks both long result = (high<< 8) | low; // result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 // индикатор показывал 4990, вольтметр 4576мВ (4576/4990)*1.1=1.008737 result = 1031938L / result; // Calculate Vcc (in mV); 1031938 = 1.008737*1023*1000 return result; // Vcc in millivolts } void shumodav() { // главная функция //заполнить таблицу нолями в начале цикла for (int s = 0; s < ts; s++) { for (int e = 0; e < 2; e++) { myArray[s][e] = 0; } } // основной цикл накопления данных for (numbersamples = 0; numbersamples < ns; numbersamples++) { #if NASTROYKA aread = readVcc(); #else aread = analogRead(ain); #endif // уходим работать с таблицей//// tablework(); } // заполнен массив, вычисляем максимально повторяющееся значение int max1 = 0; // временная переменная для хранения максимумов for (byte n = 0; n < ts ; n++) { if (myArray[n] >max1) ( // iterate over 2 elements of strings max1 = myArray[n]; // remember where the most hit firstsample = myArray[n]; // its 1 element = intermediate result. ) ) //***** second phase of the algorithm *********///// // if the old sample is not equal to the new one, //and there was no time count enable flag, then if (oldfirstsample != firstsample && waitbegin == false) ( prevmillis = millis(); // reset the time counter to the beginning waitbegin = true; ) // activate the wait flag // if before the time limit expired, the countdown was equal //to the old one, then remove the flag if (waitbegin == true && oldfirstsample == firstsample ) ( waitbegin = false; rezult = firstsample; ) // if the countdown still didn't equal, and the wait timed out if (waitbegin == true && millis() - prevmillis >= mw) ( oldfirstsample = firstsample; waitbegin = false; rezult = firstsample; ) //then we recognize the new sample as the final result of the function. ) // end of the main function void tablework() ( // function for entering data into the table // if the table has the same count, then increment // its counter in the second element for (byte n = 0; n< ts; n++) { if (myArray[n] == aread) { myArray[n] ++; return; } } // перебираем ячейки что б записать значение aread в таблицу for (byte n = 0; n < ts; n++) { if (myArray[n] == 0) { //если есть пустая строка myArray[n] = aread; return; } } // если вдруг вся таблица заполнена раньше чем кончился цикл, numbersamples = ns; } // то счётчик циклов на максимум


As mentioned above, the controllers have an internal 1.1V voltage reference. It is stable but not accurate. Therefore, its real voltage is most likely different from 1.1V. To find out how much it really is, you need to calibrate:

* Set #define NASTROYKA 1
* Compile, fill in the code, run, remember the value on the display, for example 5741
* We measure the real voltage at the output of the converter with a multimeter, for example 4979 (this is in mV)
* We consider (4979/5741)*1.1=0.953997 - this is the real voltage of the reference voltage source
* Calculate 0.953997*1023*1000 = 975939
* Write the result to line 100 as result = 975939L;
* Set #define NASTROYKA 0
* Compile, fill in the code, run, ready.

In the DipTrace program, we breed a board, the size of an OLED display 37x12mm


Half an hour of unloved LUT activity.


Find 10 differences

The first time I screwed up and etched the mirror board, I noticed this only when I started soldering the elements.



We solder. SMD inductance 4.7uH was kindly provided to me, many thanks, Sergey.


We collect a sandwich from the board and the screen. At the ends of the wires, I soldered small magnets, the voltmeter itself snaps to the measured battery. When heated above 80 degrees, neodymium magnets lose their magnetic properties, so you need to solder with Wood's or Rose's low-melting alloy very quickly. Once again, we calibrate and check the measurement accuracy:






Liked the review +126 +189

Automotive, laboratory power supplies can have currents that reach up to 20 amperes or more. It is clear that a couple of amperes can be easily measured with an ordinary cheap multimeter, but what about 10, 15, 20 or more amperes? After all, even at not very large loads, the shunt resistors built into the ammeters for a long measurement time, sometimes even hours, can overheat and, in the worst case, melt.

Professional instruments for measuring high currents are quite expensive, so it makes sense to assemble the ammeter circuit yourself, especially since there is nothing complicated here.

Electric circuit of a powerful ammeter

The circuit, as you can see, is very simple. Its operation has already been tested by many manufacturers, and most industrial ammeters work in the same way. For example, this circuit also uses this principle.


Power ammeter board drawing

The peculiarity lies in the fact that in this case a shunt (R1) is used with a very low resistance value - 0.01 Ohm 1% 20W - this makes it possible to dissipate very little heat.

Operation of the ammeter circuit

The operation of the circuit is quite simple, when a certain current passes through R1, there will be a voltage drop across it, it can be measured, for this, the voltage is amplified by the operational amplifier OP1 and goes further to the output through pin 6 to an external voltmeter turned on at the limit of 2V.


The adjustments will consist of zeroing the output of the ammeter in the absence of current, and calibrating it by comparing it with another reference current measuring instrument. The ammeter is powered by a stable symmetrical voltage. For example, from 2 batteries of 9 volts. To measure the current, connect the sensor to the line and a multimeter in the 2V range - see the readings. 2 volts will correspond to a current of 20 amperes.

Using a multimeter and a load, such as a small light bulb or resistance, we will measure the load current. Connect an ammeter and get the current readings with a multimeter. We recommend doing several tests with different loads to compare readings with a reference ammeter and make sure everything is working properly. You can download the printed armor file.

Ammeters are devices that are used to determine the amount of current in a circuit. Digital modifications are made on the basis of comparators. They differ in terms of measurement accuracy. It is also important to note that the devices can be installed in a circuit with direct and alternating current.

According to the type of construction, panel, portable, as well as built-in modifications are distinguished. By appointment, there are pulse and phase-sensitive devices. Selective models are allocated in a separate category. In order to delve into the instruments in more detail, it is important to know the device of the ammeter.

Ammeter circuit

A typical digital ammeter circuit includes a comparator along with resistors. A microcontroller is used to convert the voltage. Most often it is used with reference diodes. Stabilizers are installed only in selective modifications. Broadband filters are used to increase the measurement accuracy. Phase devices are equipped with transceivers.

DIY model

Assembling a digital ammeter with your own hands is quite difficult. First of all, this will require a high-quality comparator. The sensitivity parameter should be at least 2.2 microns. It must maintain a minimum resolution of 1 mA. The microcontroller in the device is installed with reference diodes. The indication system is connected to it through a filter. Next, to assemble a digital ammeter with your own hands, you need to install resistors.

Most often they are selected switched type. The shunt in this case should be located after the comparator. The division factor of the device depends on the transceiver. If we talk about a simple model, then it is used as a dynamic type. Modern devices are equipped with ultra-precise analogues. A conventional lithium-ion type battery can serve as a stable current source.

DC devices

The DC digital ammeter is produced on the basis of highly sensitive comparators. It is also important to note that stabilizers are installed in the devices. Resistors are only suitable for the switched type. The microcontroller in this case is installed with reference diodes. If we talk about the parameters, then the minimum resolution of the devices is 1 mA.

AC modifications

Ammeter (digital) AC can be made independently. Microcontrollers in models are used with rectifiers. Broadband type filters are used to increase the measurement accuracy. The shunt resistance in this case should not be less than 2 ohms. The sensitivity of the resistors must be 3 microns. Stabilizers are most often installed expansion type. It is also important to note that you will need a triode for assembly. It must be soldered directly to the comparator. The permissible error of devices of this type fluctuates around 0.2%.

Pulse measuring instruments

Pulse modifications are distinguished by the presence of counters. Modern models are produced on the basis of three-digit devices. Resistors are used only orthogonal type. As a rule, the division factor for them is 0.8. The allowable error, in turn, is 0.2%. The disadvantages of the devices include sensitivity to the humidity of the environment. They should also not be used in sub-zero temperatures. It is problematic to assemble the modification on your own. Transceivers in models are used only dynamic type.

Device for phase-sensitive modifications

Phase-sensitive models are sold at 10 and 12 V. The permissible error parameter for models fluctuates around 0.2%. Counters in devices are used only two-digit type. Microcontrollers are used with rectifiers. Ammeters of this type are not afraid of high humidity. Some modifications have amplifiers. If you are assembling the device, you will need switched resistors. A conventional lithium-ion battery can act as a stable current source. A diode is not needed in this case.

Before installing the microcontroller, it is important to solder the filter. A converter for lithium-ion will need a variable type. Its sensitivity index is at the level of 4.5 microns. When cutting in the circuit, it is necessary to check the resistors. The division factor in this case depends on the bandwidth of the comparator. The minimum pressure of devices of this type does not exceed 45 kPa. The current conversion process itself takes about 230 ms. The clock rate depends on the quality of the counter.

Scheme of selective devices

The DC selective digital ammeter is based on high bandwidth comparators. The allowable error of the models is 0.3%. The devices operate on the principle of one-stage integration. Counters are used only two-digit type. Sources of stable current are installed behind the comparator.

Resistors are used of the switched type. For self-assembly of the model, two transceivers are required. Filters in this case can significantly improve the accuracy of measurements. The minimum pressure of the devices lies in the region of 23 kPa. A sharp drop in voltage is quite rare. The shunt resistance, as a rule, does not exceed 2 ohms. The current measuring frequency depends on the operation of the comparator.

Universal measuring instruments

Universal ones are more suitable for home use. Comparators in devices are often set to low sensitivity. Thus, the allowable error lies in the region of 0.5%. Counters are used three-digit type. Resistors are used on the basis of capacitors. Triodes are found both phase and pulse type.

The maximum resolution of the devices does not exceed 12 mA. The shunt resistance is usually around 3 ohms. Permissible humidity for devices is 7%. The limiting pressure in this case depends on the installed protection system.

Shield models

Panel modifications are made for 10 and 15 V. Comparators in devices are installed with rectifiers. The allowable error of the devices is at least 0.4 5. The minimum pressure of the devices is about 10 kPa. Converters are used mainly of variable type. For self-assembly of the device, you can not do without a two-digit counter. Resistors in this case are installed with stabilizers.

Built-in modifications

The digital built-in ammeter is produced on the basis of reference comparators. the models are quite high, and the margin of error is about 0.2%. The minimum resolution of the devices does not exceed 2 mA. Stabilizers are used both expansion and impulse type. Resistors are set to high sensitivity. Microcontrollers are often used without rectifiers. On average, the current conversion process does not exceed 140 ms.

DMK Models

Digital ammeters and voltmeters of this company are in great demand. In the assortment of this company there are many stationary models. If we consider voltmeters, then they can withstand a maximum pressure of 35 kPa. In this case, the transistors are of the toroidal type.

Microcontrollers are usually installed with converters. For laboratory research, devices of this type are ideal. Digital ammeters and voltmeters of this company are manufactured with protected cases.

Torex device

The indicated ammeter (digital) is produced with increased current conductivity. The maximum pressure the device can withstand is 80 kPa. The minimum allowable temperature of the ammeter is -10 degrees. The specified is not afraid of the increased humidity. It is recommended to install it near the power source. The division factor is only 0.8. The ammeter (digital) withstands maximum pressure of 12 kPa. The current consumption of the device is about 0.6 A. The triode is of the phase type. For domestic use, this modification is suitable.

Lovat device

The indicated ammeter (digital) is made on the basis of a two-digit counter. The current conductivity of the model is only 2.2 microns. However, it is important to note the high sensitivity of the comparator. The display system is simple, and it is very comfortable to use the device. The resistors in this ammeter (digital) are of the switched type.

It is also important to note that they are able to withstand a large load. The shunt resistance in this case does not exceed 3 ohms. The current conversion process is quite fast. A sharp drop in voltage can only be associated with a violation of the temperature regime of the device. The permissible humidity of the indicated ammeter is as much as 70%. In turn, the maximum resolution is 10 mA.

DigiTOP Model

This DC is available with reference diodes. The counter in it is provided for a two-digit type. The conductivity of the comparator is at around 3.5 microns. The microcontroller is used with a rectifier. Its current sensitivity is quite high. The power source is a conventional battery.

Resistors are used in a switched type device. The stabilizer is not provided in this case. There is only one triode. Direct current conversion occurs quite quickly. For domestic use, this device is suitable. Filters to increase measurement accuracy are provided.

If we talk about the parameters of the voltmeter-ammeter, it is important to note that the operating voltage is at the level of 12 V. The current consumption in this case is 0.5 A. The minimum resolution of the presented device is 1 mA. The shunt resistance is at around 2 ohms.

The division factor of the voltmeter-ammeter is only 0.7. The maximum resolution of this model is 15 mA. The current conversion process itself takes no more than 340 ms. The permissible error of the specified device is located at a level of 0.1%. The minimum pressure the system can withstand is 12 kPa.

It’s impossible to come up with everything yourself - while the knowledge of microprocessor programming is not enough (I’m just learning), but I don’t want to lag behind. Surfing the Internet gave several different options, both in terms of the complexity of the circuitry and the functions performed, and the processors themselves. An analysis of the situation on local radio markets and a sober approach (buy what you can afford; do what you really can, and the manufacturing process and the setup time will not drag on for an unlimited time) made my choice on the voltmeter circuit described on www.CoolCircuit.com.

So the below circuit diagram already corrected. The firmware remained native (main.HEX - I attach).

Those who “hold processors in their hands often” may not read further, but for the rest, especially those who are for the first time, I will tell you how to do everything, although not optimally (may the professionals forgive me the style of presentation), but in the end correctly.
So, for reference: the PIC family of 14-pin processors has different pinouts, so you need to check whether the programmer you have with sockets is suitable for this chip. Pay attention to the 8-pin socket, as a rule, it is exactly what fits, and the conclusions on the far right just hang. I used the usual PonyProg programmer.

When programming PIC, it is important not to overwrite the calibration constant of the chip's internal oscillator, because external quartz is not used here. It is recorded in the last cell (address) of the processor memory. If you use IcProg by selecting the type of MC, then in the window - "Address of the program code" in the last line marked with the address - 03F8, the four characters on the right are the specified individual constant. (If the chip is new and has never been programmed, then after a bunch of 3FFF characters - the last one will be something like 3454 - this is the very thing).

In order for the calculation of the voltmeter readings to be true, to do everything correctly and understand the process of what is happening, I propose, although not optimal, but I hope an understandable algorithm:

Before programming the MK, you must first give the “Read All” command in IcProg and look at the above memory cell - the individual constant of this chip will be listed there. It must be rewritten on a piece of paper (do not keep it in your memory! - you will forget it).
- load the MK firmware program file - with *.hex extension (in this case - "main.hex") and check which constant is written in the same cell in this software product. If it is different, put the cursor and enter there the data previously recorded on a piece of paper.
- press the command to program - after a question like: "whether to use the oscillator data from a file" - you agree. For you have already checked that there is what you need.

Once again, I apologize to those who do a lot of programming and don’t do that, but I’m trying to convey to beginners information about a fairly important software element of this microprocessor and not lose it due to various situations that are sometimes completely incomprehensible, or even inexplicable later. Especially if, with shaking hands with excitement, he stuck the chip into the programmer that had just been built and connected to the computer for the first time and, worrying, you press the program button, and this miracle of technology also begins to ask incomprehensible questions - this is where all the troubles begin.

So, if all the steps are completed correctly, the MK chip is ready for use. Next is the matter of technology.
On my own behalf, I want to add that transistors are not critical here - any p-n-p structures are suitable, incl. Soviet, in a plastic case. I used soldered from imported household appliances after checking for compliance with the conductivity structure. In this case, one more nuance is inherent - the location of the output of the base of the transistor can be in the middle of the case or on the edge. For the operation of the circuit, this is indifferent, it is only necessary to form conclusions accordingly when soldering. Fixed resistors for the voltage divider - exactly the specified value. If you can’t find an imported 50 kOhm trimming resistor, then it’s advisable to take a little more Soviet-made - 68 kOhm, and I don’t recommend taking 47 kOhm, because in the event of a simultaneous coincidence of reduced ratings, the calculated ratio of the voltage divider resistances will be lost, which can be difficult to fix with a rack stand.

As I already wrote, my power supply has two arms - so I made two voltmeters on one board at once, and brought the indicators to a separate board to save space on the front panel. Spread under the usual elements. Files with board layout, source and hex are attached in the archive. You have SMD, then it is not difficult to remake it, if necessary, please contact.

For those who want to repeat this voltmeter and have, like mine, a bipolar power supply with a common midpoint - I remind you of the need to power both voltmeters from two separate (galvanically separated) sources. Let's say - separate windings of a power transformer or, as an option - a pulse converter, but always with two windings of 7 Volts (unstabilized). For those who will make a "pulse": the current consumption of the voltmeter is from 70 to 100 mA, depending on the size and color of the indicator. Otherwise, no negative voltage can be applied to the MK port.
If anyone needs a converter circuit, ask on the forum, I'm currently working on this issue.

Archive with the necessary data and seals in SLayout-5rus:

When working with various electronic products, there is a need to measure the modes or distribution of alternating voltages on individual circuit elements. Ordinary multimeters, switched on in AC mode, can only record large values ​​of this parameter with a high degree of error. If you need to take small readings, it is desirable to have an AC millivoltmeter that allows measurements to be made with millivolt accuracy.

In order to make a digital voltmeter with your own hands, you need some experience with electronic components, as well as the ability to handle an electric soldering iron well. Only in this case can you be sure of the success of the assembly operations carried out independently at home.

Microprocessor Based Voltmeter

Parts selection

Before you make a voltmeter, experts recommend carefully working out all the options offered in various sources. The main requirement for such a selection is the utmost simplicity of the circuit and the ability to measure alternating voltages with an accuracy of 0.1 Volt.

An analysis of a variety of circuit solutions showed that for the independent manufacture of a digital voltmeter, it is most expedient to use a programmable microprocessor of the PIC16F676 type. For those who are new to the technique of reprogramming these chips, it is advisable to purchase a microcircuit with ready-made firmware for a home-made voltmeter.

When purchasing parts, special attention should be paid to choosing a suitable indicator element on the LED segments (the option of a typical pointer ammeter is completely excluded in this case). In this case, preference should be given to a device with a common cathode, since the number of circuit components in this case is noticeably reduced.

Additional Information. As discrete components, you can use ordinary purchased radio elements (resistors, diodes and capacitors).

After acquiring all the necessary parts, you should proceed to the wiring of the voltmeter circuit (manufacturing its printed circuit board).

Board preparation

Before manufacturing a printed circuit board, you need to carefully study the electronic meter circuit, taking into account all the components on it and placing them in a place convenient for desoldering.

Important! If you have free funds, you can order the manufacture of such a board in a specialized workshop. The quality of its performance in this case will undoubtedly be higher.

After the board is ready, you need to “stuff” it, that is, place all electronic components in their places (including the microprocessor), and then solder them with low-temperature solder. Refractory compounds in this situation are not suitable, since high temperatures will be required to heat them up. Since all the elements in the assembled device are miniature, their overheating is highly undesirable.

Power supply (PSU)

In order for the future voltmeter to function normally, it will need a separate or built-in DC power supply. This module is assembled according to the classical scheme and is designed for an output voltage of 5 volts. As for the current component of this device, which determines its rated power, half an ampere is enough to power the voltmeter.

Based on these data, we prepare ourselves (or give it to a specialized workshop for manufacturing) a printed circuit board for a power supply unit.

Note! It would be more rational to immediately prepare both boards (for the voltmeter itself and for the power supply), without spreading these procedures over time.

With self-production, this will allow you to perform several operations of the same type at once, namely:

  • Cutting from sheets of fiberglass of the required size blanks and their stripping;
  • Making a photomask for each of them with its subsequent application;
  • Etching these boards in a solution of ferric chloride;
  • Stuffing them with radio components;
  • Soldering all placed components.

In the case when the boards are sent for manufacturing on proprietary equipment, their simultaneous preparation will also allow you to gain both in price and in time.

Assembly and setup

When assembling the voltmeter, it is important to ensure that the microprocessor itself is installed correctly (it must already be programmed). To do this, you need to find the marking of its first leg on the body and, in accordance with it, fix the body of the product in the mounting holes.

Important! Only after there is complete confidence in the correct installation of the most critical part, you can proceed to its soldering (“landing on solder”).

Sometimes, to install a microcircuit, it is recommended to solder a special socket under it into the board, which greatly simplifies all the working and configuration procedures. However, this option is beneficial only if the socket used is of high quality and provides reliable contact with the legs of the microcircuit.

After soldering the microprocessor, you can fill and immediately put on the solder all the other elements of the electronic circuit. During the soldering process, the following rules should be followed:

  • Be sure to use an active flux that promotes good spreading of liquid solder over the entire landing area;
  • Try not to hold the sting in one place for too long, which eliminates overheating of the mounted part;
  • After soldering, be sure to wash the printed circuit board with alcohol or any other solvent.

In the event that no errors were made during the assembly of the board, the circuit should work immediately after connecting power to it from an external source of a stabilized voltage of 5 Volts.

In conclusion, we note that your own power supply can be connected to the finished voltmeter upon completion of its configuration and verification, carried out according to the standard method.

Video



What else to read