Fluctuating measurements (+-15) with ACS712 current sensor


hi guys,
first of have thank you. i'm pretty new arduino , forum has helped me lot.

but lets go straight problem.

i want measure current , voltage of mobile speaker. voltage measured correcly, current measurement giving me headache.
i'm using acs 712 5a current sensor on arduino nano (china clone). measured value fluctuates way application. seems quite common problem, normaly values spread +-2 or something. did testing , best results got +-10.

there nothing else hooked arduino.


and here of results testing:


you can see 4 different measurements packed 1 diagramm (its not important 1 which). bevor wonder why 512 isn't average, pc somehow outputs around 4v on usb port. can't see pattern in values. jump 15 or down, don't change @ all.

i tried impact following changes have (and made no difference):
-cable length of sensor (20cm , 5cm)
-time between 2 measurements (25ms 250ms)
-premeasurement (measurment thats not used, 2ms delay, measurement thats used, 25ms delay)
-power source (desktop pc / laptop without powersupply hooked up)
-0,1µf capacitors between 3 pins of sensor (i tested every possibility)
-pullup/pulldown resitor on measurement pin
-no current flow through sensor/2a current flow
-different arduino nano
-tieing other analog pins ground
-making lowpass filter out of resistor (1k) , capacitor (0,1µf).
-displaying voltage on lcd screen, have no pc hooked up.

my cheap multimeter says output voltage stable. don't have osciloscope on hand.
i had current sensor bevor, showed same behaviour. acs 711ex (+-15,5a).
i thought smoothing value inside arduino, problem seems fundamental, decided ask help.

here's code did testing with:
code: [select]
const int analogpin = a0; 
int sensorvalue = 0;

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

void loop() {
  sensorvalue = analogread (analogpin);
  serial.print(millis());
  serial.print(" "); 
  serial.println(sensorvalue);
  delay(250);                     
}



is there else these problems? or there same hardware , no problems?

i hope, didn't forget important information.

thank in advance,
leo


ok, got little bit of improvement.
the acs711ex (15,5a) works fine now. didn't change thing...

the acs712 has capacitors on board installed, datasheet recomments. made cf lot higher. think there 1nf capacitor mounted bevor, put in 1000µf 1 (yes, 1000000x original value). fluctuations of +-2 i'm fine with. i've heard, such big capacitor lowers response time.

tomorrow run test audio amplifier load see if accurate results.


Arduino Forum > Using Arduino > Sensors > Fluctuating measurements (+-15) with ACS712 current sensor


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'