ACS 712 calibration
ajit.nayak87
Posts: 76
Dear all,
I am trying to measure the current through 2 fans. Here i am attaching my code and I need to know how can i calibrate it.
I am using below 2 fans
http://www.mouser.in/ProductDetail/ADDA/AD0612HX-A71GL-LF/?qs=hTx6WCxFMbgcZc/FmemT9A==
http://www.mouser.in/ProductDetail/ADDA/AD0812XB-A73GL-LF/?qs=PieNiMrGZlqvWjV0xsttzA==
Using arduino UNo board for programming.
Results
I am trying to measure the current through 2 fans. Here i am attaching my code and I need to know how can i calibrate it.
I am using below 2 fans
http://www.mouser.in/ProductDetail/ADDA/AD0612HX-A71GL-LF/?qs=hTx6WCxFMbgcZc/FmemT9A==
http://www.mouser.in/ProductDetail/ADDA/AD0812XB-A73GL-LF/?qs=PieNiMrGZlqvWjV0xsttzA==
Using arduino UNo board for programming.
[COLOR=#000000][FONT=monospace]void CS_Output()[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]{[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] float average = 0;[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] for(int i = 0; i < 1000; i++) {[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] average = average + (.0264 * analogRead(A0) -13.51) / 1000;[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] delay(1);[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] }[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] Serial.print("before calibration:");[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] Serial.println(average);[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] average=average+0.07;[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] Serial.print("after calibration:");[/FONT][/COLOR] [COLOR=#000000][FONT=monospace] Serial.println(average); [/FONT][/COLOR] [COLOR=#000000][FONT=monospace]}[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]void setup() {[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]Serial.begin(9600);[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]}[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]void loop()[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]{[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]CS_Output();[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]delay(1000);[/FONT][/COLOR] [COLOR=#000000][FONT=monospace]}[/FONT][/COLOR]
Results
Let know how can offset value to meet exact or close to actual_DC load current showing valueslno fans Actual_dc load Before_conversion after_ conversion
1 AD0612HX 0.15A 0.09a 0.15A
2 ADO812XB 0.40A 0.25A 0.32A
3 WHEN COMBINE 0.52A 0.35A 0.42A
Comments
To calibrate you would normally take a batch of readings at start up, and store their average, then
subtract from the actual reading:
2) A hall sensor is much noisier than a shunt sensor, but is isolated.