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

Thermistor accuracy issue. #19

Open
HoverClub opened this issue Mar 13, 2022 · 12 comments
Open

Thermistor accuracy issue. #19

HoverClub opened this issue Mar 13, 2022 · 12 comments

Comments

@HoverClub
Copy link

See #7 (comment)

Looks like this board uses a 2.5V zener diode as the ADC reference voltage (VDDA measured at 2.5/2.51v on the unconnected TH1/2 pins on a couple of boards). Hard to be certain as there doesn't appear to be a parts list available for this board. However, changing the scaling value to 2500.0 instead of 2600.0 (see link) seems to give more accurate results as you'd expect.

@DaPeace
Copy link

DaPeace commented Mar 16, 2022

@HoverClub is it possible that this accuracy-issue can cause thermal runaways? Before when i enabled my part-fan the temperatur was suddenly floating up and down a lot. It wasnt even possible to print a benchy. After around a half of the boat the printer stopped because of thermal runaways and the temperature-curve was very spicky.

@HoverClub
Copy link
Author

It depends on which Marlin repo you built from. The official Marlin one uses the "standard" ESP32 3300.0 divisor (MarlinFirmware/Marlin#23903 (comment) to fix) and will immediately stop due to non-existent thermal runaway, This repo build uses 2600.0 which reads the temperature as higher than it actually is. I don't know the specification of the components used on the TinyBee circuit so it's difficult to be certain that 2500 is the correct/best value.

You can measure the actual voltage on an unconnected thermistor pin on your, warmed up, board and use that value (x1000 obv.) if you want better accuracy.

If it's drifting up and down then there is probably a supply/grounding/noise issue to the thermistor (thermistor ground should connect directly to the TinyBee board and nowhere else and the USB power link removed) - both my boards are pretty steady temp-wise.

@DaPeace
Copy link

DaPeace commented Mar 16, 2022

Ive first used the mks-repo with the value HAL_adc_result = mv * 1023.0 / 2570.0;
With this settings i got really ugly print-results (big blobs in the parts) and the thermal runaway.
Now ive changed that divider to 2630 because 2570 gave me 13degree celsius in 25degree environment and 2630 was fine.
I will try out and if i still get problems with the tinybee i will use another cable to the termistor.

@HoverClub
Copy link
Author

It's not very accurate at low temps - mine under reads about 8C at room temp - at "working" temps (>180C) it's around 5C under-reading (compared to a thermocouple on the nozzle - which will be hotter on my head type) so not too bad. Accuracy is more important at work temps than ambient. I suspect it's an accumulation of tolerances (Zener diode - typically 5%, thermistor divider resistor - 1%?, thermistor - 0.5% linearity, etc.) but I need to look at the ADC code to see if there are any other issues (and, it'd be good if MKS publish a parts list so that component types & tolerances could be ascertained!).

@DaPeace
Copy link

DaPeace commented Mar 18, 2022

After changing to the new divider i printed a bit but now i have those thermal problems again and dont know where they come from.
The printer trys to stabilize the temp all the time as you can see in the picture. After changing the temp to 200° its heating up and running stable again. This time the cooling fan is disabled so this should not be a reason.

thermal_runaway

@HoverClub
Copy link
Author

HoverClub commented Mar 18, 2022

Looks like a PID issue to me - a slow overshoot oscillation. Have you tried the PID autotune M303 (you should check it if changing the divisor number as it modifies the sensitivity a little).

@DaPeace
Copy link

DaPeace commented Mar 19, 2022

I tried to autotune again but i still have those problems. Ive also tried to switch the inputs and outputs to the secondary ports and ive changed the cable to the termistor to a shielded one and its still not save to print. Only thing ive not done yet is to install a new termistor but I think i will try that before buying an other mainboard..

@HoverClub
Copy link
Author

I assume the trace shows the initial stabilised heat up on the left? If so, it's suspicious that the instability only starts when you print AND that the bed temp is also oscillating. Could it be a power supply issue (supply drooping when the additional stepper load is applied) or noise from the stepper drives. Might be worth putting an oscilloscope on an unconnected thermistor pin (they all use the same ref voltage) and watch what the 2.5V reference voltage is doing (oscillation looks slow enough that a multimeter would probably also work).

@DaPeace
Copy link

DaPeace commented Mar 19, 2022

As you can see in the trace, the printer is running already for 15-20min and then it starts to oscillate and when changing the temperature it also restabilizes again for a while. I will swap the powersupply to test it out. Maybe that is the reason..

@DaPeace
Copy link

DaPeace commented Mar 20, 2022

After changing the Powersupply the printer printed for 4 hours without any issue. Maybe the PSU already had any damage.

@countcobolt
Copy link

Hey guys, I appear to be struggling from a similar thing, but on the bed. When I use a value of 2500, my pid remains more stable, but the bed is underreporting the temp. it should be around 22 and only shows 13. The nozzle is more stable than when using 2600 as a value. Is there another way around it? I am using an original CR10 12V psu, which worked fine on my other board.
Any clues welcome!
Steve

@3DSmitty
Copy link

3DSmitty commented Jun 21, 2022

Same issue here. I am using a AC Mains Power hot bed and a type 11 thermistor. I just built Marlin 2.1 in which you can now define ADC_REFERENCE_VOLTAGE in your pins file. The default is set to 2.5V. As soon as I turn on the bed the printer errors and halts. If I change it to 2.6V it works but the temp bounces plus or minus 5 degrees and does not become stable. I do not have PID auto tune enabled for the bed at this point as I was not sure if it can be done with a SSR and AC bed. All the docs I found do not mention PID auto tune and AC beds.

aleung added a commit to aleung/Marlin that referenced this issue Jun 26, 2022
The temperature reading is too low  when ref set to 2.5V

makerbase-mks/MKS-TinyBee#19
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

4 participants