Marlin: [BUG] Can't read TEMP_PROBE_PIN values on defined pin

Created on 30 Sep 2020  ·  12Comments  ·  Source: MarlinFirmware/Marlin

Hi everyone, I have a problem on my MKS Robin Nano V1.2:

I'm using a PINDA V2 probe and I enabled temp compensation, the problem I have is that I can't read the temp value of the probe. I connected the white wire to PC2, the wiring is 100% correct because when I connect the probe to PC0 (instead of bed temp) I can see the values. When connected to PC2 (as declared below) if I connect to pronterface, I have the same identical readings on Bed and Probe like if the pin is the same!

I had to add the #define TEMP_PROBE_PIN to my pins file since is not natively present.

I did like this:

//
// Temperature Sensors
//

define TEMP_0_PIN PC1 // TH1

define TEMP_1_PIN PC2 // TH2

define TEMP_BED_PIN PC0 // TB1

if HOTENDS == 1

#if TEMP_SENSOR_PROBE
#define TEMP_PROBE_PIN TEMP_1_PIN
#elif TEMP_SENSOR_CHAMBER
#define TEMP_CHAMBER_PIN TEMP_1_PIN
#endif

endif

My configuration: https://github.com/Loreagle/Marlin-2.0.7

Thank you!

Confirmed ! Z-Probes Solved

Most helpful comment

Created a PR to fix this for all users of this HAL

All 12 comments

It looks like there is a problem with ADC and probe looks at the same reading as the bed.

image

Seems like PROBE adc is missing from STM32F1 HAL
Give this a try. HAL.zip
Extract HAL.cpp and put in Marlin/src/HAL/STM32F1
Based on bugfix HAL

It doesn't work, it compiles but when flashed I instantly have BED TEMP ERROR at startup with red screen :frowning: BTW Thank you a lot for your work, at least we discovered where the problem is, now we only need to fix it! :smile:

Seems like PROBE adc is missing from STM32F1 HAL
Give this a try. HAL.zip
Extract HAL.cpp and put in Marlin/src/HAL/STM32F1
Based on bugfix HAL

Ok, I missed one place this change was needed.
Try this new version. HAL.zip

image
It seems to work, thank you!!!!! <3

The temperatures seems to float a little but I don't know if it's normal.

Created a PR to fix this for all users of this HAL

I confirm that this works very well and finally I have Probe temp readings. Unfortunately this fix broke my neopixels, before neopixel were working quite well with library 1.2.4, now, after only this fix in HAL, doesn't work anymore as expected. It could be a CPU load problem or something similar?

Unfortunately this fix broke my neopixels

Neopixels aren’t supported on STM32F1 and we have a sanity check for this:

https://github.com/MarlinFirmware/Marlin/blob/e8177735a00d1d7bb20b439544d3324fe01cfe7e/Marlin/src/HAL/STM32F1/inc/SanityCheck.h#L52

I know but using Adafruit library 1.2.4 they works well and was working before so I asked.

That’s precisely why they aren’t supported. They are really finicky on STM32F1-based boards.

Ok thanks, I found that disabling cycle at startup they work 🤷🏻‍♂️ But is something related to timing or what? I found a lot of people that developed fast neopixels libraries for STM32

Solved!

Using this library: https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use like in issue (#18829) it works!!!

Maybe is possible to add it to official marlin only for robin nano board using lib_deps?

Was this page helpful?
0 / 5 - 0 ratings