Problem with my project (Energy meter)

Hello
I try to build this project for meter the voltage and current of buttery http://www.instructables.com/id/ARDUINO-ENERGY-METER/
I use Lipo buttery 3,7V 12000mAh and ACS 712 Current Sensor
This is my schematic:http://postimg.org/image/6ytfg3wa1/
I use and this code:

 float sample2;
float sample1;
float val;
float actualval;
float amps;
float voltageValue ;

void setup()
{
Serial.begin(9600);
}
void loop() {
for(int i=0;i<150;i++)
{
sample2+=analogRead(A3); //read the current from sensor
sample1+=analogRead(A0); //read the voltage from sensor
delay(2);
}
sample1=sample1/150;
sample2=sample2/150;
//current calculation
val =(5.0*sample2)/1024.0;
actualval =val-2.5; // offset voltage is 2.5v
amps =actualval*10;
Serial.println("Ampere: ");
Serial.print(amps);
Serial.println("");
//voltage calculation
voltageValue = (5.0*sample1)/1024.0;
Serial.println("Voltage: ");
Serial.print(voltageValue);
Serial.println("");
delay(1000);
}

My probem is when i connect the current sensor the voltage is zero but when i disconnect it the voiltage is normal. Why?
This is my results
http://postimg.org/image/i3rksv8rt/
http://postimg.org/image/9owo7slmt/
Thank you :slight_smile:

Suspect you have a wiring error. Its not clear from your circuit what you are trying to measure but current sensors need to go in series with the load. Your circuit shows it connected in parallel.

Thank you rw950431 for your answer! What to use for load?

The load is whatever is using the power in a circuit. For basic experiments you could use an LED or the globe from a torch. The original instructables link you started from doesnt really explain the power wiring at all (and the author admits he blew up his first system in the comments).

See my circuit of a torch showing how to measure current and voltage in a circuit at http://postimg.org/image/vycmc6nnn/

Thank you rw950431 for your help :) I connect it like this: http://postimg.org/image/98xgrm6gj/ Is it correct? The results that i have are: Voltage:3.93V Ampere:0.25A The voltage is correct but i dont know if the ampere is correct.