Hello experts!
I am always grateful for the help I find here, and this is my first time posting a question from Japan. I hope you can lend me your knowledge.
Currently, I use a Raspberry Pi 5 as an MQTT server and have five Pico 2W boards as clients to remotely control press machines in a factory. Everything works fine, but I am a bit concerned about the power supply for each Pico 2W. If possible, I would like to monitor the supply voltage using the ADC and reflect this in my program, without modifying the hardware.
I got this idea from some articles about the regular Pico (not 2W), where people have had success reading the input voltage via ADC. However, when I try to do the same, it doesn't work as expected. I am not sure whether the issue is hardware or software.
For example, reading with ADC(3) does not work. If I use ADC(Pin(29)), I can read a value a few times, but then it settles down to around 0.0002V and stops changing.
I suspect that VSYS is divided by a factor of 1/3 and connected to ADC_VREF, but I am not confident about this. My programming skill is about the level of getting help from Copilot to write MicroPython, so I am not sure if my code is correct either.
If anyone can help me, even with simple advice or troubleshooting steps, I would greatly appreciate it. Thank you for your time!
I am always grateful for the help I find here, and this is my first time posting a question from Japan. I hope you can lend me your knowledge.
Currently, I use a Raspberry Pi 5 as an MQTT server and have five Pico 2W boards as clients to remotely control press machines in a factory. Everything works fine, but I am a bit concerned about the power supply for each Pico 2W. If possible, I would like to monitor the supply voltage using the ADC and reflect this in my program, without modifying the hardware.
I got this idea from some articles about the regular Pico (not 2W), where people have had success reading the input voltage via ADC. However, when I try to do the same, it doesn't work as expected. I am not sure whether the issue is hardware or software.
For example, reading with ADC(3) does not work. If I use ADC(Pin(29)), I can read a value a few times, but then it settles down to around 0.0002V and stops changing.
I suspect that VSYS is divided by a factor of 1/3 and connected to ADC_VREF, but I am not confident about this. My programming skill is about the level of getting help from Copilot to write MicroPython, so I am not sure if my code is correct either.
If anyone can help me, even with simple advice or troubleshooting steps, I would greatly appreciate it. Thank you for your time!
Statistics: Posted by chanken — Mon Jun 16, 2025 1:07 am