Quick fix for an ADC issue on Raspberry Pi Pico

preview_player
Показать описание
After encountering a slight issue with the analog read values at full voltage when testing out the raspberry pi pico boards I thought I would share the quick and easy fix I came up with in case other people are encountering the same problem.
Рекомендации по теме
Комментарии
Автор

It's pretty clear that the bug can be found at 6:49 of the video.

ericbwertz
Автор

6:48 A fly has invaded the video, kill it! KILL IT!! 😂

bluegizmo
Автор

2:05 Most chips can handle vcc+0.5v(or something like that) max on there IO pins, so if you power the uC with 5v you can max have 5.5v, but if you power the uC with 3.3v you can have a max of 3.8v on you IO pins, etc. So nothing out of the ordinary with the pico.

PeetHobby
Автор

Wonder if this is why there's a 2nd revision.

Marc_Wolfe
Автор

Try this again pull gp23 high as output ( this pin not is exposed but connected to the switcing reg). Add 2x 10nF and use vcc by tieing it to avcc. That will take care of the drift and stabilize it alot more. If you want better result use vbus with a linear regulator and tie the 3.3v to avcc instead of the vcc.

naasikhendricks
Автор

I actually hadn't noticed this voltage range issue, but possibly because I use a resistor between the wiper of the pot and the ADC pin, in case I accidentally load a sketch that uses the pin as an output - which could cause damage to the chip, if the pot is turned fully to either end.

The substitute problem I get is that I don't quite get full scale readings, with the resistor there, so I have to calibrate for it.

More to the point, the ADCs in the Pi Pico have a severe flaw, which is now documented in the datasheet as Erratum E11 - they're far from linear, with some wild readings, especially at certain values.

The datasheet now estimates 8.5 useful bits of precision but gives no clue how to even get that much out of them.

If you read an ADC and use the value to choose an audio frequency, e.g. with tone(), you'll here how bad it is. If you're just doing something were it chooses which LED to light, you probably won't notice, but really, it will be flickering between different values.

TooSlowTube
Автор

Is it possible to add external ADC like ads1115?

tanmayfuse