Raspberry pi PICO ADC reading notes

Raspberry pi PICO ADC reading

Ask Question

Asked 2 days ago

Modified 2 days ago

Viewed 20 times


Why not get zero when taking ADC readings on Raspberry Pi Pico? Even though I ground the ADC pin, the analog reading always fluctuates between 10 to 20. How can analog reading be reduced to zero?




asked 2 days ago

user avatar


1133 bronze badges

  • Please share your code showing how you read the ADC. Note that it is a 12-bit ADC with 4096 quantisation levels, so a reading of 20 corresponds to just 0.5% noise. – Mark Setchell 2 days ago
  • Perhaps you can try the demo code in the following tutorial, and I can repeat your experiment and see if I get the same results as yours: how2electronics.com/…. – tlfong01 9 hours ago   
  • And a couple of troubleshooting suggestions: (1) Swapping technique: Pico has 4 ADC pins. You can swap the pin a see if all pins have the same error/tolerance levels. If all pins have move or less random error margins, say 1% of max analog signal value, then the might be the spec and you cannot change tha.t. (2) Pico has the Analog reference pin. If you use a low max/ reference signal level, say 1.8/2.0V, then if error rate is still 1% of max, you can have relevative lower error spec.round, then you would have less noise noice releated to power/mains ground noise, / to continue, … – tlfong01 5 hours ago  
  • / continued, … (3) Pico has a specific “Analog ground pin”, which you should use specifically for analog signal ground (also avoid, messing with power ground). (4) If your anslogue signal to measure is stable, low frequency, then you can use a low frequency filter to filter high frequency noise. (4) Avoid using long wiring/cables to reduce picking up surrounding noise. (5) use double shielded, pseudo differential pair wiring/cables twisted pair cables, … – tlfong01 5 hours ago   
  • Now let us use the following picture as a reference, focusing on the ADC pins in pink, and write a program to calibrate the Pico ADC performance: imgur.com/a/0oU6DOb – tlfong01 27 mins ago   
  • The How2Tlectronics tutorialha a good newbie explanation on how to do the programming: Raspberry Pi Pico Complete Guide| Pinout + Features + ADC Tutorial (08:56) + I2C + OLED + Internal Temperature Sensor + DHT11: youtube.com/watch?v=oaM80GyVIwA&t=2s. – tlfong01 12 mins ago  
  • The video tutorial part, starting from 08:56, actually points out why the ADC conversion results for 0V is not 0, but 200+. Perhaps we should do some modification to the program, as requested by the OP, to make the output range from 0 to 4096, instead of 200+ to 65536. – tlfong01 2 mins ago   Edit  

Add a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.