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] 100k (#1) thermistors read too low at lower ambient temperatures (compared to 2.0.x) #25320

Closed
1 task done
lantren opened this issue Jan 30, 2023 · 12 comments
Closed
1 task done

Comments

@lantren
Copy link

lantren commented Jan 30, 2023

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

Yes, and the problem still exists.

Bug Description

On my BTT SKR mini e3 1.2 board both thermistors read between 12 and 8 degrees colder at room temperature when compared to 2.0.X

The only reason this is an issue for me is that frequently when the ambient temp is between 15-18 c the thermistors read below 5 c , preventing the printer from operating.

I have swapped and replaced both thermistors , no change in behavior.

Bug Timeline

This is a new issue with 2.1.x

Expected behavior

When ambient temp is ~ 16 c. The thermistor is expected to read > 5 c
Archive 2.zip

Actual behavior

Thermistor actually reads < 5 c. Preventing the printer from operating with 5 c low temp cut off.

Steps to Reproduce

Flash firmware to 2.0.x, observe reported temperatures @ ~ 16c ambient
Flash firmware to 2.1.x , observe reported temperatures @ ~ 16c ambient

Version of Marlin Firmware

Marlin 2.1.2 and 2.1.x

Printer model

Creality Ender 3

Electronics

BTT SKR Mini e3 1.2

Add-ons

No response

Bed Leveling

ABL Bilinear mesh

Your Slicer

Cura

Host Software

OctoPrint

Don't forget to include

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

Additional information & file uploads

I've reviewed thermistor_1.h and there seems to be no change between 2.0.x and 2.1.x.
I first noticed this behavior with 2.1.x and then rolled back to 2.1.2 as a test.

@ellensp
Copy link
Contributor

ellensp commented Feb 2, 2023

I don't have this exact board I have a BOARD_BTT_SKR_MINI_E3_V2_0 uses same MPU, same build environment STM32F103RC_btt even the TEMP_0_PIN is the same PA0, and both have a 4.7K pull up on the input.

Background data

From thermistor table 1

format: adc value, temperature
{ OV( 977), 25 },
{ OV( 985), 20 },
{ OV( 993), 15 },
{ OV( 999), 10 },

After doing some math this equates to the following resistance values. (rounded to nearest whole number)

25c = 97700 ohm
20c = 118705 ohm
15c = 150552 ohm
10c = 187812 ohm

I used real resistors as a test, a variable resistor pcb with jumpers to change resistance.
I also enabled SHOW_TEMP_ADC_VALUES

I set each resistance and sent the controller a M105 to ask it the temperature and the adc value

Resuts:
Expecting 25c
T:24.62 /0.00 (3910.44) 10 bit adc 977.61
Expecting 20c
T:19.70 /0.00 (3941.94) 10 bit adc 985.485
Expecting 15c
T:14.64 /0.00 (3973.75) 10 bit adc 993.4375
Expecting 10c
T:9.61 /0.00 (3997.56) 10 bit adc 999.39

The numbers in brackets are for a 12bit dac (0-4095) average values. So we divide by 4 to get back to 10 bit dac (0-1023) numbers we can compare with the thermistor table.

The temperatures are a little low by 0.4c, this is probably due to my cheap resistor box.

To me everything works as expected. I can find no issue with thermistor 1 in current bugfix 2.1.x

@lantren
Copy link
Author

lantren commented Feb 2, 2023

It's strange that your efforts failed to identify the issue I'm experiencing.

These are my actual readings with the current 2.1.x @ ~ 15c ambient

Recv: T:7.50 /0.00 (4006.00) B:5.50 /0.00 (4014.00) @:0 B@:0
Recv: T:6.50 /0.00 (4010.00) B:3.75 /0.00 (4020.00) @:0 B@:0
Recv: T:8.00 /0.00 (4004.00) B:4.37 /0.00 (4018.00) @:0 B@:0
Recv: T:6.50 /0.00 (4010.00) B:6.50 /0.00 (4010.00) @:0 B@:0
Recv: T:7.00 /0.00 (4008.00) B:5.50 /0.00 (4014.00) @:0 B@:0
Recv: T:7.50 /0.00 (4006.00) B:7.50 /0.00 (4006.00) @:0 B@:0
Recv: T:7.50 /0.00 (4006.00) B:4.37 /0.00 (4018.00) @:0 B@:0
Recv: T:7.50 /0.00 (4006.00) B:2.50 /0.00 (4024.00) @:0 B@:0

Literally 45 seconds later, after re-flashing to 2.0.x

Recv: T:15.63 /0.00 (992.00) B:15.00 /0.00 (993.00) @:0 B@:0
Recv: T:15.63 /0.00 (992.00) B:15.63 /0.00 (992.00) @:0 B@:0
Recv: T:15.63 /0.00 (992.00) B:15.31 /0.00 (992.50) @:0 B@:0
Recv: T:15.63 /0.00 (992.00) B:15.63 /0.00 (992.00) @:0 B@:0
Recv: T:15.00 /0.00 (993.00) B:15.31 /0.00 (992.50) @:0 B@:0
Recv: T:15.31 /0.00 (992.50) B:15.63 /0.00 (992.00) @:0 B@:0
Recv: T:15.63 /0.00 (992.00) B:15.31 /0.00 (992.50) @:0 B@:0
Recv: T:15.63 /0.00 (992.00) B:15.00 /0.00 (993.00) @:0 B@:0

This is with no changes other than firmware. The same thermistors and environmental conditions in both samples.

It's also interesting to note the ADC values are reported differently. The reported values in 2.0.x are table equivalent.

@ellensp
Copy link
Contributor

ellensp commented Feb 2, 2023

There are several build environments for this Controller

env:STM32F103RC_btt
env:STM32F103RC_btt_USB
env:STM32F103RC_btt_maple
env:STM32F103RC_btt_USB_maple

What one are you using?

@lantren
Copy link
Author

lantren commented Feb 2, 2023

STM32F103RC_btt in both cases.

@ellensp
Copy link
Contributor

ellensp commented Feb 2, 2023

Could you do me a test...

update motherboard to #define MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V2_0

build 2.1.x and attach the fimrware.bin, ill see if your build failes on my hardware. (tomorrow)

@lantren
Copy link
Author

lantren commented Feb 2, 2023

Sure Thing

for kicks I also included the terminal output.
Processing STM32F103RC_btt (board: genericSTM32F10.zip
firmware.bin.zip

@ellensp
Copy link
Contributor

ellensp commented Feb 4, 2023

Using your fimware.bin on my controller.
M115

FIRMWARE_NAME:Marlin bugfix-2.1.x (Feb 2 2023 12:15:04) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender-3 EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff

Confirming flash happened, (build date changed and was renamed firmware.cur on sdcard)

M105 (Using my resistors set to 10c (nothing plugged into the bed) )

ok T:9.56 /0.00 (3997.75) B:-15.00 /0.00 (4095.00) @:0 B@:0

M105 (Using my resistors set to 15c (nothing plugged into the bed))

ok T:14.52 /0.00 (3974.31) B:-15.00 /0.00 (4095.00) @:0 B@:0

I cannot replicate on my controller.

@lantren
Copy link
Author

lantren commented Feb 4, 2023

Interesting. Then it must be something specific to the 1.2 board that doesn't occur on the 2.0 board

@lantren
Copy link
Author

lantren commented Feb 16, 2023

If anyone else comes looking for a workaround for this or similar.
Configuration_adv.h contains this in /*** High Temperature Thermistor Support

//#define PREHEAT_TIME_HOTEND_MS 0
//#define PREHEAT_TIME_BED_MS 0

In my case an 10000ms bed preheat has been enough to raise the bed reading to over 5c in 15c ambient.

@github-actions
Copy link

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

@thisiskeithb
Copy link
Member

To follow-up to this: I just flashed an SKR Mini E3 V1.2 with the latest bugfix-2.0.x (70c5bca) & bugfix-2.1.x (f9db5ab) and the bed & hotend thermistors show the same temps of 20C/21C in both versions of Marlin.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants