Problem in hardware

Hello , my name is kimi and i want ask some question

  1. i am using acs712 (current sensor 30A) when i do troubleshooting in hardware using arduino uno my lcd (16x2) show unstable current and sometimes become negative and current not 0 when the input voltage is 0

I combine current sensor and voltage sensor in one supply voltage

here my code ( in simulation there is no problem )

/---------Voltage----------/
temp1=analogRead(VOLT);
volts= (temp15)/1024.0;
Vin = volts / (R2/(R1+R2));
delay(10);
/
---------Current----------/
adcValue = analogRead(CURRENT);
adcVoltage = (adcValue/1024.0)5000;
currentValue = ((adcVoltage - offsetvoltage)/sensitivity);
delay(10);
/
---------Power----------
/
power= (currentValue)* Vin;
delay(10);
/------Display Result------/
lcd.clear();
lcd.setCursor(0,0);
lcd.print(“V:”);
lcd.print(Vin);
lcd.setCursor(0,1);
lcd.print(“C:”);
lcd.print(currentValue);
lcd.setCursor(8,0);
lcd.print(“P:”);
lcd.print(power);
Serial.println(Vin);
Serial.println(currentValue);
Serial.println(power);
delay(125);

Installation & Troubleshooting
For problems with Arduino itself, NOT your project

Your code doesn’t compile.

Please remember to use code tags when posting code.

@ahsanul46

Moved your topic to it's current location as it is more suitable.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

@ahsanul46

As you seem unable to read the links provided for you please take the next 48 hours to do so.

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting has resulted in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.