Welcome! Log In Create A New Profile

Advanced

Need some marlin configuration help

Posted by Jeffwb2u 
Need some marlin configuration help
January 31, 2022 03:19PM
I have an Ender 3 Pro, and I am trying to build a version of Marlin Firmware that works with both my EZABLbed level and my BTT Smart Filament Sensor. I have added everything that I need for the EZABL and what I need for the Smart Filament Sensor. But when I start a print, the filament does an immediate unload and I have to disable the filament sensor to continue printing. The Configuration is for an Ender 3 Pro with a Creality V 4.2.7 mainboard. I have attached the Configuration.h, Configuration_adv.h, and the PIN files for my printer. If anyone has any ideas on what I need to do, I would appreciate it.
Attachments:
open | download - Configuration_adv.h (172.1 KB)
open | download - Configuration.h (48.7 KB)
open | download - pins_CREALITY_V4.h (5.6 KB)
open | download - pins_CREALITY_V427.h (1.4 KB)
Re: Need some marlin configuration help
January 31, 2022 05:59PM
#define FIL_RUNOUT_PIN PA4 // "Pulled-high"
#define ONBOARD_SD_CS_PIN PA4 // SDSS

These are in conflict
Re: Need some marlin configuration help
February 01, 2022 11:05AM
Thanks. Do you happen to know if PA4 is the correct pin for Filament out sensors on the Creality 4.2.7 board?
Re: Need some marlin configuration help
February 01, 2022 07:09PM
#define FIL_RUNOUT_PIN PA4 seem to be correct

but I suspect #define ONBOARD_SD_CS_PIN PA4 is not.

try setting #define ONBOARD_SD_CS_PIN -1
Re: Need some marlin configuration help
February 01, 2022 08:45PM
In Vanilla Marlin 2.0.x, the Same Pin Config files has PA4 defined for both FIL_RUNOUT_PIN and ONBOARD_SD_CS_PIN. So I am not sure that is the problem. What I really need is a diagram that shows the pinout configuration and the pin names for the Creality V 4.2.7 Board.
Re: Need some marlin configuration help
February 01, 2022 10:04PM
Officially No such thing exists, as creality are not good at support.

Un officially [github.com]

It was reverse engineered

None of the pins going to the sd card are PA4

Edited 3 time(s). Last edit at 02/02/2022 04:36AM by Dust.
Re: Need some marlin configuration help
April 19, 2022 08:23AM
Did you ever find a solution to this problem? I'm having the exact same issue with my Ender 3 Pro and a filament runout sensor.
Re: Need some marlin configuration help
April 19, 2022 12:37PM
Not yet. All of the companies involved are being a Pain in the rear about giving up any information. I originally thought it was a Pin Issue, but now I am not so sure. Working with a group on Marlin.crc.id.au i have verified that the BTT Smart Filament sesor uses Pin PA4. So it must be something else. maybe the filament isn't moving enough during the bed leveling and it's triggering a filament unload. As it stands now, I am just not using the Filament Sensor and just living with any failed prints that I am having.
Re: Need some marlin configuration help
April 19, 2022 02:32PM
On my BTT sensor I was getting false triggers so I increased FILAMENT_RUNOUT_DISTANCE_MM from 7 to 10.

Does your bed levelling involve putting down filament on the bed? If not then the following may be of interest. It's in the default Marlin configuration.h file but not in your version:
* 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.
Re: Need some marlin configuration help
April 19, 2022 07:48PM
Ah see I'm not using a smart sensor, just a regular endstop switch type of sensor. Mine was immediately triggering an unload until I inverted the pin position in Marlin. But now it's not doing anything. I have it set to pin High to trigger unload and use internal pulldown. Still nothing. I've tried every combination of switch orientation and pullup and pulldown with no luck. I'm afraid to to what the guy above says and remap the SD card from PA4 to P -1 because I don't want to end up in a situation to where the SD card slot doesn't work and I cant flash the firmware (or print anything for that matter).
Re: Need some marlin configuration help
April 20, 2022 01:22AM
My Slicer (Cura) adds this Gcode to the beginning of every print.

M117 Print Starting...
M75 ; Start Print Timer and Engage Fil Sensor if USB Printing
M84 E ; Disable E Motor for probe accuracy on direct drive systems
M117 Antiblob retract...
G92 E0 ; Reset Extruder distance to 0
G1 E-2 ; Retracts filament to prevent blobs during probing
G92 E0 ; Reset Extruder distance to 0
M117 Homing All...
G28 ; home all axes
M117 Homing Z Probe...
G28 Z ; home z again
M117 Generating mesh...
G29; auto bed leveling
M117 Heaters Recovering...
G4 S10; wait for heaters to recover
M420 Z0; Z fade
M900 K0; LA

M117 Purging extruder...
G92 E0 ; reset extruder
G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
G1 X0.1 Y20 Z0.3 F5000.0 ; move to start-line position
G1 X0.1 Y100.0 Z0.3 F500.0 E15 ; draw 1st line
G1 X0.4 Y100.0 Z0.3 F5000.0 ; move to side a little
G1 X0.4 Y20 Z0.3 F500.0 E30 ; draw 2nd line
G92 E0 ; reset extruder
G1 Z1.0 F3000 ; move z up little to prevent scratching of surface

M117 Printing.....

So it looks like it starts the Print Timer, then Homes the extruder and then Generates the Mesh. After the heaters recover, it purges 2 lines of filamnent, Resets the Extruder and then starts the print. So for most of the homing and leveling, the Filament is not going to move. (There is a little retraction during probing, and then nothing until the purges. That's whzt s causing the problem I thinl. The Filament doesn't send any movement pulses for >30 seconds and it's unloading the filament.

I just don't know what I need to to do fix it..maybe move M75 to the bottom above the second M117 Printing... Message?


Quote
[email protected]
On my BTT sensor I was getting false triggers so I increased FILAMENT_RUNOUT_DISTANCE_MM from 7 to 10.

Does your bed levelling involve putting down filament on the bed? If not then the following may be of interest. It's in the default Marlin configuration.h file but not in your version:
* 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.

Edited 1 time(s). Last edit at 04/20/2022 01:24AM by Jeffwb2u.
Re: Need some marlin configuration help
April 20, 2022 01:31AM
I don't see any nice options.

Is there a free I/O pin you can use instead of PA4 for the filament out sensor? This is a safe option but requires a custom cable.

IF the above referenced schematic is correct then the SD card isn't tied to PA4. As I read the schematic, SDSS is actually tied to PC11. Typing in the M43 command will get you a list of all the pins along with the name(s) of the signals attached to them. To enable M43 you need to enable PINS_DEBUGGING in configuration_adv.h

I got a headache trying to understand the implications of what you see with M43.
  1. ...If SDSS is listed for PA4 only then the schematic is wrong and PA4 can't be used for the filament out sensor.
  2. ...If SDSS is listed for PC11 only then the schematic is correct and you are safe to use PA4 for the filament out sensor. BUT then I don't understand why you haven't been able to get your sensor to work properly. In this case please attach you configuration and pins files (maybe I can spot something).
Re: Need some marlin configuration help
April 20, 2022 11:48AM
I don't have any way of sending commands directly to the printer. I plan on getting Octoprint setup at some point,

I could setup a gcode file with just that command, but I am not sure how that will display on the default display for an ender 3.

I am beginning to think it's not a pin issue. Plain old vanilla Marlin has the pin PA4 in the file the same way, and my Filament Sensor worked just fine before I added the EZABL bed leveler.

But then again, I am only a beginner at this so what do I know?


Quote
[email protected]
I don't see any nice options.
Is there a free I/O pin you can use instead of PA4 for the filament out sensor? This is a safe option but requires a custom cable.

IF the above referenced schematic is correct then the SD card isn't tied to PA4. As I read the schematic, SDSS is actually tied to PC11. Typing in the M43 command will get you a list of all the pins along with the name(s) of the signals attached to them. To enable M43 you need to enable PINS_DEBUGGING in configuration_adv.h

I got a headache trying to understand the implications of what you see with M43.
  1. ...If SDSS is listed for PA4 only then the schematic is wrong and PA4 can't be used for the filament out sensor.
  2. ...If SDSS is listed for PC11 only then the schematic is correct and you are safe to use PA4 for the filament out sensor. BUT then I don't understand why you haven't been able to get your sensor to work properly. In this case please attach you configuration and pins files (maybe I can spot something).
Re: Need some marlin configuration help
April 20, 2022 04:20PM
It is definitely either a runout distance problem, or it's a pin problem. I enable the runout sensor after a print had started and it printed for a a second after the enablement, then it went into the M200 filament out routine. So it's not t time out issue with the M75 command, because the Print timer had already started. Seems like it's either I need to change the FILAMENT_RUNOUT_DISTANCE_MM, or it's a wrong pin. I am going to recompile this with FILAMENT_RUNOUT_DISTANCE_MM 10 instead of 7 and see what it does.
Re: Need some marlin configuration help
April 20, 2022 06:02PM
In configuration.h, make sure #define FILAMENT_RUNOUT_DISTANCE_MM is commented out. If active it could explain why it errors our after a short time moving filament.
Re: Need some marlin configuration help
April 20, 2022 06:05PM
#define FILAMENT_RUNOUT_DISTANCE_MM should only be active if you have a sensor that detects motion.

A simple mechanical switch just detects if the filament is present or not. This type of sensor must have it commented out.
Re: Need some marlin configuration help
April 20, 2022 06:55PM
The Big Tech Smart Sensor is a motion detecting sensor. it's really just a mouse wheel that the filament is pressed against, and it sends a signal high every few millimeters of filament that moves across it. If this was just a switch, that would be easy. I could install the Th3D Studios EzOut Filament runout detector and call it a day. But simple detectors like that wont detect if the spool snags, or if the filament breaks at the extruder. (Both of which have happened to me.) A Smart sensor can stop a print before there is too much gapping, so that you can unsnag the spool, or replace the Filiament, and continue your print without serious damage. (It's great when it saves a 20+ hour print). With this set up, really all I have to worry about is loss of adhesion on the bed to fail a print.

Quote
[email protected]
#define FILAMENT_RUNOUT_DISTANCE_MM should only be active if you have a sensor that detects motion.

A simple mechanical switch just detects if the filament is present or not. This type of sensor must have it commented out.
Re: Need some marlin configuration help
April 20, 2022 07:23PM
I was confused about who had what sensor.

Yes, going from 7 to 10 is a reasonable next step since you're using the BTT smart sensor.
Sorry, only registered users may post in this forum.

Click here to login