-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
[FR] ADC tuning regarding the vcc input #18420
Comments
This mostly does not apply to our 3d printers. eg thermistors. Basically a voltage divider. 4.7k fixed with a variable resistor that is the thermistor. let presume that the thermistor is also reading 4.7k to make the math simple So the math becomes Vout = Vin/2 The result in the same temperature reading. |
That's right as long we are measuring resistor relations. |
Additionally to the already provided solution for the AVRs i could find a solution for the STM32s using stm32duino. |
The best exactness could be achieved by handling the Vref-channel like the other ADC-pins, in every loop over the pins. |
Description
ADC needs to be tuned with regards to the input voltage
this feature should be implemented on the core of the marlin, regarding the analogue data reads like temperature sensor reads and so on. As you know Arduino boards does not have a reference voltage pin connected and so the controller will use the Vcc as the V_ref for ADC conversions. this will result in imprecise readings of the analogue input.
there is a video on the you-tube channel "Andreas Spiess" with the following link: https://www.youtube.com/watch?v=UAJMLTzrM9Q
in this link it is explained why the ADC is imprecise on many controllers regarding the reference voltage sampling and a code is suggested for somehow correcting the current ADC result for super precise measurements
please consider this for more accurate temperature readings on all hardware.
Additional Information
Video showing the way ADC work on ESP8266, ESP32 and Arduino micro-controllers as well as external ADC boards
https://www.youtube.com/watch?v=UAJMLTzrM9Q
Video of the code in use for precise ADC measurements
https://www.youtube.com/watch?v=xI_qU2auVx8
Sample code of the previous Video
https://github.com/SensorsIot/ADC_Test/
The text was updated successfully, but these errors were encountered: