Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparent 'stuck bit' in ADC readings #1047

Open
white-ar opened this issue Apr 5, 2025 · 3 comments
Open

Apparent 'stuck bit' in ADC readings #1047

white-ar opened this issue Apr 5, 2025 · 3 comments

Comments

@white-ar
Copy link

white-ar commented Apr 5, 2025

Configuration:
DC voltage into A8
Starting voltage: 0V incrementing in 1.5mV steps.

Between approximately 0.2049V and 0.2197V the ADC reading is 4054 (16 bit resolution) or 252 (12 bit resolution)

Image

The chart above shows the very strange behaviour. Notice the other discontinuities above and below. Sorry for the very poor annotations!

Board firmware version: 4.2.4

Any thought on am mbed interim workaround?

Many thanks

@white-ar
Copy link
Author

white-ar commented Apr 6, 2025

An additional measurement. Voltage on pin A8 measured using Brymen BM869s (high resolution DVM).
Arduino readings from pin A8 taken as an average of 100 readings taken with 5ms between them.
Readings taken 5 seconds after the voltage changes - to allow the ADC to settle.

Image

Image

@white-ar
Copy link
Author

white-ar commented Apr 6, 2025

Reading the same voltage scan via mbed directly, using: AnalogIn ain(PC_2C); (I'm not an mbed expert, but this seems to work). The averaged ain reading is: ain * 10000
gives:

Image

@white-ar
Copy link
Author

white-ar commented Apr 6, 2025

Perhaps this issue is related to the STM32 ADC calibration see https://community.st.com/t5/stm32-mcus-boards-and-hardware/possible-adc1-differential-linearity-error-issue-on-nucleo/m-p/619855

Not sure how this relates to the Arduino environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant