NuclearPhoenixx / Arduino-Pico-Analog-Correction

📚🪛 Arduino library to calibrate and improve ADC measurements with the Raspberry Pi Pico.
MIT License
19 stars 0 forks source link

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

Open kevinjwalters opened 2 days ago

kevinjwalters commented 2 days ago

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?

NuclearPhoenixx commented 1 day ago

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...