Page 1 of 2

Need Help with the ACS 756 50A Current Sensor

PostPosted: Fri Oct 12, 2018 12:15 pm
by aeman7694
Hello, I don't understand how the 50A current sensor is connected to measure the DC current. How is the current sensor is connected to the battery and does a load is needed?

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Fri Oct 12, 2018 3:11 pm
by ZaM
Hi,
You can refer to attachment. Don't forget to give supply to your Arduino board as in this picture no Arduino power supply.
This board is function by using Arduino analog read (analog value), then we need to do some math function to calculate what is the actual current value. To measure current, load is needed.


acs.jpg

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Fri Oct 12, 2018 10:13 pm
by aeman7694
i see, thank you
:mrgreen: :D :D :D

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Tue Oct 16, 2018 4:51 pm
by aeman7694
Hello, i need some help about the coding for the ACS756 50A Current sensor. I have assembled the sensor according to the given schematics. But, when i upload the coding that i made to measure the current, the measurement given is not accurate:
Here is the coding that i made and please tell me where did i go wrong:

/*
ACS756 Current Measurement
*/

int mVperAmp = 40;



int ACSoffset = 2500;



int RawValue= 0;
double Voltage = 0;
double Amps = 0;

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

void loop(){

RawValue = analogRead(analogIn);
Voltage = (RawValue / 1024.0) * 5000; // Gets you mV
Amps = ((Voltage - ACSoffset) / mVperAmp);

}

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Fri Oct 19, 2018 2:09 pm
by Idris
Hi aeman7694,

Could you share how do you find out that your reading is not accurate?
How do you compare your reading with the accurate one?

Thanks.

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Sun Oct 21, 2018 5:55 pm
by aeman7694
When i make a comparison between the reading from the sensor using the code that i made and multimeter and the current value at the power supply, there is difference in the reading. For example, the power supply shows 0.7 A dc current and the multimeter connected also shows the same value of 0.7 A but the reading at the serial monitor of arduino is not the same, where it reads 0.2 A.

As I understand, the sensor will read the current of the power supply or am i wrong about that?

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Tue Oct 23, 2018 10:22 am
by ZaM
Current reading is depends on your connection. as long as the connection in series, the reading should be same.
You can place your multimeter connected directly with ACS sensor to read the actual current value.

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Tue Oct 23, 2018 10:03 pm
by aeman7694
[/attachment]
ZaM WROTE:Current reading is depends on your connection. as long as the connection in series, the reading should be same.You can place your multimeter connected directly with ACS sensor to read the actual current value.



I already made the connection based on the given diagram for the ACS 756 sensor connection and connect the multimeter directlyto the sensor. The current reading on the multimeter is same as the one shown on the power supply but the serial monitor for the sensor does not show the same value. the coding that i used for this sensor is

RawValue = analogRead(analogIn);
Voltage = (RawValue / 1024.0) * 5000; // Gets you mV
Amps = ((Voltage - ACSoffset) / mVperAmp);
if (Amps < 0){
Amps = 0;

Is there any issues with the code?

And this is how i connect the ACS756 sensor to measure the current from the dc power supply:


IMG_20181023_221324.jpg
Connection for the ACS 756

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Thu Oct 25, 2018 5:42 pm
by ober
Can you measure the 5V of Arduino board? The exact voltage of 5V pin. It might not be exactly 5V, it might be higher, or lower. Can you share that information?

This is because if the voltage is not exactly 5V, then your formula cannot use 5000 for multiplication to get milliVolt.

And that voltage will also affect the ACoffset, because according to datasheet, the 0A is VCC/2, but in code, we assume is 2.5V.

And there is also noise of 10mV :)

So try to consider this and put in the code .

Re: Need Help with the ACS 756 50A Current Sensor

PostPosted: Sun Oct 28, 2018 12:42 am
by aeman7694
ober WROTE:Can you measure the 5V of Arduino board? The exact voltage of 5V pin. It might not be exactly 5V, it might be higher, or lower. Can you share that information?

This is because if the voltage is not exactly 5V, then your formula cannot use 5000 for multiplication to get milliVolt.

And that voltage will also affect the ACoffset, because according to datasheet, the 0A is VCC/2, but in code, we assume is 2.5V.

And there is also noise of 10mV :)

So try to consider this and put in the code .



Hello, I already try your suggestion. I measure the exact voltage at the 5V pin and get a reading of 4.9V. So, I make the following changes to the coding where i change 5000 to 4900 and the ACSoffset from 2500 to 2450. I also include the noise of 10 mV as per your suggestion. But I still does not get any proper reading where the provided current reads 0.7 A but it gives 0.0 A instead. Does this means that the current sensor is faulty?