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

Consider using internal voltage reference #15

Open
Duckle29 opened this issue Sep 21, 2023 · 1 comment
Open

Consider using internal voltage reference #15

Duckle29 opened this issue Sep 21, 2023 · 1 comment

Comments

@Duckle29
Copy link

Quick look through the schematic I noticed your voltage reading assumes a 3.3V ADC reference voltage.
Just be aware that your ADC measurements are then limited to the accuracy of your supply voltage.

You probably don't need any high accuracy ADC measurements, I just recently ran into a problem where I did and I wished I'd prepared my PCB for it instead of having to do a re-spin.

The STM32F103 (and F107) have a built in 1.2V, 100ppm/K. It is however +5% -3% for initial accuracy going with the min/max spec so, meh.
I don't have any experience with how close to the typical 1.2V it usually is.

Alternatively an external vref could be used.

Also, remember to check the errata for the MCU you're using when considering this stuff... Yes I also got burned there :P
(The F103 doesn't seem to have any vref related errata, tho a short blurp about ADC ch0 generating a 10ns 150mV blip in certain usecases)

@Neumi
Copy link
Owner

Neumi commented Sep 22, 2023

Thanks for the tip. I will check for the next hardware version. The ADC is currently only used to detect the raw input voltage (5-30v). I think it is okay to have a drift of a few percent. This is not critical to the operation.

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

2 participants