-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] [bugfix-2.0.x] Filament Width Sensor on SKR1.3 shows wrong values (*5V/3.3V) #14680
Comments
setting up scaling factors for min/max reading to measurement has actually been on my todo list for awhile specifically because of this issue. If someone else gets to it before me by all means! |
@pseudex Do you know a way to set Z_MAX_PIN as the analog pin used for the sensor ? I can not see anywhere in Marlin where to put this option for the SKR V1.3 boad. |
@Titi9237 : I don't think, that this is possible. This doesn't look like an analog input pin. in the pin definition file (pins_BIGTREE_SKR_V1.3.h) zmax is pin 1.24. #define Z_MAX_PIN P1_24 In the datasheet on page 15 it says nothing about analog input. the Analog inputs pins are:
I would suggest to use Y_MAX_PIN P1.26 if 1.31 doesn't work for you. The second temp sensor (TEMP_1_PIN) is also possible to use. this is my definition in the conf_adv.h /**
* Filament Width Sensor
*
* Measures the filament width in real-time and adjusts
* flow rate to compensate for any irregularities.
*
* Also allows the measured filament diameter to set the
* extrusion rate, so the slicer only has to specify the
* volume.
*
* Only a single extruder is supported at this time.
*
* 34 RAMPS_14 : Analog input 5 on the AUX2 connector
* 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
* 301 RAMBO : Analog input 3
*
* Note: May require analog pins to be defined for other boards.
*/
#define FILAMENT_WIDTH_SENSOR
#if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILWIDTH_PIN 5 // Analog Input 5, Input 1.31 auf EXP1
#define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
#define MEASUREMENT_DELAY_CM 44 // (cm) The distance from the filament sensor to the melting chamber
#define FILWIDTH_ERROR_MARGIN 0.2 // (mm) If a measurement differs too much from nominal width ignore it
#define MAX_MEASUREMENT_DELAY 50 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
#define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
#define FILWIDTH_FACTOR 1.0294
// Display filament width on the LCD status line. Status messages will expire after 5 seconds.
#define FILAMENT_LCD_DISPLAY
#endif |
@pseudex still having issues? |
I don't have this issue anymore. But I fixed this in my own fork for my printer. |
@pseudex maybe consider submitting a PR so it can be fixed in marlin? |
Or at least point us to the fork / commit and we can take it from there! Even a partial implementation is better than whats there currently before I ever get around to a full scaling setup. |
Everything I changed I described in my initial post. Also I pointed to the commit on my fork |
@pseudex maybe submit a PR to marlin 2.0.x instead so it can get fixed for everyone |
i used todays bugfix (23rd october) with skr v1.3, it compilled ok and uploaded to the board but the board reset itself every 30 seconds or so in a permanant boot loop kinda thing, i comented out filament width sensor from marlin and everything works ok again, i tried my settings from marlin 1.1 and then the standard stock settings but no change |
@boelle Sorry, I´m a newbe here. Anyway I´m interested into this topic and got the opinion pseudex was describing his solution in detail, already - see his first comment from the 19th, July - "Additional Information". |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Jasons Filament Sensor shows wrong values if connected to the SKR1.3 Board with the LPC1786 CPU.
The Analog Inputs on this Board can only read up to 3.3V. Marlin expects a 5V value and scales it to 5 instead of 3.3V
Steps to Reproduce
Expected behavior:
Reading in mm of the Filament
The Sensor outputs a Voltage value 1:1 to the width in mm
1.75mm -> 1.75V
Actual behavior:
Reading is scaled to 5V instead of 3.3V so the diameter is shown with a factor of 1.51
1.75V -> 2.64mm
Additional Information
I changed the temperature.cpp in the marlin/src/module folder. This works for me. But there might be a better way to fix this issue.
Commit on my Server
For people who want to try the sensor on their SKR1.3 Board be aware that the sensor can output up to 5V. I put a Zener Diode (3.3v) on the output to limit the voltage. Not all of the analog inputs of this CPU are 5V tolerant.
The text was updated successfully, but these errors were encountered: