Arduino-Pico-Analog-Correction icon indicating copy to clipboard operation
Arduino-Pico-Analog-Correction copied to clipboard

Unable to reproduce noise reduction using brief power supply toggle to PWM mode

Open kevinjwalters opened this issue 1 year ago • 3 comments

I had a go at a CircuitPython implementation of your C code switching to PWM mode and then back to PFM mode after taking the ADC sample. The results are shown in Instructables: Measuring Small Voltages With Pi Pico ADC and Comparison With Microchip MCP3208 Using Cytron EDU PICO. From Step 12 onwards you can see values where the RP2040 GP27 PFM values are separated out. For my setup and my code it doesn't appear to make any difference. I've attached one of the plots below where the top four don't use the technique and next four do and they all look very very similar.

adc-rp2040-mcp3208-lowvolt-v8-g5

Do you have some testing for this demonstrating noise improvements?

kevinjwalters avatar Oct 04 '24 10:10 kevinjwalters

I have no actual data on this. I just based this on the Pico datasheet (https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf), where in chapter 4.4 they specifically mention PWM mode "which reduces the output ripple considerably at light loads".

However, from some other documentation (https://pico-adc.markomo.me/) it seems like PWM mode can actually introduce more noise, which is very much the opposite of what it's supposed to do.

Interesting to see your actual testing data, so from what I can tell, it makes no noticable difference? Might be worth just removing that pin change for sakes of improving speed...

NuclearPhoenixx avatar Oct 04 '24 16:10 NuclearPhoenixx

It would be interesting to see if the newer Pico 2 does have the same behavior.

NuclearPhoenixx avatar Dec 05 '24 12:12 NuclearPhoenixx

Yep. I have an RP2350B working but it's a Pimoroni PGA2350 board not a Pi Pico 2. I plan to use the eight ADC available on the B version of the chip eventually...

kevinjwalters avatar Dec 05 '24 15:12 kevinjwalters