Printer Model: self made based on prusa
MCU / Printerboard: MKS Robin nano 3.1
Host / SBC Rasperry PI3
klippy.log
Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
Dimensions are shown completely wrong in kipper with TSL1401CL width sensor, difference is about 1.1 mm too big. For example, filament is 1,58 mm, shown is 2,77 mm. The sensor works fine with ramps board on marlin 2 for years.
Also bed temperature is not correct, set temperature to 100°C, real temperature is abot 82°C. Temperature sensor is right, measurements of resistance is correct. It is a 3950 100K sensor, configured as generic_3950.
Maybe there is something wrong with analog inputs of the printer controller board?
… klippy.log.zip (745.5 KB)
I saw in your klippy.log you played with “default_nominal_filament_diameter” and “max_difference”. You never touched “measurement_delay: 100”.
Is your distance from sensor to the melting chamber exactly 100 mm?
Yes, i have read all information i found about this Sensor in Dokumentation. I mean that this value would Not Change the current measured diameter. This value has only influence while printing is active.
This sensor is really rarely used, so unfortunately, I cannot offer much guidance.
How the Klipper module works:
The TSL1401CL returns a voltage value.
Klipper samples this voltage value via an ADC-capable pin on the MCU.
The detected voltage translates one-to-one to the diameter; this means if 1.5 V are measured, the filament diameter is assumed to be 1.5mm.
Via the default_nominal_filament_diameter, a correction factor for the extrusion amount is calculated and applied via M221.
The measurement_delay determines after which distance of forward-moving filament the correction factor needs to be applied during printing.
So, assuming that Klipper does ADC correctly (otherwise all temperature measurements would be screwed and there is no indication for such), the displayed diameter has a direct relationship to the output of the module.
Do you have a link to the specific product that you are using?
I know how this sensor works, and it works together with Marlin2 on a Ramps board and a mega2560 for years. The voltage is translated as you described. This is correct, there is no hardware problem with the sensor itself. The M221 is a correction value for the filament diameter. This is a one shot correction, the sensor corrects this values instantely while printing the percentage of the filament will be adapted automaticly. this worked for me for many years on other hardware and software platform. But not on klipper with mks robin nano v3.1!! I mean that someting is wrong with measurement of analog values, maybe some reference voltage is wrong calculated in software or there is a hardware fault on my board. at least measurement of heat bed temperature is wrong. I do not know how to find out what is the cause. I do not know how to make shure it is a hardware fault. Unfortunately MKS does not specify all restors and diodes in their documentation. schematics are supplied incomplete.
I am using this sensor: Filament Width Sensor Prototype Version 3 by flipper - Thingiverse
As i said before, the sensor translates the dimensions correctly. this is not the problem.
no, unfortunately my python knowledge is also not good enogth to understand everything in this script. Maybe i can try and error if i can modify something in this script which can bring a possible solution. the measurement delay is the dimension from the sensor to the end of the extruder. this value has no influence to the measured diameter when you want to show the diameter via terminal macro/instruction. yes, of course it is needed, but when the diameter is calculatet wrong, i can not even start printing. because the difference is not acceptet by klipper when it is more than 1 mm. pid settings also does not cause a correct measurement of the temperatures. I did run the calibrate pid settings macro.
Unfortunately, I cannot offer any more guidance here. To the best of my knowledge:
Some MKS boards (and others as well) are known for unstable ADC workings, but I’m not aware of any reports concerning the Nano 3.1, which is a quite widespread board.
Usually, errant temperature readings are due to defects in the wiring or the NTC itself and can manifest in multiple ways.
The board has 3 dedicated temperature ports in total. One troubleshooting approach might be to connect different probes to different ports and compare their readings against a common temperature source - for example, tape them to a heated bed.
in your config. Neither is Trianglelab-NTC100K-B3950 a valid sensor type in Klipper, nor 6700 a valid pull-up value for this board in its standard configuration. Unless you put this with good reason, both will of course lead to crappy results.
I read some articles about this board where people also have problems with incorrect temperature measurements. My NTC and the wiring is completely correct and not defective. It works well with other combination of hardware and firmware. Swapped extruder and bed temperature measurement ports with almost the same results. maybe extruder temperature measurement is also wrong. but i can not verify the extruder temperature.
yes, i know. tried to find a solution for correct bed temperatures. Trinangle Lab sensor type added to config files with my measures. pullup resistor was another try to find a solution. i know, normally pullups are 4,7kohms. higher values gets me better results. known configuration files does not match my configuration. i have at least other temperature sensors. my current config file is mutch bigger, with much more features.
have found a particial solution. changing the value of the measured dimension. The python script for the dimension width sensor does not seem to calculate correct filament dimension. at least for my combination of hardware. please see attached screenshots..
I am a new user, therefore i can attach only one upload!!??
Sorry, dont know how to split. The problem with the diameter sensor has been solved by myself. Also found a (bad) solution for the bed temperature problem. Still do not know if its a hardware or software problem. Think a better MKS robin nano documentation can help getting a better solution. Dont know if the chinese producer will support. As i said before, got no answer from them.
So why do you ask me to split when you know that only admins can do?
Already explained, three days ago. Please see the image in the post. canged a value in /home/pi/klipper/klippy/extras/tsl1401.. from read_value * 5 to read_value * 2.85198. Details in previous post. bed temperature problem “dirty” fixed with pullup_resistor = 7700, this is not recommended, but it gives me better temperature values. Already explained before.
What do you mean with Mercury One against a Voron 2.4?