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

temperature_mcu: add reference_voltage #99

Merged

Conversation

dalegaard
Copy link
Contributor

This allows for boards that don't run their ADC with 3.3V to output accurate MCU temperature readings.

This was originally posted in Klipper3d/klipper#5713 but was rejected by mainline.

The code was written by iKirin of Annex Engineering. With his permission, I've cleaned it up a bit, added a few missing cases and formatted it with Black.

The use case for this is especially rp2040 boards with accurate ADC references. Because of how the Pico board is set up, getting a stable reference is only possible by pulling the reference down to 3.0V. Without this patch, a 3.3V reference is assumed.

This allows for boards that don't run their ADC with 3.3V to output
accurate MCU temperature readings.

Signed-off-by: Peter Stehrer <[email protected]>
@dalegaard dalegaard merged commit 2ceaf5b into DangerKlippers:master Nov 17, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants