So I have read several post about having the USB port connected to the computer while having an external power source through the jack connector and it seems it should be no problem. However I am a bit confused and dont know if the automatic selection of the power source is operating correctly. I am working on measuring voltage and current (up to 36V and 15 amps) so I want to have the arduino powered from external source to avoid having any problem with the common ground and the computer. But i need the serial monitor to debug. While I was checking if the voltage and current readings were ok I noticed they were not accurate and found out that the reference voltage is different if I power the arduino board via USB, 9V battery or both at the same time.
This are the voltages at 5V output:
- with 9V battery in the barrel jack : 4.971V -with USB connection : 5.079V -with USB + 9V battery: 5.064 V
I would expect that anytime the external source is connected the 5V output is the same, since it is the output of the 5V regulator, but according to the measurements that is not the case so that makes me wonder if power is coming from the external source when both (usb + battery) are connected.
Im using a UNO R3 board from elegoo, not sure if that changes anything though.
Additional question, is it possible for the arduino to know what is the 5V output voltage while running so measurements could be adjusted on the go?
thanks in advance