ADC3 does not measure the voltage of Vsys. It measures the voltage of Vbus (ie. the voltage at the USB connector).
With the USB disconnected you'd be hoping for a reading close to zero, but apparently there's enough leakage in your setup to give the 3V or so that you are measuring.
You could wire a similar battery measurement circuit to one of the other ADCs, or if the USB connector is definitely not being used you could short Vsys to Vbus and the ADC3 value should come out right. Note however that this pair of resistors (necessary to measure voltages which could be above 3.3V) is consuming precious battery energy and ideally you'd have a more sophisticated circuit that could be turned off except when actually measuring, though it's not huge if you have the Pico working hard. If you plan to have the Pico often in sleep mode to save energy then it becomes maybe more important.
You could also wire your battery to Vbus rather than Vsys (again with USB not to be used), which would work and give you a battery voltage measurement, but would waste battery energy in the voltage drop across the diode that connects Vbus to Vsys.
With the USB disconnected you'd be hoping for a reading close to zero, but apparently there's enough leakage in your setup to give the 3V or so that you are measuring.
You could wire a similar battery measurement circuit to one of the other ADCs, or if the USB connector is definitely not being used you could short Vsys to Vbus and the ADC3 value should come out right. Note however that this pair of resistors (necessary to measure voltages which could be above 3.3V) is consuming precious battery energy and ideally you'd have a more sophisticated circuit that could be turned off except when actually measuring, though it's not huge if you have the Pico working hard. If you plan to have the Pico often in sleep mode to save energy then it becomes maybe more important.
You could also wire your battery to Vbus rather than Vsys (again with USB not to be used), which would work and give you a battery voltage measurement, but would waste battery energy in the voltage drop across the diode that connects Vbus to Vsys.
Statistics: Posted by arg001 — Wed Jan 29, 2025 9:11 am