Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

DC Current Measurement using Shunt Resistor

May 13, 2016Arduino Tutorialsammeter, arduino, code, dc current, measurement,


resistor, shunt, voltage

Designing of Digital Ammeter is basically a process of converting a voltmeter into


Ammeter. We know that V=I x R. From this we can say that Voltage drop across
resistor (shunt) is directly proportional to the current (V = I). In ammeter this
resistance is called Shunt. Shunt resistance have very small value and it will not
affect the load voltage. Most commonly 75mV shunts are available in market. Or you
can use low value resistance.
What you will learn?

Where to connect shunt resistor to measure DC current?


What is shunt resistor?
Why it is having small value?
How arduino can be used to measure current using shunt resistor?
How to design amplifier circuit for shunt voltage?

DC Current Measurement using Shunt Resistor Circuit


Current measurement using shunt resistor
DC Current measurement circuit using shunt resistor

In this example we are measuring 50Amp current using 75mV shunt (Rsense). Shunt
gives 75mV voltage across it when we pass the current of 50Amp. Arduino takes 5V as
input for ADC, so the differential amplifier will convert 75mV to 5V.
Calculations for 50Amps 75mV Shunt
Vo is voltage given at ADC (A0) i.e. 5V
Rin = R1 = R3
Rf = R2 = R4
Vin = 75mV
Vo = Vin * (RF/Rin)

Where:
Vin = 75mV
Vo = 5V

Assume Rin=1K (You can assume Rin in the range of 1K to 50K)


Find Rin=?
Rin=R1=R3 = 66.66K
Rf=R2=R4 = 1K
You can use standard resistor and do reverse calculations in Arduino code
Components Required

25Amps/75mVolts Shunt Resistor


Arduino Uno
Connecting Wires
OpAmp OP07
66.66K, 1K Resistors

Arduino Code for DC Current Measurement using Shunt Resistor

/*
DC Current Measurement Using Shunt - www.circuits4you.com
Reads an analog input on pin 0, converts it to current, and prints the result to
the serial monitor.
*/
const float ShuntAmps = 50; //Enter the shunt maximum current
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}

// the loop routine runs over and over again forever:


void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);

// Convert the analog reading (which goes from 0 - 1023) to a Current (0 - 50):
float current = sensorValue * (ShuntAmps / 1024.0);

// print out the value you read:


Serial.print("Current:");
Serial.print(current);
Serial.println(" Amps");
delay(1000);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

/*
DC Current Measurement Using Shunt - www.circuits4you.com
Reads an analog input on pin 0, converts it to current, and prints the result to
the serial monitor.
*/
const float ShuntAmps = 50; //Enter the shunt maximum current

// the setup routine runs once when you press reset:


void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);

// Convert the analog reading (which goes from 0 - 1023) to a Current (0 - 50):
float current = sensorValue * (ShuntAmps / 1024.0);

// print out the value you read:


Serial.print("Current:");
Serial.print(current);
Serial.println(" Amps");
delay(1000);
}

Result of DC Current Measurement using Shunt Resistor

Open serial monitor and observe the current reading.


DC Current measurement result
DC Current measurement result

You might also like