I’m building a linear power supply and an Arduino Nano to measure and display values as accurate as possible on an Lcd display. The Voltage output is from 0.5 -25V (27V fluctuations!!) while the current measurement is less than 5 Amperes; I use an LM358 (powered from 5 volts) as a current sense amplifier measuring millivolts and a shunt resistor .01 ohms. I’m using a 4.096 voltage reference. My voltage divider is R1= 25K, and R2= 5k ( R1 4 parallel 100k, R2 2 parallel 10k and all are 1%).
I searched videos on precision and accuracy and watched a lot on ADC and references etc. and here’s what I could gather.
I wonder if I can 1. improve the Voltage measurement compared to (Uni-t139C) through software and 2. use a different voltage reference for current measurement, for instance 1.1V, as I am using only the 5 volts input to A1 without a divider. I think things get complicated as I have to make switch to different references to achieve this.
//Edited October 2025
// updated December13 2025 by adding an external 4.096 V-reference
Nice design. I do not do this often, but when I do, I use the calibrate method with standard temperature-stable parts. Then I use my Fluke voltage source to set the high end, and I check the mid and low points. They usually come out OK.
Unless you build in ranging, with a 25 V full scale you will get about 0.2443 volts per count. Using your reference value, it comes out to about 0.004 volt per count.
Thanks a lot I’ll consider your suggestions for another project. As for this one, I have been inspired by some V references, high resolution measurements and precision videos and also this one: https://youtu.be/JCxF-o6tLgA. I was amazed he got the reading in accordance with his DVM. I have got a large lcd and I would like to get similar results, later when I get the 16 bit ADC. This power supply is probably the 20th I make in my life from Analog meters, ICL7106, 7107, 70135 etc and the similar tiny Chinese displays. The idea is to get a power supply where I use it as powerful voltage and current source with more 4-5 digits without frequent recourse to a DMM to check precision.
Thanks for the suggestions, it looks simple and neat. I’ll try it and consider precision. I wonder if I can still use the EXTERNAL voltage reference 4.096V for the voltage measurements as it is more precise than the DEFAULT.
Thanks a lot. Yes, I don’t want it to go beyond 4 Amps. I have a short circuit protection and current limit shutting off when exceeded. Fed up of shorts and smoke, I am happy with 3.5 Amperes only to power a halogen lamp for test purposes.
I tried with an OP77G which requires offsetting and dual supply, and burned a few tiny OPA340 while trying. I remember I got more or less math readings I couldn’t figure out(I am a tinkerer with minimum math experience) so I gave those up and used the modest LM358 as it worked well. I have been trying to understand the V-reference relation with the max imput voltage. As I heard 1.1 is the best I used it but got reading only to 8.xx volts then I used a 2.5 reference and I got 16.xx so I figured out I need a 5V reference. So I used the propagated 4.096 and it worked. I had no idea that the voltage to measure would be down to earth if you use 1.1 reference and I only found videos talking about measuring voltages higher than 5V adding a voltage divider without specific reference to the suitable voltage reference.
As I already mentioned that is not possible with your current circuit.
The output of the opamp will go way beyond the 1.1V reference voltage.
Also you are limited to 3.5A
For accurate current measurement you need a 4 terminal shunt resistor. Your shunt is 10 milliohms, so a connection resistance of 100 MICROOHMS will give you a 1% error.
Also you need to consider the material of the connections, as if you create a thermocouple that will also throw off your results.
The problem with using resistors of such a low value is that the resistance of the solder joints and circuit board traces can be a similar order of magnitude and hence will create a voltage drop similar in magnitude to the voltage drop across the sense resistor itself. This makes accurately measuring the voltage drop through the precision sense resistor a bit tricky. The most robust solution to this is to separate the high current path from the voltage sense path with a 4 terminal shunt. The high current path may have a few extra milivolts of drop due to the extra miliohms of resistance from the traces and solder joints, but the voltage sense connections will not see this due to the different current path and can therefore much more accurately read the shunt voltage.
If it were easy for me I would buy, as I like to have those precision cheap parts. I can only buy from sources like Temu, who don’t have such items. If I were to order from Digikey or Mouser I have to order a big list to compensate for customs, tax in my country and overseas post. This is why I try to make do with whatever I have.
As for your suggested circuit, I added the resistors and the second OP as in the schematic. At the outset I get 0.475 Volts DC no load. When I connect a load (a car halogen lamp) to 12V source, I read 3.632 Volts on the UNI-T and 12V 3.2A on the power supply. I have to only subtract the 475 millivolts in software.