Autotune PID worked well but can not reached the set temperuture ;-(

Hi.

I am just settling up my new printer and ran into a problem with the hot end.
I successfully ran a PID autotune at 220 degrees (M303 E0 S220) and added the values to the config:
################# Hotend temperature control configuration
temperature_control.hotend.enable true # Whether to activate this ( “hotend” ) module at all.
# All configuration is ignored if false.
temperature_control.hotend.thermistor_pin 0.24 # Pin for the thermistor to read
temperature_control.hotend.heater_pin 2.7 # Pin that controls the heater, set to nc if a readonly thermistor is being defined
temperature_control.hotend.thermistor EPCOS100K #

temperature_control.hotend.set_m_code 104 #
temperature_control.hotend.set_and_wait_m_code 109 #
temperature_control.hotend.designator T #

temperature_control.hotend.max_temp 275 # Set maximum temperature - Will prevent heating above 300 by default
#temperature_control.hotend.min_temp 0 # Set minimum temperature - Will prevent heating below if set

temperature_control.hotend.p_factor 89.5 # permanently set the PID values after an auto pid
temperature_control.hotend.i_factor 6.626 #
temperature_control.hotend.d_factor 302 #

temperature_control.hotend.runaway_heating_timeout 180 # max is 2040 seconds
temperature_control.hotend.runaway_range 20 # Max setting is 63°C

#temperature_control.hotend.max_pwm 64 # max pwm, 64 is a good value if driving a 12v resistor with 24v.
################################################################################################

When I start a print with a the first layer temp of 220 degrees, I can see that the hot end heats up to only about 209 degrees
and therefore the printing never starts!!

When I set the temperature manually ( via Octoprint ) to
a) 190 degree. The hot end heats up to 190 ±3 degrees
b) increase to 200 degree. The hot end heats up to 200 +2.4 -4 degrees
c) increase to 210 degree. The hot end reaches only about 207 degree ( and it takes ages to get there!!)
during the heat up from 200 to 210 I can see that the heater is switching rapidly On-OFF ( LED flashes)

d) increase to 220 degree . No more temperature increase, The LED is flashing, like it does when keeping the temp.

I do have screen-shot of the temp graph recorded by octoprint, but I do not know how to attach it ;-(

I do have another Printer ( a Voxel OX) with the same setup:
Controller & Smoothieware EDGE (15th December), E3D-V6, 24V heater cartridge(=14.4Ohm) and 24V PSU & 100K NTC 3950
Which works fine with the same settings, except for the Ki, Kp, Kd values which are different
Most likely because of slight differences in the supply voltage, the heater resistance & the NTC
Kp=67.4
Ki =4.443
kd=256
But I also tried these values (as the hot end setup is identical ) … but NO luck ;-(

Maybe someone has an idea what is going on here?
What am I missing?

Any help/idea is highly appreciated.

Thanks

Imported from wikidot

PID autotuning sometimes isn’t perfect.
You want to manually tune some of your parameters, there are a lot of guides on how to do that on the internet.

To test, if the PID controller is causing the problem, I switched to bang-bang.
The temperature control was even worse!!
When set to 220 degrees the hotend reaches only ~200 degrees and
smoothie ran correctly into a “HALT” condition, because of not reaching the target temperature in the given time.
Which did not happen when using PID control.

So maybe noise on the Temp sensor line?
This made me thinking, that maybe the wiring is causing the problem.

The printer is quite big with a build area of around 560x560mm and
because of the CoreXY setup I routed all cables via a 20mm conduit to the printhead.
The conduit is running like an inverted “U” from the frame to the printhead - almost 1.5 meters
I used a shielded 8xcore cable for
2xtemp sensors, (+ line only)
2x-endswitches(NC and only the input min/max is wired)
and
BLtouch(4wires) 5V, GND, PWM, Signal out

plus separate 0.5mm² wires for:
GND 2x
12V 2x
24V 2x
PLA-FAN 2x ( open drain line- only)
Heater 2x (open drain line- only)
So not any space left to pull more cables in ;-(
I thought that would give me enough room to easily accommodate 2x heater cartridges @40W plus FAN & LED-strip etc.

Because of the OpenDrain outputs of smoothie,
I can choose between the different supply voltages, right at the printhead, for Hotend, FAN & LED.
and I did not route separate GND cables for the temp sensors - stupid me

So I temporary changed the wiring and sure enough,

  1. the hotend now easily reaches the target temp :wink:
  2. after another PID tuning it now keeps the temp at 220 ±0.1 degrees
    It looks like the current running through the GND wires is badly influencing the temp sensor reading (to much noise).

To further improve the temp reading in the upcoming Smothie V2,
I would like to suggest something:


“Differential” inputs! (OpAmps as differential amplifier)
and
than use twisted cable pairs for the temp sensor wiring.


This should greatly reduce any inducted “Noise” on the wires and avoid these kind of problems completely - I guess

Again thanks for helping & thanks for the great work on smoothie
Best regards from the hot Namibia
Jurgen

PS: I now have to redo the wiring ——umpf ;-(
or add differential amps to the temp sensor inputs??

You can not share grounds and have sensors running together like that, that will not work at all.
Thermistor inputs need their own ground ( which is not the same as the board ground ), twisted wires, and to run as far as possible from power lines.
For other elements you also want to avoid the sort of “grouping” you are doing, those will cause you tons of trouble.
Just wire it normally, there are very good reasons why people do it this way.

Re-wiring done and everything works :wink:

I was thinking of using CAT-6 (shielded-twisted pair) network cable - but the price was too high.
~USD20 for 2m!! … so this was a “no go”

The only other cable I could get locally was: 8-core + shield (- sort of twisted )
So I used that for now.

Thanks and cheers :wink: