Welcome! Log In Create A New Profile

Advanced

Assigning pins for custom buttons, What Have I missed?

Posted by Mr Kroll 
Assigning pins for custom buttons, What Have I missed?
July 31, 2024 08:05PM
Good afternoon everyone.

I am running a BTT SKR_3_EZ for my controller.
My printer has 1 extruder.

I am trying to set up an Orbiter filament sensor.
I have the runout part of the sensor working well. It is plugged into E0DET pins=[5v,GRD,PC2]

The sensor is designed with an unload button. N/O 4.2v out when triggered.
When I use E1DET for the unloader portion the system goes into a loop; LOAD/UNLOAD/LOAD/UNLOAD - TO INFINITY

I have decided to try to use an unused button on the controller to activate the unloader.
My goal is to set up the unload button as if sensor is reading filament run out. Here is what I have set up so far.

In Marlin I set up;

#define DIRECT_PIN_CONTROL
#define PINS_DEBUGGING
#define CUSTOM_USER_BUTTONS
#define BUTTON1_PIN 68
#define BUTTON1_HIT_STATE HIGH
#define BUTTON1_GCODE "M75\nM600"
#define BUTTON1_DESC "Unloading Filament"

With //#define NEOPIXEL_PIN PE6 commented out in my pins file, MARLIN in the M43 report shows "PIN: PE6 M42 P68 BUTTON1_PIN Input LOW"

For the life of me I can not get the controller to respond to an input on this pin.

With #define NEOPIXEL_PIN commented in, in my pins file, MARLIN in the M43 reports shows "PIN: PE6 M42 P68 BUTTON1_PIN Input LOW"
____________________________________________________________________NEOPIXLE_PIN

What have I missed or mis-understood in what I am attempting here?
Does any one have another approach to accomplish this?

Thank you in advance - Shane
Attachments:
open | download - Configuration.h (126.6 KB)
open | download - Configuration_adv.h (173.3 KB)
open | download - pins_BTT_SKR_V3_0_common.h (20 KB)
open | download - M43Report.txt (9.9 KB)
Re: Assigning pins for custom buttons, What Have I missed?
August 01, 2024 01:08AM
Look at the circuit diagram

PE6 -> SN74LVC1G17 to level shift the voltage from 3.3 to 5v -> RGB pin

There is no way to use the RGB pin as a input due to this buffer

Edited 1 time(s). Last edit at 08/01/2024 01:34AM by Dust.
Re: Assigning pins for custom buttons, What Have I missed?
August 01, 2024 04:06PM
Thank you Dust,

I used The BTT SKR3 EZ V1.0-PIN & the BTT SKR3 EZ V1.0SCH Diagrams to select this pin.
(I just had no idea what a Buffer/Driver is, not sure That I do now, other than they are non-inverting)

I may play with the P.S. on pin and see If I can make it work.
Attachments:
open | download - BIGTREETECH SKR 3 EZ V1.0-SCH.pdf (1.57 MB)
open | download - BIGTREETECH SKR 3 EZ V1.0-PIN.pdf (726.7 KB)
Re: Assigning pins for custom buttons, What Have I missed?
August 01, 2024 11:50PM
the buffer is non inverting and mono directional. ie it cannot be use as input, you would need to connect into the PE6 line before the buffer (ie soldering) , and even then it has a pull down which may interfere with what your trying to do.

The PS on pin looks good to use, goes direct to the MPU pin

Edited 1 time(s). Last edit at 08/03/2024 04:59AM by Dust.
Re: Assigning pins for custom buttons, What Have I missed?
August 02, 2024 09:27AM
Thank you, quickly configured marlin and hooked up to P.S. _ON last night. [It Is responding], Have some GCODE & Dependencies to adjust for functionality.

At least the whole system is not stuck in a load\unload loop like what happened trying to use E0_DET & E1_DET
(Yes, I did read in Marlin one sensor for one extruder) (decided to try it anyways to see if I could find a workaround)
Re: Assigning pins for custom buttons, What Have I missed?
August 03, 2024 04:24AM
Once Again, Thank You Dust!

To sum up; Here is how I got an Orbiter Filament sensor to work well under MARLIN.

Required Dependencies

Configuration.h

#define FILAMENT_RUNOUT_SENSOR
#define FIL_RUNOUT_ENABLED_DEFAULT true
#define NUM_RUNOUT_SENSORS 1
#define FILAMENT_RUNOUT_STATE Low
#define FILAMENT_RUNOUT_PULLDOWN

#define FILAMENT_RUNOUT_SCRIPT "M600"


#define NOZZLE_PARK_FEATURE
#define NOZZLE_PARK_POINT {(X_MIN_POS + 10), (Y_MIN_POS), 4} Machine Specific
#define NOZZLE_PARK_MOVE 0
#define NOZZLE_Z_RAISE_MIN 2
#define NOZZLE_PARK_XY_FEEDRATE 150
#define NOZZLE_PARK_Z_FEEDRATE15

Configuration_adv.h

#define DIRECT_PIN_CONTROL
#define PINS_DEBUGGING Helpful in determining unused pins and there states

#define ADVANCED_PAUSE_FEATURE Many machine specific settings in this group

#define CUSTOM_USER_BUTTONS
#define BUTTON1_PIN [your pin number]
#define BUTTON1_HIT_STATE HIGH
#define BUTTON1_WHENPRINTING true
#define BUTTON1_GCODE "M75\nM600"
#define BUTTON1_DESC "Unloading Filament

Believe it or not I had the hardest time with the M600 component of this. Let me explain, I had forgotten that TFT's are a bit different than LCD'S in how they function.
I had M600 emulation functioning in the TFT firmware. The Filament Change procedure did not function correctly with the emulator working. (lesson learned)

I have set the orbiter up this way to make the machine [lack of coffee proof]

To Unload the filament I hit the unload button. It homes, warms the extruder, and unloads the filament. When its done unloading, and at the host Prompt, "Action Command" - Nozzle parked - [Continue]
I can either hit the TFT reset to be done & unloaded, or I can click [Continue] to load the new filament.

When I haven't had my coffee yet and start a print without filament, it won't leave me alone until it has filament. I hate to admit it, but I have done it.

If I run out of filament mid print, It lets me load a new spool and continues.

If I want to change color mid print, [hopefully I can judge the right point] I can hit the button. It parks, unloads, loads when prompted, and continues.
Attachments:
open | download - Configuration.h (126.6 KB)
open | download - Configuration_adv.h (173.3 KB)
Re: Assigning pins for custom buttons, What Have I missed?
August 18, 2024 01:20AM
Hello Again,

The week after my last posting the printer started miss-behaving.
I have spent a few hours exploring MARLIN [2.1.2.4] each night, trying to resolve the unexpected behavior.
I have also hunted through the start & end code from My slicer and disabled the start and end code of the TFT

When a print Ends the extruder fully unloads.
The filament sensor was connected to the SKR_3
I have disconnected all filament sensor wiring.
I have rebuilt Marlin as follows;

//#define FWRETRACT a bit overkill
//# define CUSTOM_USER_BUTTONS
//# define NOZZLE_PARK_FEATURE
//# define ADVANCED_PAUSE_FEATURE

These are the TFT firmware dependencies; [they were/are commented in this way]

emulated_m600:0
pause_retract:R0.0 P0.0
fil_runout:0

Are there any other firmware settings/dependencies that may be causing this?
How can I further diagnose & correct this problem?

Thank you all in advance - Shane
Attachments:
open | download - Configuration.h (126.8 KB)
open | download - Configuration_adv.h (173.5 KB)
open | download - config.ini (42.2 KB)
open | download - EEPROM settings.txt (1.8 KB)
open | download - gcode.txt (9.3 KB)
open | download - pins_BTT_SKR_V3_0_common.h (20 KB)
open | download - current pin state.txt (9.9 KB)
Sorry, only registered users may post in this forum.

Click here to login