Solved Temp Sensor Madness
-
Background: I have been struggling with the commissioning a large format printer that I am rebuilding. The focus seems to be the temperature daughterboards and my long, noisy cable run. The machine has cable run from the Duet3d cabinet to the hotend of almost 10 meters. All the drive/signal cables run through drag chains in a large bundle. I have grounded the shields of all the motor cables at the computer end of the harness. I have replaced a working Ramps/Arduino controller with the Duet3d Ethernet and the machine was coming back online well. The old cabinet was very tightly packed with no room for expansion, so I have installed everything in a larger, more appropriate enclosure with room to grow.
I am using external stepper drivers for the axes (the same ones that were installed before) and motion and endstops are working well. I have the expansion breakout board with all the steppers connected there, including one for the extruder. I also am using an SSR for the heater control. Each axis/extruder has it's own power supply, as does the computer.
I have attached a copy of my config.g but at this point there are no fans, nothing extra connected to the computer except power, ethernet cable, and the above hardware.
0_1549725201948_config.gMy central problem is that I have tried both K-type thermocouples and PT100 sensors but I cannot seem to get a stable temperature reading from the hotend. It always goes to 2000C. I currently have a new PT100 daughterboard and sensor. If I connect the resistor to the PT100 at the daughterboard, it works fine (0-0.2C). The existing wiring seemed sketchy, so I took a long piece of Cat 5, used 2 pairs to rig up the sensor as a 4wire PT100 (as DC showed in the wordpress article) thinking that the twisted pairs of the cat5 would help me, but again I get a solid 2000C with the resistor or the sensor. I can't do much more commissioning of this machine until I can get a solid temperature.
-
If temperature reads 2000, then firmware doesnt receive any temperature, it thinks that sensor isnt connected at all. I dont know if it matters, but where from that M301 P200 come? I belive, if you use P100 then you dont have to include M301 at all.
-
30 feet?
The 2000C reading usually means open circuit, I'm not sure what value a short is.What is your resistance reading at the probe connector at the duet?
-
@aidar I concur there is no need for a M301 line on firmware versions later than 1.15 onwards
the following is my heater section for reference.
HTH Doug
-
@aidar Agreed. This line was an artifact from my thermocouple tests, and I should have dropped it. I am going to head back to the machine this evening and do some more investigating re: the resistance across my cables and noise reduction. Thanks @Dougal1957 and @Wyvern as well for the info.
-
I would check your solder joints where you are tying your pair to a single lead. I would also use a DMM in continuity mode to test that wiring to make sure you didn’t cross a pair somewhere. On the PT100 board make sure jumpers are removed to make it a 4 wire measurement, and then check you config file to make sure you are telling it to use the PT100 board and not the thermistor pins. 4 wire should be fine for that length as the idea is the extra impedance from that long run should be cancelled out. That said there may still be a practical limit. I stress MAY.
-
Also forgive me for assuming you don’t know this but I figured I would mention it. Make sure each lead of the pair is plugged into the same same side of the pt100 boards not mixed. I had an issue with my pt100 and I had cross leads and clearly that didn’t work right.
-
@bpislife These are good points to check. I will investigate when I am back at the machine. I used conventional cat5e cable because of the colored pairs and the shielding to help me keep things correctly wired. I did remove the jumpers when I did the 4wire, per the documentation. I am not giving up hope just yet. Thank you.
-
I made some more tests. Replaced the CAT5 with some 22gauge shielded cable with stranded vs solid conductors. Resistance of my cable with my multimeter seems to be 7-8 Ohms on each individual conductor. I have the 2-wire PT100 wired up in 4-wire configuration with the jumpers removed on the daughterboard. I still get a solid 2000C temperature, even with the included resistor instead of the sensor. If I shorten the cable, the sensor reads correctly.
I am unable to shorten the cable enough to make a difference with my machine geometry.
Is there a way to introduce a cable length compensation for temperature sensors?
Other ideas? -
Cable length shouldn't be an issue with a PT100, but interference pickup may be. It's probably possible to add one or more capacitors to help suppress it, but I haven't tried yet. A 100nF capacitor between the two inner terminals of the 4-way terminal block might be a good start.
-
The cap(s) didn't help. We are going to try getting a scope on the cable this weekend and see what is happening.
-
UPDATE: No chance to apply a 'scope to look at the signals, so I am using lower-tech methods. I have reverted back to the thermocouple daughterboard and my previous sensors. I was able to get a good solid temperature reading from the Duet, but only if I disabled all my external stepper drivers by disconnecting their power. As soon as I connected power to even one driver, the temperature returns to 2000C, and the fault LED on the daughter board flashes about once per 1-2 seconds.
I will continue to seek the interference source(s) that are preventing me from running and will let you know the results. -
I failed to mention the basics:
Firmware Version: 2.02(RTOS) (2018-12-24b1)
Web Interface Version: 1.22.6
This is an IDEX sort of mechanism with 2 independent X drives on a moving Y gantry.
There are external stepper drivers Wantai DQM542 and the motors are big Nema23's with part number 23HS45-4204S.
I replaced the Arduino/ramps hardware with the Duet board, and replaced the overstuffed direct-wired electronics cabinet with a larger industrial enclosure. -
@billwhit said in Temp Sensor Madness:
UPDATE: No chance to apply a 'scope to look at the signals, so I am using lower-tech methods. I have reverted back to the thermocouple daughterboard and my previous sensors. I was able to get a good solid temperature reading from the Duet, but only if I disabled all my external stepper drivers by disconnecting their power. As soon as I connected power to even one driver, the temperature returns to 2000C, and the fault LED on the daughter board flashes about once per 1-2 seconds.
I will continue to seek the interference source(s) that are preventing me from running and will let you know the results.Thermocouples produce a very small signal (about 40 microvolts per degC) so they pick up inductive interference very easily. Stepper motor cables carry pulsed currents, so they generate inductive interference. So here are some things to check and try:
-
Check with a multimeter that there is no connection between the thermocouple wires and the metalwork of the hot end that it is fitted into.
-
The thermocouple wires must be twisted pair thermocouple wires of the correct type for the thermocouple, all the way from the thermocouple back to the daughter board.
-
Keep the thermocouple wires away from the stepper motor wires.
-
To reduce the amount of interference generated by the stepper motor wires, use 2-pair twisted pair cable for each stepper motor, one pair for each phase.
-
If you are using the older version of our thermocouple board (the one where you use X100 in the M305 command, not X150), add the capacitors as described on the wiki. The later version (X150 in the M305 command) has additional filtering built-in.
-
Grounding the hot end metal work that the thermocouple is fitted into might help.
-
-
Things are working.
I added ferrite cores on the motor output lines of the external stepper drivers, to help reduce the noise. I made sure all the cable shields, power supplies, and drivers are on the same ground. And finally I wrapped the TC in a layer of kapton tape to make sure it wasn't grounding against the nozzle housing.