Aller au contenu

GO Print

Marlin et capteur de fin de filament


Messages recommandés

Bonjour à tous,

Toujours dans un soucis d'amélioration de ma machine, j'essaie de cabler mon capteur de fin de filament sous Marlin 2.0bugfix.
Je pense avoir rempli tout ce qu'il fallait dans le fichier configuration.h, à savoir :

/**
 * Filament Runout Sensors
 * Mechanical or opto endstops are used to check for the presence of filament.
 *
 * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
 * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
 * By default the firmware assumes HIGH=FILAMENT PRESENT.
 */
#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define NUM_RUNOUT_SENSORS   1     // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
  #define FIL_RUNOUT_INVERTING true // Set to true to invert the logic of the sensor.
  #define FIL_RUNOUT_PULLUP          // Use internal pullup for filament runout pins.
  //#define FIL_RUNOUT_PULLDOWN      // Use internal pulldown for filament runout pins.

  // Set one or more commands to execute on filament runout.
  // (After 'M412 H' Marlin will ask the host to handle the process.)
  #define FILAMENT_RUNOUT_SCRIPT "M600"

  // After a runout is detected, continue printing this length of filament
  // before executing the runout script. Useful for a sensor at the end of
  // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
  //#define FILAMENT_RUNOUT_DISTANCE_MM 25

  #ifdef FILAMENT_RUNOUT_DISTANCE_MM
    // Enable this option to use an encoder disc that toggles the runout pin
    // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
    // large enough to avoid false positives.)
    //#define FILAMENT_MOTION_SENSOR
  #endif
#endif

Après compilation et téléversement, voilà le statut:

  1. Avec un filament inséré, un M119 me donne:
    Reporting endstop status
    x_min: open
    y_min: open
    z_min: open
    z_probe: TRIGGERED
    filament: open
  2. Sans filament inséré, M119:
    Reporting endstop status
    x_min: open
    y_min: open
    z_min: open
    z_probe: TRIGGERED
    filament: TRIGGERED

J'en déduis donc que la pin déclarée dans Marlin est la bonne et que la logique de détection se fait dans le bon sens.

Lorsque j'active l'option de fin de filament dans le menu de marlin, l'imprimante refuse de lancer l'impression, m'indiquant que je n'ai pas de filament d'inséré.
Un changement de logique sur la ligne "#define FIL_RUNOUT_INVERTING false" n'a pas résolu mon problème.
Une idée de ce que je peux avoir raté ?

 

Merci d'avance

Lien vers le commentaire
Partager sur d’autres sites

  • 3 months later...
  • 1 month later...
  • 2 months later...
  • 2 weeks later...
  • 2 months later...

J'ai résolu le problème en raccordant le détecteur sur mon écran TFT et non sur ma carte.

Voici également ma config Marlin

#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT false // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
 
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
 
// Override individually if the runout sensors vary
//#define FIL_RUNOUT1_STATE LOW
//#define FIL_RUNOUT1_PULLUP
//#define FIL_RUNOUT1_PULLDOWN
 
//#define FIL_RUNOUT2_STATE LOW
//#define FIL_RUNOUT2_PULLUP
//#define FIL_RUNOUT2_PULLDOWN
 
//#define FIL_RUNOUT3_STATE LOW
//#define FIL_RUNOUT3_PULLUP
//#define FIL_RUNOUT3_PULLDOWN
 
//#define FIL_RUNOUT4_STATE LOW
//#define FIL_RUNOUT4_PULLUP
//#define FIL_RUNOUT4_PULLDOWN
 
//#define FIL_RUNOUT5_STATE LOW
//#define FIL_RUNOUT5_PULLUP
//#define FIL_RUNOUT5_PULLDOWN
 
//#define FIL_RUNOUT6_STATE LOW
//#define FIL_RUNOUT6_PULLUP
//#define FIL_RUNOUT6_PULLDOWN
 
//#define FIL_RUNOUT7_STATE LOW
//#define FIL_RUNOUT7_PULLUP
//#define FIL_RUNOUT7_PULLDOWN
 
//#define FIL_RUNOUT8_STATE LOW
//#define FIL_RUNOUT8_PULLUP
//#define FIL_RUNOUT8_PULLDOWN
 
// Set one or more commands to execute on filament runout.
// (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
 
// After a runout is detected, continue printing this length of filament
// before executing the runout script. Useful for a sensor at the end of
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
#define FILAMENT_RUNOUT_DISTANCE_MM 5
 
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
// Enable this option to use an encoder disc that toggles the runout pin
// as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
// large enough to avoid false positives.)
//#define FILAMENT_MOTION_SENSOR
#endif
#endif
  • J'aime 1
Lien vers le commentaire
Partager sur d’autres sites

Bonjour Gepetos,

Si bien sur, mais cet un écran LCD avec Exp1, 2 ou 3, mon soucis, c'est quand le filament n'est pas dans le détecteur ça va, mais dès que j'introduis le filament, il se déclenche pour prévenir de changer de filament. les fonctions sont inversées.

Modifié (le) par Jeanpinou
Lien vers le commentaire
Partager sur d’autres sites

il y a 40 minutes, Jeanpinou a dit :

les fonctions sont inversées.

il faut inverser la logique sous marlin ou modifier la maniére dont tu a connecter les fil sur ton capteur ( cf NO normaly open contre NC normaly close ... ) https://marlinfw.org/docs/configuration/configuration.html#filament-runout-sensor

 #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor. 

Enfin, si tu arrive a ouvrir une connexion a l'imprimante via un câble USB avec un programme comme Pronterface https://www.pronterface.com/ ou Repetier Host https://www.repetier.com/download-now/ , il existe la commande g-code M119 ( https://marlinfw.org/docs/gcode/M119.html ) pour avoir le statue des capteurs de fin de courses et capteur de fin de filament. Et tu poura vite savoir si tu a bien "open" ou "TRIGGERED" quand il le faut.

Modifié (le) par PPAC
  • +1 1
Lien vers le commentaire
Partager sur d’autres sites

Bonjour PPAC,

J'ai bien tout regardé, voici les tests avec Pronterface réalisés ce matin :

Sans filament engagé :

SENDING:M119
Reporting endstop status
x_min: TRIGGERED
y_min: open
z_min: TRIGGERED
filament: TRIGGERED

Avec filament engagé :

SENDING:M119
Reporting endstop status
x_min: TRIGGERED
y_min: open
z_min: TRIGGERED
filament: open

En revanche, je n'ai absolument pas cette ligne dans "Configuration.h"

 #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor. 

Je possède une Ender 3 avec carte mère V4.2.7 - TMC 2225

 

Je possède une Ender 3 avec carte mère V4.2.7 - TMC 2225

Modifié (le) par Jeanpinou
Lien vers le commentaire
Partager sur d’autres sites

Il y a 4 heures, Jeanpinou a dit :

En revanche, je n'ai absolument pas cette ligne dans "Configuration.h"






 #define FIL_RUNOUT_INVERTING false // Set to true to invert the logic of the sensor. 

Tu te base sur quelle source de firmware ? quelle version ? (un lien stp !)

Car oui cette ligne ne semble pas disponible pour des versions 1.x de marlin, là je l'ai extrait d'une version 2.0.8.x https://github.com/MarlinFirmware/Marlin/releases  (édit: de https://marlinfw.org/docs/configuration/configuration.html#filament-runout-sensor mes excuses ...)... sauf si cela a un autre nommage sur les ancienne (édit: d'autre) version de marlin

Tu a quoi comme capteur ? Il te reste donc la possibilité de câbler différemment ton endstop ( en NC au lieu de en NO ou inversement) ou de trouver une version de marlin avec cette possibilité de configuration ....

http://www.reprap.com/wiki/Mechanical_Endstop

Modifié (le) par PPAC
  • +1 1
Lien vers le commentaire
Partager sur d’autres sites

Module de détection de rupture de filament de l'imprimante 3D Avec capteur de dépassement de câble 1M Détecteur de fuite de matériau Pour imprimante 3D les piècesRe,

Firmware basé sur Marlin 2.0.x, fichiers modifiés avec Visual Studio Code

Je vais faire les modifications avec ce nouveau Marlin, Je ne trouve pas comment faire... Pfffff

Voici le branchement du capteur :IMG_2510.thumb.JPG.ddc3d9550e4b1b1965aa9bec1aee10d2.JPG

 

Bon, je n'ai absolument rien trouvé pour inverser la commande du capteur de fin de filament, celui-ci travail à l'envers... sniffff

Modifié (le) par Jeanpinou
  • J'aime 1
Lien vers le commentaire
Partager sur d’autres sites

Marlin 2.0.8.1, configuration.h, section  : «Filament Runout Sensors» ≃ lignes 1275 et plus 😉

Citation

/**
 * Filament Runout Sensors
 * Mechanical or opto endstops are used to check for the presence of filament.
 *
 * IMPORTANT: Runout will only trigger if Marlin is aware that a print job is running.
 * Marlin knows a print job is running when:
 *  1. Running a print job from media started with M24.
 *  2. The Print Job Timer has been started with M75.
 *  3. The heaters were turned on and PRINTJOB_TIMER_AUTOSTART is enabled.
 *
 * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
 * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
 */
//#define FILAMENT_RUNOUT_SENSOR     <= à décommenter pour activer
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
  #define NUM_RUNOUT_SENSORS   1          // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.

  #define FIL_RUNOUT_STATE     LOW        // Pin state indicating that filament is NOT present.   <= à inverser en HIGH si besoin
  #define FIL_RUNOUT_PULLUP               // Use internal pullup for filament runout pins.
  //#define FIL_RUNOUT_PULLDOWN           // Use internal pulldown for filament runout pins.
  //#define WATCH_ALL_RUNOUT_SENSORS      // Execute runout script on any triggering sensor, not only for the active extruder.
                                          // This is automatically enabled for MIXING_EXTRUDERs.

  // Override individually if the runout sensors vary
  //#define FIL_RUNOUT1_STATE LOW
  //#define FIL_RUNOUT1_PULLUP
  //#define FIL_RUNOUT1_PULLDOWN

  //#define FIL_RUNOUT2_STATE LOW
  //#define FIL_RUNOUT2_PULLUP
  //#define FIL_RUNOUT2_PULLDOWN

  //#define FIL_RUNOUT3_STATE LOW
  //#define FIL_RUNOUT3_PULLUP
  //#define FIL_RUNOUT3_PULLDOWN

  //#define FIL_RUNOUT4_STATE LOW
  //#define FIL_RUNOUT4_PULLUP
  //#define FIL_RUNOUT4_PULLDOWN

  //#define FIL_RUNOUT5_STATE LOW
  //#define FIL_RUNOUT5_PULLUP
  //#define FIL_RUNOUT5_PULLDOWN

  //#define FIL_RUNOUT6_STATE LOW
  //#define FIL_RUNOUT6_PULLUP
  //#define FIL_RUNOUT6_PULLDOWN

  //#define FIL_RUNOUT7_STATE LOW
  //#define FIL_RUNOUT7_PULLUP
  //#define FIL_RUNOUT7_PULLDOWN

  //#define FIL_RUNOUT8_STATE LOW
  //#define FIL_RUNOUT8_PULLUP
  //#define FIL_RUNOUT8_PULLDOWN

  // Commands to execute on filament runout.
  // With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c")
  // NOTE: After 'M412 H1' the host handles filament runout and this script does not apply.
  #define FILAMENT_RUNOUT_SCRIPT "M600"

  // After a runout is detected, continue printing this length of filament
  // before executing the runout script. Useful for a sensor at the end of
  // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
  //#define FILAMENT_RUNOUT_DISTANCE_MM 25

  #ifdef FILAMENT_RUNOUT_DISTANCE_MM
    // Enable this option to use an encoder disc that toggles the runout pin
    // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
    // large enough to avoid false positives.)
    //#define FILAMENT_MOTION_SENSOR
  #endif
#endif

 

🙂

  • J'aime 1
  • Merci ! 1
Lien vers le commentaire
Partager sur d’autres sites

bonjour fran6p,

J'avais pris un peu l'air, car la tête allait exploser, tu m'as envoyé la config, je l'avais devant moi et je n'ai rien vu, c'est exactement celle-ci que j'utilise, et nickel, j'ai pu également mettre pleins de lignes en +, exemple : les statistiques de l'imprimante, mettre la config en Français, utiliser les bornes 5 fiches au lieu de 3/2 pour le BLTouch , enfin ça fonctionne très bien. il fallait inverser les commandes.

Bravo à toi pour tes connaissances, ça fait deux fois déjà...

Amicalement.

  • J'aime 1
Lien vers le commentaire
Partager sur d’autres sites

@Jeanpinou

De rien 😉 A quoi servirait une connaissance / compétence si elle n'était partagée? Bien qu'à la retraite, je reste un enseignant : j'aime apprendre et partager ensuite.

🙂

  • J'aime 1
  • Merci ! 1
Lien vers le commentaire
Partager sur d’autres sites

  • 2 months later...
Le 25/05/2021 at 14:31, fran6p a dit :

Marlin 2.0.8.1, configuration.h, section  : «Filament Runout Sensors» ≃ lignes 1275 et plus 😉

🙂

Merci, ça va m'aider aussi car j'avais le même souci avec mon détecteur cablé sur le port et codé suivant cette vidéo

mais ça marchait pas quand il n'y avait plus de fil dans le détecteur il se passait rien du tout, ça continuait d'imprimer.

Lien vers le commentaire
Partager sur d’autres sites

Le 25/05/2021 at 14:31, fran6p a dit :

Marlin 2.0.8.1, configuration.h, section  : «Filament Runout Sensors» ≃ lignes 1275 et plus 😉

🙂

Bonjour à toi, je me permet de rebondir car j'ai un souci avec mon détecteur de fin de filament BIQU Filament Break Detection Module de capteur d'imprimante 3D Accessoire avec câble de 1 m pour filament extrudeuse 1,75 mm Matériel de détecteur Run-Out pour imprimante 3D (blanc): Amazon.fr: Commerce, Industrie & Science

Et rien ne fonctionne quand il n'y  a plus de fil dans le détecteur l'impression continue.

As tu une idée ?

 

FICHIER CONFIGURATION.h
#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
  #define NUM_RUNOUT_SENSORS   1          // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
 
  #define FIL_RUNOUT_STATE     HIGH        // Pin state indicating that filament is NOT present. (PAR DEFAUT LOW)
  #define FIL_RUNOUT_PULLUP               // Use internal pullup for filament runout pins.
  //#define FIL_RUNOUT_PULLDOWN           // Use internal pulldown for filament runout pins.
  //#define WATCH_ALL_RUNOUT_SENSORS      // Execute runout script on any triggering sensor, not only for the active extruder.
                                          // This is automatically enabled for MIXING_EXTRUDERs.
 
  // Override individually if the runout sensors vary
  //#define FIL_RUNOUT1_STATE LOW
  //#define FIL_RUNOUT1_PULLUP
  //#define FIL_RUNOUT1_PULLDOWN
 
  //#define FIL_RUNOUT2_STATE LOW
  //#define FIL_RUNOUT2_PULLUP
  //#define FIL_RUNOUT2_PULLDOWN
 
  //#define FIL_RUNOUT3_STATE LOW
  //#define FIL_RUNOUT3_PULLUP
  //#define FIL_RUNOUT3_PULLDOWN
 
  //#define FIL_RUNOUT4_STATE LOW
  //#define FIL_RUNOUT4_PULLUP
  //#define FIL_RUNOUT4_PULLDOWN
 
  //#define FIL_RUNOUT5_STATE LOW
  //#define FIL_RUNOUT5_PULLUP
  //#define FIL_RUNOUT5_PULLDOWN
 
  //#define FIL_RUNOUT6_STATE LOW
  //#define FIL_RUNOUT6_PULLUP
  //#define FIL_RUNOUT6_PULLDOWN
 
  //#define FIL_RUNOUT7_STATE LOW
  //#define FIL_RUNOUT7_PULLUP
  //#define FIL_RUNOUT7_PULLDOWN
 
  //#define FIL_RUNOUT8_STATE LOW
  //#define FIL_RUNOUT8_PULLUP
  //#define FIL_RUNOUT8_PULLDOWN
 
  // Commands to execute on filament runout.
  // With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c")
  // NOTE: After 'M412 H1' the host handles filament runout and this script does not apply.
  #define FILAMENT_RUNOUT_SCRIPT "M600"
 
  // After a runout is detected, continue printing this length of filament
  // before executing the runout script. Useful for a sensor at the end of
  // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
  //#define FILAMENT_RUNOUT_DISTANCE_MM 25
 
  #ifdef FILAMENT_RUNOUT_DISTANCE_MM
    // Enable this option to use an encoder disc that toggles the runout pin
    // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
    // large enough to avoid false positives.)
    //#define FILAMENT_MOTION_SENSOR
  #endif
#endif
 
 
ET FICHIER CONFIGURATION_ADV.H
 
**
 * Advanced Pause for Filament Change
 *  - Adds the G-code M600 Filament Change to initiate a filament change.
 *  - This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
 *
 * Requirements:
 *  - For Filament Change parking enable and configure NOZZLE_PARK_FEATURE.
 *  - For user interaction enable an LCD display, HOST_PROMPT_SUPPORT, or EMERGENCY_PARSER.
 *
 * Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park.
 */
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
  #define PAUSE_PARK_RETRACT_FEEDRATE         60  // (mm/s) Initial retract feedrate.
  #define PAUSE_PARK_RETRACT_LENGTH            2  // (mm) Initial retract.
                                                  // This short retract is done immediately, before parking the nozzle.
  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE     10  // (mm/s) Unload filament feedrate. This can be pretty fast.
  #define FILAMENT_CHANGE_UNLOAD_ACCEL        25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
  #define FILAMENT_CHANGE_UNLOAD_LENGTH      100  // (mm) The length of filament for a complete unload.
                                                  //   For Bowden, the full length of the tube and nozzle.
                                                  //   For direct drive, the full length of the nozzle.
                                                  //   Set to 0 for manual unloading.
  #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE   6  // (mm/s) Slow move when starting load.
  #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH     0  // (mm) Slow length, to allow time to insert material.
                                                  // 0 to disable start loading and skip to fast load only
  #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE   6  // (mm/s) Load filament feedrate. This can be pretty fast.
  #define FILAMENT_CHANGE_FAST_LOAD_ACCEL     25  // (mm/s^2) Lower acceleration may allow a faster feedrate.
  #define FILAMENT_CHANGE_FAST_LOAD_LENGTH     0  // (mm) Load length of filament, from extruder gear to nozzle.
                                                  //   For Bowden, the full length of the tube and nozzle.
                                                  //   For direct drive, the full length of the nozzle.
  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE       // Purge continuously up to the purge length until interrupted.
  #define ADVANCED_PAUSE_PURGE_FEEDRATE        3  // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
  #define ADVANCED_PAUSE_PURGE_LENGTH         50  // (mm) Length to extrude after loading.
                                                  //   Set to 0 for manual extrusion.
                                                  //   Filament can be extruded repeatedly from the Filament Change menu
                                                  //   until extrusion is consistent, and to purge old filament.
  #define ADVANCED_PAUSE_RESUME_PRIME          0  // (mm) Extra distance to prime nozzle after returning from park.
  //#define ADVANCED_PAUSE_FANS_PAUSE             // Turn off print-cooling fans while the machine is paused.
 
                                                  // Filament Unload does a Retract, Delay, and Purge first:
  #define FILAMENT_UNLOAD_PURGE_RETRACT       13  // (mm) Unload initial retract length.
  #define FILAMENT_UNLOAD_PURGE_DELAY       5000  // (ms) Delay for the filament to cool after retract.
  #define FILAMENT_UNLOAD_PURGE_LENGTH         8  // (mm) An unretract is done, then this length is purged.
  #define FILAMENT_UNLOAD_PURGE_FEEDRATE      25  // (mm/s) feedrate to purge before unload
 
  #define PAUSE_PARK_NOZZLE_TIMEOUT           45  // (seconds) Time limit before the nozzle is turned off for safety.
  #define FILAMENT_CHANGE_ALERT_BEEPS         10  // Number of alert beeps to play when a response is needed.
  #define PAUSE_PARK_NO_STEPPER_TIMEOUT           // Enable for XYZ steppers to stay powered on during filament change.
 
  //#define PARK_HEAD_ON_PAUSE                    // Park the nozzle during pause and filament change.
  //#define HOME_BEFORE_FILAMENT_CHANGE           // If needed, home before parking for filament change
 
  //#define FILAMENT_LOAD_UNLOAD_GCODES           // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
  //#define FILAMENT_UNLOAD_ALL_EXTRUDERS         // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
Lien vers le commentaire
Partager sur d’autres sites

D'après la documentation de Bigtreetech, il manque quelques infos dans ton configuration.h

Il y a 2 heures, FBR39120 a dit :

#define FIL_RUNOUT_STATE     HIGH <= devrait être LOW (les versions plus anciennes de Marlin utilisent true / false et le nom est différent (FILAMENT_RUNOUT_INVERTING)

Si tu peux utiliser Pronterface quand l'imprimante est connectée en USB à ton PC, le meilleur moyen de tester les contacteurs de fin de course (endstop) y compris donc un détecteur de fin de filament, c'est d'utiliser le G-code M119 qui renvoie l'état du capteur  (triggered (déclenché) ou pas). ça permet surtout de vérifier s'il fonctionne et sa logique de fonctionnement.

Il y a 2 heures, FBR39120 a dit :
// After a runout is detected, continue printing this length of filament
  // before executing the runout script. Useful for a sensor at the end of
  // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
  //#define FILAMENT_RUNOUT_DISTANCE_MM 25 <= décommenter et mettre une valeur 7 mm par exemple
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
    // Enable this option to use an encoder disc that toggles the runout pin
    // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
    // large enough to avoid false positives.)
    //#define FILAMENT_MOTION_SENSOR <= décommenter pour activer le détecteur de blocage filament ou colmatage de tête

Le document PDF de BTT est basé sur une version pas à jour de Marlin, il faut donc «interpréter» certaines constantes / variables / directives de compilation.

Pense également, en fonction de la carte mère utilisée et de l'endroit où ce détecteur est branché, à vérifier que c'est la bonne «pin» qui est déclarée dans le fichier de broches (pins) correspondant à la carte installée.

🙂

Modifié (le) par fran6p
Lien vers le commentaire
Partager sur d’autres sites

Il s’agit d’une carte creality 4.2.7 le détecteur est branché sur le Pre Set Port.

Je pensais que le câblage était inversé mais en fait non.

 

B24CA2F6-F238-4D63-AADD-9D7F9625F1F4.jpeg

9486D16F-1152-4808-A817-65A734D00242.jpeg

A7F56568-C69B-4645-A782-17B7AF0D6F40.jpeg

image.jpg

Lien vers le commentaire
Partager sur d’autres sites

Je comprends mieux. Ton détecteur c'est un «classique» endstop et pas celui «évolué» de Bigtreetech (Biqu et Bigtreetech sont les mêmes fabricants 😉 ).

Le tien possède trois fils : Vcc (3,3 / 5 V), GND et Signal (Rouge, noir, blanc).

Tes photos ne sont pas agrandissables, je ne peux donc lire le schéma de la seconde photo. Le seul emplacement sur la carte où l'on peut placer la fiche de connexion c'est l'emplacement sous les prises pour ventilateurs et entre le X- et la cartouche de chauffe.

IMG_E1662.thumb.JPG.9be27962014d187674eedaaa9587d5dd.JPG

D'après la sérigraphie au dessous du PCB, l'ordre des fils est VGS (qu'il faut inverser sur le dessus) donc l'ordre des couleurs devrait être Blanc/Noir/Rouge dans la prise  de la carte.

IMG_1699.thumb.JPG.a86f25ae03bf883bdfcc017d6467480c.JPG

D'après la déclaration des pins pour la carte v4.2.7, la broche «signal» est connectée sur PA4 du micro-contrôleur :

Citation

//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
  #define FIL_RUNOUT_PIN                    PA4   // "Pulled-high"
#endif

 

Elle est «pulled-high» donc c'est bien «#define FIL_RUNOUT_STATE     HIGH » qu'il faut déclarer.

Par contre il faut désactiver «#define FILAMENT_MOTION_SENSOR» en remettant les // en début de ligne (cette activation est nécessaire pour des détecteurs de blocage du filament). Donc tu devrais avoir quelque chose comme :

Citation
#define FILAMENT_RUNOUT_DISTANCE_MM 7
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
    // Enable this option to use an encoder disc that toggles the runout pin
    // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
    // large enough to avoid false positives.)
    //#define FILAMENT_MOTION_SENSOR

Il faut par contre être certain que les couleurs du câblage (blanc pour Signal, noir pour Ground et rouge pour Vcc) sont bien celles là :

v427-filament-detecteur.jpg.2bb0430a13b5ab4c98cf968f8400448c.jpg

🙂

Lien vers le commentaire
Partager sur d’autres sites

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant
  • Sur cette page :   0 membre est en ligne

    • Aucun utilisateur enregistré regarde cette page.
  • YouTube / Les Imprimantes 3D .fr

×
×
  • Créer...