DC Current Measurement using Resistor Shunt and OP AMP

Hello friends,

I have a project assignment to measure BTS power meter measurements and here I got trouble when I want to measure DC current using a shunt resistor (75mV for 50A) and OP AMP OP07 . where the current value on the serial monitor does not match results on the clamp meter. I use ACCU and Inverter as LOAD first. Here, I include the circuit and the sketch.

Appreciate any help and tips, thank you!

const float ShuntAmps = 50;

void setup() {
Serial.begin(9600);
}

void loop() {
int sensorValue = analogRead(A1);

float current = sensorValue * (ShuntAmps / 1024.0);
Serial.print("Current:");
Serial.print(current);
Serial.println(" Amps");
delay(1000);
}

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

What are the values of the resistors.
Or.
Do the inputs of the opamp stay within the common mode range of the opamp.
That is about 3volt max on a +5volt opamp supply.
I guess not.

Try using an opamp that is designed for high-side sensing, like the INA167, INA196, INA219, INA 226 and many others.
Leo..

Hi,
What is BTS, ACCU, Inverter?

To add code please click this link;

Can you please add values to your components?

What is your LOAD?
To test and calibrate it should be a LOAD that is constant and resistive.
If you are using a power inverter as a load, then the current will not be constant.

The clamp meter will be measuring average current.
Your code is measuring instantaneous current.
If you average your arduino values, what do you get.

Also in your code;

float current = sensorValue * (ShuntAmps / 1024.0);

edit to;

float current = (float)sensorValue * ShuntAmps / 1024.0;

Tom... :smiley: :+1: :coffee: :australia:

This INA219 module is designed for high side current sensing, and also measures the battery voltage.

Hi, sorry for late response,

What is BTS, ACCU, Inverter?

BTS is A base transceiver station (BTS) is a fixed radio transceiver in any mobile network. The BTS connects mobile devices to the network. It sends and receives radio signals to mobile devices and converts them to digital signals that it passes on the network to route to other terminals in the network or to the Internet.

ACCU ( battery ) is a battery that can be restored to full charge by the application of electrical energy.

and Inverter are also called AC Drives ( LOAD ), or VFD (variable frequency drive). They are electronic devices that can turn DC (Direct Current) to AC (Alternating Current).

Hi,
Did you do the edit I suggested in post#4 ?

Have you looked at the suggestion in post#3 and post#6 ?

Can you please draw a basic diagram of the complete setup?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.