# Measuring voltage over a shunt with an op amp

Hello !

I'm currently working on a project and one of the tasks is to measure the voltage and current of a current rectifier with an Arduino Uno, on four different points on the circuit. The voltage goes up to 30V and current up to 100A.
I'll be using four 60mV/150A shunts, so I need to use the Uno as a voltmeter over the shunt. Since I need to make readings from 0 to 60mV, I planned to use an op amp to have better resolution and get the readings with a precision of at least 0,01mV.
The problem is that I never used an op amp, so I'm kinda lost here.

Can anyone help me figure this out? Is the op amp really the best option? Which one? I've been searching and read people talking about changing the voltage reference, but I didn't quite get it.

Any help is greatly appreciated.

Did you try researching op amps?

rafael-b:
...measure the voltage and current of a current rectifier

Since I need to make readings from 0 to 60mV, I planned to use an op amp to have better resolution and get the readings with a precision of at least 0,01mV.

What do you mean with current rectifier.
Is this AC, DC, Uni- (0-100A) or bipolar (+100A to -100A).

Forget the idea of opamp-Arduino.
You ask for a better than 0.01mV:60mV = 1:6000 resolution.
The Arduino has a 10-bit (1024) resolution.
You need a better than 13-bit A/D.
Something like this would be ok to connect across your shunt, but voltage and resolution are not high enough.
This, plus your shunt could work. You still need a better A/D for the required resolution.
Q: Do you really need to see 10mA steps. Measuring that with a 100A shunt could be a challenge.
Leo..

Measuring on 4 points of a circuit typically means different potential, i.e. no common ground line for the sensors. You should be experienced in using instrumentation op amps in such an environment. Eventually you can use 4 battery powered Arduinos, one for each point, and transmit the digitized values through opto couplers.

The INA169 I linked to is a differential opamp that can measure upto 60volts above ground.
While still being supplied from 3.3volt or 5volt of the micro or A/D converter.
I would like to see a schematic diagram of OP's circuit.
Leo..

Wawa:
What do you mean with current rectifier.
Is this AC, DC, Uni- (0-100A) or bipolar (+100A to -100A).

Forget the idea of opamp-Arduino.
You ask for a better than 0.01mV:60mV = 1:6000 resolution.
The Arduino has a 10-bit (1024) resolution.
You need a better than 13-bit A/D.
Something like this would be ok to connect across your shunt, but voltage and resolution are not high enough.
This, plus your shunt could work. You still need a better A/D for the required resolution.
Q: Do you really need to see 10mA steps. Measuring that with a 100A shunt could be a challenge.
Leo..

I've left out some important details, my bad.

I need to measure current and voltage (0-100A and 30V) both DC.
The current rectifier is the circuit, it has been built already. I'm trying to connect shunts to three (not four) points on the current rectifier, and measure voltage with arduino over them.

Does that change much of what you suggested?
In what steps can I measure over a 100A shunt that isn't that much of a challenge?

DrDiettrich:
Measuring on 4 points of a circuit typically means different potential, i.e. no common ground line for the sensors. You should be experienced in using instrumentation op amps in such an environment. Eventually you can use 4 battery powered Arduinos, one for each point, and transmit the digitized values through opto couplers.

Yes, I was thinking on using one Arduino for each point.

Thank you again !

I have done this using a shunt and op-amp set up with a differential input with accurate results using an ads115 (16bit resalution) and voltage upto 50v, I would not use the 10bit adc in the Uno the ads1115 has only has 4 channels but u can get 8 channel adc's. It has a menu in there to for calibration of the volts and amps. I will post the code and diagrams as soon as I can if you like but will be more than likely Wednesday before I can
It should give you some idea how to do it

Steve

rafael-b:
I've left out some important details, my bad.

A circuit diagram would help.
Leo..

Hi,
You need to look for instrumentation operational amplifiers

They are designed for mV inputs to V outouts while minimising any noise added to the amplified signal.

If you google arduino instrumentation operational amplifiers

You will find many references, even to your particular enquiry of using current shunts.

Tom...

TomGeorge:
You need to look for instrumentation operational amplifiers
Tom…

You’re quite right about instrumentation operational amplifiers but I preferred to make my own, I’ve attached the cut down simple version of what I’ve used with very good results and my calculated results match my current fluke clamp meter in real time on the Arduino. It must run from +/-5V to get it down to Zero reading using a OPA2227A op-amp(I’m looking at other op-amps with low off set)But running it off with ± 5V OV offset is just 86µV . I went for this method has the other part of the circuit converts a negative signal into a positive signal which allows me to monitor current flowing in and out of the battery showing a minus sign when current is flowing in the opposite direction only using one shunt for high currents. But the cut down version does work for one way fixed applications(see drawing). Also attached is a spread sheet I used for my project for the formula I entered into my code, The code will follow shortly as it needs tidying up, I have used 4 line I2C LCD to display the real voltage that is been read by the AD1115 for both voltage and current then the calculated voltage and current readings. Once completed I will use 2x16 and only display the data I need to.The readings on my Arduino read exactly as my fluke meter and fluke current clamp does.

Some one may find it useful, I certainly enjoyed playing around with this project

OP-AMP CALULATOR.xls (1).zip (33.6 KB)

Hi,
Fine on the circuit.
The usual instrumentation config with an separate opamp on each input is to compensate temperature drift in gain and offset that can occur.
Even 3 discrete opamp ICs in the usual config can do this compensate.

Tom.....

I don't have a sketch of the circuit drawn on any cad, but I can draw it by hand if you want to see it.

I was talking to the engineer who built the circuit, and we are not much experienced on using arduino, so my questions here may seem stupid.
He didn't think we would have to use one arduino for each of the three shunts, so he suggested using multiplexers. The idea currently is:

Getting a voltage signal (up to 60mV) over the shunt, amplify it to 5V with op amp, and send it to a multiplexer. Do this for each shunt. There will also be three other voltage measurements (over capacitors, up to 30V DC, scaled down to 5V with voltage divider) on the circuit, and later, if possible, three temperature measurements over the diode bridges. All these 9 signals sent to three multiplexers.
Get a square wave through the PWM on Arduino to control counters from 0 to 2, connect them to the multiplexers to alternate between the 3 signals. Input those three signals to analog ports on Arduino.
So, for exemple:
A0 will receive 3 voltage values corresponding to the shunts, alternating with PWM freq.
A1 will receive 3 voltages corresponding to capacitors, alternating with PWM freq.
A2 will receive 3 voltages corresponding to temperatures, alternating with PWM freq.

Arduino will refresh the LCD with those values at PWM freq.

So that's it. Is it possible? I really don't know.

I think maybe it's better if I draw the circuit by hand and show it to you. But the whole project is really is to measure the rectified current, the voltage over the capacitor and the temperature over the diode bridge. All this three times, one for each phase.

Thank you!

Hi,
I think we need a complete explanation of the application, analog inputs, 3 voltages and PWM sounds a bit strange
Do you have a circuit diagram to show us, a picture of a hand drawn circuit would be fine, in jpg or png.

Thanks Tom...

Here is the circuit.

Thanks, Tom !

Hi,
So you are just monitoring a 3 phase supply?
Rshunt is supposed to do what?
The voltage output will be too high for the arduino AtoD, it can only have a max of 5V, do you will have to use a potential divider.

Thanks... Tom...

I think the key point is if the "N" (neutral) points can/will be joined (without the neutral fuses).
That will give a common ground for the three sources and the Arduino.

Without a common ground it won't be simple.
Leo..

TomGeorge:
Hi,
So you are just monitoring a 3 phase supply?
Rshunt is supposed to do what?
The voltage output will be too high for the arduino AtoD, it can only have a max of 5V, do you will have to use a potential divider.

Thanks... Tom...

I'm supposed to measure the voltage over the shunts (after amplifying with op amp) to measure the output currents (100A DC) on each phase. Is there an easier way? The thing is, I've already bought 4 shunts...

I'll also need the voltages on the capacitors and later the temperatures on the diode bridges.

And yes, about the potential divider, I knew that !

Thanks!

rafael-b:
I'm supposed to measure the voltage over the shunts (after amplifying with op amp) to measure the output currents (100A DC) on each phase. Is there an easier way? The thing is, I've already bought 4 shunts...

I'll also need the voltages on the capacitors and later the temperatures on the diode bridges.

And yes, about the potential divider, I knew that !

Thanks!

Rafael
You could use the circuit I posted for the op-amp setup to measure current , But this all depends like Leo said in post 15 is there a common ground on the circuit ?
If yes then it's simple if no then this makes it harder unless you use an Arduino board per phase, there is away bit then design gets more complicated using an I2C ADC converter for each phase along with digital I2C opto-isolator then you could use one Arduino for the lot.
But this all depends if you have a common ground ????