Go Down

Topic: Alternative to ACS712 (Read 910 times) previous topic - next topic

CawaSD

Hi,

currently I use a Arduino Mega2560 with an ACS712 shield to measure a current. I want to measure a pulse current with +1A (95ms) and -5A (5ms).

The ACS712 has an total error of about 4% (I think this inclused noise as well(?)), which is 0.2A of absolute error for the 5A module. And this gives me a much noise in the top or bottom part of the pulse which should in theory be a straight line.
I tried a pre scale factor from 16 to 128 and nothing really changed.
Also the ACS712 only uses an output voltage of 1.5V to 3.5V which makes the 10 bit ADC "worse" because it doesn't nearly use the full range of 10 bit.

Alltogether the error is to much, I want the error to be below 1% and hope to get better effects with another kind of sensor.

Is there any other hall-effect sensor that measures more precise and is availible as a kind of shield?

Thank you ver much :)

Koepel

A shunt resistor is accurate, but not isolated from the Arduino.

A hall-effect sensor is never accurate. Even if you buy a good hall-effect current sensor, it will stil be inaccurate. They are noisy and very sensitive to the way the wires are connected, the copper pcb traces, other wires nearby, and so on.

According to the datasheet the rise time of a ACS712 is 5 μs. It should be no problem to read a pulse of 5 ms. I think it is possible to get straight lines for the +1A and -5A.

A total accuracy below is 1% is however not possible with a ACS712. That is already hard to achieve for the Arduino itself.
You could buy a current meter with a interface, and perhaps that interface can be connected to an Arduino.

CawaSD

So I did a little research in shunt resistors. I considered them but never know that there were some kind of "ready to use"-solutions.

I found this one: INA219

If I would replace the 0.1 Ohm resistor with for example a 0.5 Ohm resistor, then I should be able to measure from -6.4A to +6.4A. And this method would even be 12bit ADC instead of 10 ADC.

Altogether this should be a better method to measure the pulse current?

Koepel

#3
Jan 13, 2018, 06:09 pm Last Edit: Jan 13, 2018, 06:17 pm by Koepel
That is a Adafruit module, it is cheaper at the Adafruit website: https://www.adafruit.com/product/904. There are probably webshops in your country that sell Adafruit and Sparkfun modules for normal prices.

The INA219 has a I2C interface. It support HighSpeed I2C mode, but the Arduino Mega 2560 does not. You can get a maximum clock of 400kHz for the SCL clock. It seems to have a continuous reading of the shunt data. Perhaps it is possible to get a few thousand current samples per second. But the Arduino Mega 2560 needs to calculate that data.
Perhaps 4000 samples per second is possible, but I think that 1000 samples per second is more realistic. That means you will have only 5 samples for the 5ms pulse.

During the I2C bus transaction, the Arduino Mega 2560 is waiting until that is finished. It is waiting and doing nothing. That is one of the major disadvantages of the Wire library.

If you are going to use the INA219 module, I suggest to keep the 0.1 ohm shunt resistor. You have enough problems already. A better shunt resistor is something for later.

The Arduino Due or Arduino Zero or Arduino M0 are faster.
One of those boards with a analog signal (shunt resistor with OpAmp) or with a digital shunt-chip with SPI interface is better.

The quickest way to do some tests, is with your Arduino Mega 2560 board, but with a INA169 (analog output) instead of the hall sensor. If that turns out to be a lot better, than you can think of a faster board or digital interface.

You have not told yet if it is okay that the Arduino will be connected to the circuit that you are measuring. The GNDs have to be connected.

Go Up