MAX6675 and K thermocouple reference voltage loss

Basic Information:

Printer Model: Custom
MCU / Printerboard: Manta M8p + CB1

klippy.log.txt (164.5 KB)

I have been struggling with my extruder temperature sensor for sometime now. I use a k thermocouple and the MAX6675 as the title suggests. I have narrowed it down to ground reference as the source of temperature skewing. First symptoms would prevent printing due to acute temperature drop when the nozzle reached the bed. I solved this one by wrapping the bed with kepton tape. My PEI sheet sits on top of it.

I verified grounding of the frame is done properly, but there seems to still have some reference loss during homing (sensorless). Tried to wire everything I could to maintain a consistent reference, but it seems that there is always something that would cause this reference to shift. If I do sequential print jobs, every next job will have the Hotend hotter (due to the temp drop at print start homing) as the new reference seems to be permanently shifted until there is a firmware restart. If I do a firmware restart with the tool head touching the end stop positions and z=0 is when I have the lowest temperature drop on print start. But still any print in sequence will have an incremental temperature drop until it fails completely.
Another factor that seems to cause temperature drop is the first homing command. It seems that when steppers are turned on for homing it affects reference voltage. I test I wanted to do, but couldn’t find any config for that was to have the firmware start with the steppers on hold instead of disabled.

I ran out of ideas on how to solve it and perhaps there is a klipper issue. It would be nice to have a command to reset the sensor reference, then I could call it just before print starts and after nozzle priming. This would likely workaround any possible wiring issue or even firmware issues.

Thanks for any ideas around the issue

Sorry about your problems.

Now, when I look through your klippy.log (thank you for providing), I don’t see any situation where extruder: target & heater_bed: target are not set to zero (0). Could execute a test run where you have the heating problem and post the updated klippy.log in the reply?

Can I ask why you suspect grounding is a possible cause of your problems?

I’m also confused as to what is exactly happening:

  1. You wrapped the heated bed in Kapton (not “kepton”) tape because the nozzle or bed temperature was dropping?
  2. Can you please detail how you grounded the parts of your printer? This should never be an issue if you have one common ground and one connection going from this common ground to each of the electrical components in the system?
  3. What is your power supply and how is it wired? I’m confused by the “some reference loss” during sensorless homing. I’m not sure what you mean by “reference” as, typically, reference voltages are generated internally to the chips that require them (ie the MAX6675 has its own reference voltage and you can see it in the internal block diagram on page 7 of the datasheet).

Unfortunately the MAX6675 is a very poor choice for this type of application. This chip is immensely susceptible to all kinds of interferences, EMI etc, including coupling to GND.

I can only recommend to get rid of it.

1 Like

On a side note: Its successor the MAX31855 is equally crappy, so safe your money.

2 Likes

Thanks for quick response @mykepredko, indeed they were set to zero, which doesn’t really matter to observe the effect. Even when the heater is not on, the temperature drop is observable (by temperature I mean the temperature sensed by the sensor, not necessarily the real temperature):

This is the printer idle:

After homing:

After firmware restart, and with the toolhead touching the frame (sensorless homing position):

After homing again:

After trying to connect any possible isolated part of the frame this last part seems related to when stepper motors are one again. Or a mix. I don’t really understand exactly what’s going on here. That’s why a reset only for the driver would probably a faster solution.

You can see the dip on the red line. That’s why I mean “reference”. I assume it has to do with the grounding because that’s when the extruder touches the frame during sensorless homing. A similar effect can be seen when the nozzle touches the bed.
Ground wire is connected to the frame and to the power supply (meanwell 24V RSP-350-24). There is also an SSR for the mains heated bed. I also think there must be one common ground, but for some reason there is a difference somewhere. Not sure if it’s caused by the board as I assumed its ground should’ve been the same as the power supply and the frame. Or it is realated to interference.

Part of the reason

Okay. This is weird but I need you to confirm what I’m seeing.

On the first image, the “SoC” line is your host temperature - at least that’s what it looks like from the klippy.log You haven’t said what the “SoC” is, but it looks like a fan equipped system where the fan turns on when a threshold is reached. I’m not sure this is a problem.

As for the problem with the “Extruder” temp changing when you’re at the sensorless homing position, my first take is that this is a power supply problem:

  1. What kind of power supply are you using? Make, voltage output, power rating
  2. Can you probe the power supply’s output when the toolhead is at the sensorless homing position?
  3. Is there a metal to metal connection when the toolhead is at the sensorless homing position?

Anyway, I a bit more information is required to figure out what’s going on here.

You’re correct. I have two fans connected and mounted on a Voron base, just like you would on a voron build. The threshold is 40 and 45 degrees on the manta and CB1 boards , then they turn on. Don’t see a relation with that though.

  1. I mentioned my power supply on my previous post, maybe you missed it (meanwell 24V RSP-350-24) or is it something else are you asking for?

  2. So, I could observe the effect after homing and then disabling steppers. First, after homing:

After disabling steppers:

  1. Yes. The bicu h2 extruder stepper motor touches a mounting plate of the gantry

Edit: @mykepredko it seems like this is remaining difference is related to the fact the steepers are on or off. Though there are other situations that throw off the sensor, I mostly resolved them with the steps I mentioned before

Thanks for your input, but I don’t think there is an alternative for K thermocouples. I have used Max31855 before for PT100 sensor without any problems and I don’t think this is a hardware driver issue as it is doing what is supposed to do and amplifying. There are other underlying issues at play here, which I am trying to figure out.

I have experimented with both the MAX6675 and Max31855. I found both very unreliable and very prone to all sort of disturbances.

Today my printers (bed and hotend) run off PT100 (Class A or in the best case 1/10th Class B according to IEC 751) with a MAX31856 and I have found this solution to be very stable, reliable and accurate.

YMMV

Sorry, I read the power supply and just put in the question to make sure.

Looking at your oscilloscope images - it looks like you are looking at 5mV per division and you are reading 18.8mV and 22.6mV peak to peak differences. Unfortunately, these readings are meaningless as, at 24V, these swings will be filtered out when the power supply is converted to 5V/3.3V on the Manta.

I want to see what happens with regards to the power supply output at the full range when the gantry comes into contact with the stepper motors.

Along with this, could you place your oscilloscope ground to a “V-” terminal on your power supply as well as the “Gnd” connection on your toolhead when it is not in contact with the stepper motor and when it is - if there’s a ground issue, we should see something here.

Regardless, please provide a drawing of your printer in regards to the stepper motor wiring and the gantry? I’m interested in understanding what kind of grounding you have with the stepper motor that comes into contact with the gantry.

And to add:
With a PT100 you solve an additional problem: A type K thermocouple has a sensitivity of around 41 µV/°C. Every little noise from whatever is around (predominately 50Hz line noise, PWM, LEDs etc) will easily come to imissions in the range of mV and thus also might spoil your fun.
For comparison, a PT100 has a sensitivity of around 0.385 Ω/°C.

But again, I’m not on a mission to divert you from your path. If you think this is the way to go, I wish you good success.

1 Like

I appreciate your info, don’t get me wrong. There is are a few reasons for the K thermocouple, which are result of other issues. It’s a combination of form factor, max temperature and SPI issues I have with PT100, could not find a solution with the PT100 (I still have the MAX31856 unused). So I am trying to get to 500C max temp and vulcan heat block and an affordable sensor (to allow for extra spares, I am prone to bricking these sensors). I think I am almost there with the K, but still need to sort the interference. Gonna do some more measurements, maybe this will also help others struggling with this setup.

Since the K thermocouple is not something new anywhere (even possible to see in the example klipper docs), I am actually surprised I don’t see more people talking about this.

I will do some readings soon with the oscilloscope and hopefully get to the bottom of it.

Without any offense: Type K thermocouples are in my opinion simply the wrong sensor type for this kind of implementation.
This is like driving summer tires on snow and then trying to solve the resulting issues. It is much easier to use winter tires and not have the issues from the beginning.
IMHO this mainly results from the lack of knowledge of such sensors.

In a nutshell RTDs, e.g. PT100

  • More precise
  • Less demanding WRT calibration
  • No cold junction needed
  • Less demanding WRT measurement, e.g. resistance is easier to measure than a couple of µV
  • Easily up to 600°C
  • Wire length flexibly extensible
  • Maybe a bit on the negative side: More expensive / mechanically less robust

In a nutshell thermocouples:

  • Much higher temperatures, e.g. up to 1300°C, which is not needed for 3D printing
  • Less accurate
  • Calibration needed or very expensive measurement equipment needed that does this continuously
  • Cold junction compensation needed
  • Wiring length cannot and must not be changed (unless specialized cables are used)
  • Highly demanding measurement circuits needed, since measuring in µV range
  • Extremely susceptible to interferences since Volt is the key unit for measurement
2 Likes

No offense taken, and as I mentioned before, as it stands the PT100 is not an option for me. Following your analogy, the PT100 for me is trying to fit a car winter tyre on snow into a motorbike, just not possible ATM, not without significant, time consuming and costly changes. And the K summer tyres may not be ideal, but still are motorbike summer tyres. They allow me to drive, albeit a bit slippery, in the snow. Right now I am trying to chain it. Also, 500C capable PT100 are rare (or I can’t seem to find them) in my required form factor. The ones that I did find were either too long or too short or wrong diameter or too expensive (20€+).

My K thermocouple’s range is up 600 only. So this may vary depending on the subtype. The same is true for PT100. with type B/D up to 500, type A up to 300C and type C up to 150. If you can find a type B/D PT100, that is no more than 15mm in length and is 3mm in diameter that doesn’t cost a kidney (in thermal sensor’s standards), I will be happy to have it around in case this adventure doesn’t go anywhere.

I know resistance based sensors are more accurate, but the temperature fluctuation of K thermocouple is too low to make a significant difference. It fluctuates within 1 degree and the error is less than 2 degrees. The only problem I have with it now is the voltage related interference, which I believe must be solvable and that’s what is going to help me the most in the short term, not changing my setup.

Whilst I agree with most of what you’re saying. There is no single source of truth for every situation. And in my situation, the PT100 is not the best fit.

I do appreciate your input, nonetheless.

@mykepredko thanks for being trying to help. So, sorry for not being able to get all data you want yet. I made some readings and I am trying to make sense of them as they currently don’t. the ddp of V+ and V- is showing up a little over 5 volts, which doesn’t make a lot sense to me in a 24V power supply. I also think the grounding now is all the same accross the entire frame (including the gantry) and the difference I am seeing now is when the steppers are on or off, not touching the frame as I initially thought.

Do you think I might be hitting into the 350W threshold of the power supply? I thought that would not be the case since my bed is mains heated, but I confess I have not done the math. I am going to be a bit more thorough with my measurements and make the drawing, to not burden you with guesswork. And it already helped poking me to measure things properly, which I haven’t done before and I am already at least having some more leads to follow. Before I was too focused on trying to isolate the metal braided wire from the frame, the bed, etc, but it turns out that wouldn’t work anyway, there is always something touching something. So now that I can see the grounding is uniform. I still need to double check the gantry as it runs on roller wheels so there is some isolation from the rest of the frame, which I added a sort of electric train hook, but I suspect this my not be giving enough contact, so need to confirm.

To help visualize my printer. it looks like an ender 5, except the X axis is driven by linear rails. Thanks again for the help, I will get more readings and when will post here as soon as I have made sense of them.

I’m using e.g. https://de.aliexpress.com/item/33060348867.html as I found them quite good (use the 3 wire version) but only 450°C max, which is fully sufficient for my use cases.
Alternative might be: E3D PT100 Temperature Sensor | HartSmart Products

On a side note: 20€+ for a good PT100 does not really seem too much, given that the money usually spent on other printer parts is much higher.

1 Like

Sorry, what is “ddp”?

You might want to share your readings to get another set of eyes on them if they don’t make sense to you.

Chances are you’re not overloading the power supply unless you have a very large heated bed and it is being actively cooled. A 350W power supply provides just under 15A of current and, when heating at 100%, the be requires about 10A - this is why Klipper (and most other firmwares/slicers) heat the bed up first so that it reaches an equilibrium state and will draw around 3A to 4A. Your hot end requires 2A at 100% and your steppers probably require around 3A when everything’s moving.

Being generous and stating that the miscellaneous electronics requires 1A, when your printer starts running it’s drawing no more than 10A. Even if you heat the bed and hot end at the same time at the start (which I usually do to save time) you’re going to be well less than 15A.

I’m concerned about the statement “there is always something touching something” and what you say after that. Grounding electronics has very definite rules, the big one being that there is only one ground and it has a solid connection (ie a wire and not a piece of metal that is spring loaded against another one).

There should be a ground connection going to your gantry for one of the components and that’s all that’s required when it’s properly used.

This is why I asked for the wiring diagram.

Reading through the back and forth with @Sineos - could I suggest that you try a basic 100k NTC thermistor with a Beta of 3950? They’re dirt cheap and the Manta M8P has several drivers with connectors for them that will be unused in your system.

I suggest that you find something with a screw lug on them like:

to make attaching to the heater block easy.

Thanks, this one from aliex doesn’t seem too bad actually. Might give it a shot. Still don’t want to go into the SPI rabbit hole again soon. Wasted too much time on that one and there are quite a few SPI issues with the manta board and biqu doesn’t seem very interested to address the (having an accelerometer, a SPI touch screen plus an SPI temp SENSOR driver in this board is a nightmare).

It is when buying 3 of them. I always have a spare and a redundancy for the spare (based on bad past experiences). So to me, it’s way too much when these are so prone to failure.

Sorry, that was in Portuguese, force of habit. What I meant was Vd. So, the Vd between V+ and V- was only a bit over 5V. I want to recheck my measurements before I post the breakdown of all my measurements.

That’s my conclusion as well because my heated bed is mains powered and has no active cooling, it won’t put any significant load on the power supply.

For the rest there are 5 stepper motors (2 for Z, 1 for X, 1 for Y and one pancake for the extruder) that combined have less than 6 Amps configured in KLIPPER). The heater is 80W (which, at 24V translates to a little over 3A at 100%) and the rest are sensors and fans connected to the board. 3 24V fans and 1 12V fan, the thermocouple, inductive probe, accelerometer and a small TFT screen that’s currently unplugged. Oh and of course the manta board itself, with the CB1 in place of the raspi.

I agree with you in number and color here, just haven’t found a good way to properly bridge the frame to a moving gantry with a well secured wire, but the rest seems OK. Perhaps I should put more effort in a solution to this one. Thinking of it, perhaps I can stop being an idiot and have a wire run with the other wires of the tool head and secure it in the screw of the extruder fan and I can attach the other side to the frame. I will try that and post the result here.

I have them and they work fine. They just can’t go too high on temperature scale.
Either way, going over all of this helped immensely to take a step back in solving this issue.

I haven’t posted the readings and drawing yet because I didn’t have time to do all of it properly.

I’m curious, why would you need 500°C?

What is “only a bit over 5V”? Personally, I don’t worry unless 5V goes over 5.25V or under 4.75V - the electronics will take voltages across that range comfortably and getting something exact may be problematic due to the design of the power supply and the sense/voltage reference in it.

That’s what I am suggesting.

1 Like