Hi to everyone. For a university Lab course i have to realize a UPS unit with a internal LiPo battery that i have to charge with a buck converter. I have tried to realize the software that control the charging operation and it works properly.
Few days after i verify that the code works properly i found a problem with the voltage that i measured with arduino, they floats and so the battery charger can't work properly since it can't keep the voltage constant during the constant voltage phase of the battery charging process.
I found that it happens when plug arduino into the USB port of the computer after i have started the PC, while it doesn't happen when i plug the USB cable of arduino and then start the PC. It seems to be a problem with the ground of arduino.
I'm using one arduino, on which i have upload the code of the UPS battery charger, and a second arduino to verify the output of the UPS unit (output of the internal inverter). I verify that the problem is not connected to the Inverter or other component of the UPS since i try the battery charger alone and i can still have the voltage floating of the analog pin from which i read the voltage of the battery and the voltage of the network (output of a AC/DC converter that we simulate with a 4AA battery pack).
Why this problem happens??