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

[BUG] Wrong temperature readings on MKS TinyBee boards (reference diode varies between boards) #27434

Open
1 task done
fermino opened this issue Sep 22, 2024 · 0 comments
Open
1 task done

Comments

@fermino
Copy link

fermino commented Sep 22, 2024

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

I got an MKS TinyBee a couple of days ago and I ran into this issue (#24142) when setting up the temperature sensors.
There is a related fix (#24432), but it doesn't fix it for every board.

In the tinybee there is a zener diode that along with a resistor and a couple capacitor provides the analog reference for the ESP32's ADC. For what I have tested, it seems that the quality of the zener diode varies quite a bit between boards. The nominal value is 2.5V, the fix changed it in the config to 2.565V.
I measured the reference with no load (no thermistors connected) and in my board it is 2.642V. Although it is a small difference it throws completely off the temperature measurements (by around 30C).

There's no easy fix, as changing it to my read value would throw it off for other users. The actual solution would be to change the zener in the board for a better part, or just hack together a better voltage reference (as it also seems to vary quite a bit throughout time). That is likely out of what most users would do, so I think I think it would be good to document it somewhere. Maybe a warning to suggest BOARD_MKS_TINYBEE's users to measure the reference adjust ADC_REFERENCE_VOLTAGE appropiately? It feels like this is something that should be in Configuration_adv.h, though.

I'm willing to make the appropiate patches, but I think it deserves some though.
Kind regards, and thanks for all the work put in this awesome project :)

Bug Timeline

It is an old issue with a known cause

Expected behavior

I expect the temperature readings to be accurate.

Actual behavior

The readings are thrown off by around 30C.

Steps to Reproduce

  1. Use the bugfix-2.1.x branch.
  2. Measure the pins of any temperature sensor with NO sensors connected. Negative probe to ground. One pin should be ground and the other should be around 2.5V.
  3. If the reading for the second pin is 2.565V or similar, the issue will not appear. If it is off by >0.1V, the issue will appear as a distorted temperature reading.
  4. Change ADC_REFERENCE_VOLTAGE to the measured voltage in pins_MKS_TINYBEE.h. The issue should be gone.

Version of Marlin Firmware

bugfix-2.1.x

Printer model

Anet A6

Electronics

MKS TinyBee, 4x TMC2209 drivers

LCD/Controller

None

Other add-ons

None

Bed Leveling

None

Your Slicer

None

Host Software

Pronterface

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

No response

@fermino fermino changed the title [BUG] (Wrong temperature on MKS TinyBee boards) [BUG] Wrong temperature readings on MKS TinyBee boards (reference diode varies between boards) Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant