From f6eaca6fcdd31d1d1ada67a7b3e3e15135e224f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Olaiz?= Date: Fri, 28 Mar 2025 00:18:08 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20MKS=5FTINYBEE=20ADC=20reference?= =?UTF-8?q?=20voltage=20warning=20(#27755)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Warnings.cpp | 7 +++++++ Marlin/src/pins/esp32/pins_MKS_TINYBEE.h | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index 7c107220af..70a6905d9f 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -898,6 +898,13 @@ #warning "The (-1) AD595 Thermocouple Amplifier requires 5V input supply! Use AD8495 for 3.3V ADC." #endif +/** + * MKS_TINYBEE Analog Reference + */ +#if ENABLED(EMIT_ADC_REFERENCE_VOLTAGE_WARNING) + #warning "Check your ADC_REFERENCE_VOLTAGE on MKS TinyBee! Measure the Analog Reference voltage on the board. See pins_MKS_TINYBEE.h for details." +#endif + /** * No PWM on the Piezo Beeper? */ diff --git a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 6b5411e09d..11f18f4496 100644 --- a/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -115,10 +115,21 @@ //#define CONTROLLER_FAN_PIN 148 // FAN2 //#define E0_AUTO_FAN_PIN 148 // FAN2 -// -// ADC Reference Voltage -// -#define ADC_REFERENCE_VOLTAGE 2.565 // 2.5V reference VDDA +/** + * ADC Reference Voltage + * + * In some boards the voltage reference is a bit off due to low quality + * components. That is enough to throw off the ADC readings and thus the + * temperatures by more than 10°C in some cases. If you experience that + * problem, measure the reference voltage (VDDA) at the 2nd pin of + * TH1/TH2 (with the sensors disconnected) and set ADC_REFERENCE_VOLTAGE + * in your config. + */ + +#ifndef ADC_REFERENCE_VOLTAGE + #define EMIT_ADC_REFERENCE_VOLTAGE_WARNING + #define ADC_REFERENCE_VOLTAGE 2.565 +#endif /** * ------ ------