Using one temperature sensor to control two fans independantly

Basic Information:

Printer Model: Rooted Creality K1C

I’m working through a frustrating issue with my K1C, that after much trial and error I have found what I think could be the problem. This question might get closer to an actual answer.

The issue I was having was when printing ABS, the printer would throw a " MCU ‘mcu’ shutdown: ADC out of range" error. When printing PLA (lower temps), this would never happen.

I belive at this point the cause of this behavior was related to the motor cooling fans I had added to my config, and specifically adding a [temperature_fan motor_fans] section to printer.cfg in my attempt to have the fans turn on when the printer chamber reached a certain temperature.

I did this by replicating the section of config that controlled the chamber fan in a similar way.

I THINK the issue is I can’t have MULTIPLE config sections (temperature_fan) referencing the same sensor / sensor pin?

My thinking is the underlying klipper code will try to read the ADC at arbitrary times and potentially conflict / result in strange readings, that in turn trigger the ADC out of range error.

Does that sound reasonable?

Is there a proper way to take the temperature reading from one temperature_sensor and use it in multiple temperature_fan’s?

For now I can control the motor fans just fine from a slider in the fluidd GUI as the output_pin section of the config works as expected, however I’m just curious if there is a better way to do this, and more importantly if what I was doing is likely to be the cause of there errors!

Upload your log and we can see

Hi, here is the klippy.log from an example ‘crash’, or rather the ADC error being detected and printing halted. I could not see any actual strange temperatures happening, and after some trial and error, I’ve found removing the extra temperature_fan section from my config, ABS printing seems to be working 100% of the time now. Hence my hypothesis about the dual references to the sensor pin being a possible explanation for my fun.

OK, the klippy.log is too big :frowning: Would the start (config etc) or end (the error point) be more helpful…

So it let me upload a zip of the full file. Hopefully that’s OK.

klippy.log.zip (1.2 MB)

I didn’t even notice at first that you were using a Creality machine, Creality modifies the Klipper firmware in their own way so it really makes it hard to debug what the issues are.

Like, Your log is so different than a normal Klippy log I can’t even tell where the shutdown happened because Creality spams the logs with their own info for whatever reason.

100% up to you, but since you’ve rooted it, you might considering installing the unmodified Klipper. That would help immensely with debugging issues.

Edit: Also, Yes, zipping the large logs is the preferred way to upload them.

I’d love to run an unmodified klipper, but I think that I’d need more info on the motherboard etc which a lot is available, but it’s not fully open :frowning:
I run into similar issues on my qidi x-smart 3, which also runs klipper, but even more hacked up than the creality version. Hence why I’m looking forward to finishing rebuilding the ender3’s I have, as they have all the electronics replaced so I can run a clean and unadulterated klipper.

Anyhow, I guess I’m just curious if the repeated temperature_fan sections in my modified config, referencing the same thermistor/ADC pin, is likely to be an issue. This should be a generic klipper issue (if it’s an issue at all), or I’m tricking myself that this is the cause of the weirdness.

Thanks for taking a look at the log anyway.

Friendly understatement? Sorry, just kidding.
No schematics for K1 series, so there will probably never be an open Klipper for those printers. Too bad, I like the K1 series.

Did you read Use one sensor two time, for heating and cooling heated chamber?

I agree with

If you use GitHub - Guilouz/Creality-Helper-Script: Helper Script for Creality K1 / KE / Ender-3 V3 Series you may start a new discussion here Guilouz/Creality-Helper-Script-Wiki · Discussions · GitHub.

Maybe someone can help you or give you a hint where to ask.

Good luck, hcet14

Thanks hcet14, I’ll take a look at the link you provided.
I’ve been using the helper script and info Guilouz provides, it’s been really helpful.
I did post a question on their wili, but no response yet, that’s why I came over here as I think it ended up being a klipper question not a Creality RE one :slight_smile:
It’s a shame Creality and others don’t fully publish info (schematics etc), but I guess it makes fun for the folks who like doing herdware RE. I did work out some spare IOs on the motherboard from a combination of the PCB images/silkscreen and other firmware (like the K1 Max that has additional heaters/fans etc that use the ‘spare’ pins on my motherboard).

Yep, that thread mentions the exact thing I was trying to do, and my concern about re-using the sensor pin, right down to the weird ADC errors when I did so.

As was said there, the solution is to use the read temp in python (or even gcode macros) to do stuff, or just add a 2nd sensor.

If that feature is not supported in klipper just yet, maybe it will in the future. I see that fan control is one of the development areas for 2024!

Yes, I’m also very curious.

You can use

https://www.klipper3d.org/Config_Reference.html#duplicate_pin_override

without issue, I do it just fine, or at least I have anyways.
There is nothing inherently wrong with doing it that way.

What Kevin and I were talking about is a different situation altogther (mostly).

You shouldn’t get any ADC errors when doing that.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.