External trigger wired on duex5
-
I have an small rocker switch wired to the duex.e2stop which I'm using to load config.g from different folders.
Also, in the working folder, it is used to trigger an M999 command to restart the board and swap the folders.
The current structure of /sys/ folder is : config.g, trigger2.g, trigger3.g, folders "multi" and "single" which contains all the actual files needed to run.The intended process is this: at powering the machine it should load the files from either "single" or "multi" according to the position of the rocker. This works as intended.
If the rocker changes position at any time it should send M999 command, load config.g from /sys folder and, depending of the new position of the switch, load the config from the working folder. This also works.
These are the config.g from the /sys folders :M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet M581 P"duex.e2stop" T2 M581 P"!duex.e2stop" T3 M582 T3 M582 T2
trigger2.g
M581 P"nil" T2 C0 M581 P"nil" T3 C0 M505 P"single" M98 P"config.g"
trigger3.g
M581 P"nil" T2 C0 M581 P"nil" T3 C0 M505 P"multi" M98 P"config.g"
The problem starts when printer is in "single" mode. If I try to heat up the bed the printer will restart and load the "multi" folder as if I switched the rocker. It basically changes polarity as soon as I try to heat the bed up. Once it restarts in "multi" mode , the rocker won't restart the printer anymore, I have to send m999 from console. Worth mentioning that the bed is connected to the duet board , not the duex. And also , heating the hotend will not switch the polarity of the trigger.
In "multi" mode it works as intended
For the sake of simplicity, I'll copy here only relevant parts from the /sys/single/config.g :M550 P"Duet Single" ; set printer name ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 R-1 ; physical drive 0 disabled for single mode (U) M569 P1 R-1 ; physical drive 1 disabled for single mode (W) M569 P2 R-1 ; Z drive disabled (I burnt the driver) M569 P3 Y3:3:1 F12 S1 ; physical drive 3 disabled for single mode (E) M569 P4 S1 ; physical drive 4 goes forwards X axis (X) M569 P5 Y3:3:1 F2 S1 ; physical drive 5 goes forwards Z axis (Z1) M569 P6 Y3:3:1 F2 S1 ; physical drive 6 goes forwards Z axis (Z2) M569 P7 S0 ; physical drive 7 goes backwards Y axis (Y) M569 P8 R-1 ; physical drive 8 disabled for single mode (V) M584 E3 A3 X4 Z5:6 Y7 P3 ; set drive mapping ; Endstops M574 X1 S1 P"e1stop" ; configure active-high endstop for low end on X M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y M574 Z1 S2 ; configure Z-probe endstop for low end on Z M574 A2 S1 P"!e0stop" ; configure false extruder A axis endstop M581 P"!duex.e2stop" T3 C0 ; configure external button to change modes (single -> multi) ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M307 H0 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M143 H1 S280 ; set temperature limit for heater 1 to 280C M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit
/sys/single/trigger3.g contains only a M999 command for now (eventually will contain some conditions to warn if the printer is in a job and rocker is pressed.
-
The complete folder structure and files from my /sys folder can be found here.
-
I did some tests to rule out wiring issues. I deleted all M581 commands from /sys/config.g and started the printer in “single” folder. Now it is heating the bed without restarting the board but the switch is not triggering even if it is defined in /sys/single/config.g . So it’s not a roblem with the wiring.
I’ve had weird issues with endstops on duex5 before (X,Y hiting endstops during homing but continue movement)so I moved all endstops on the duet board. I will have to try that to make sure my files are correct. -
It sounds like a ground noise issue to me. Is the ground side of the VIN terminal block on the DueX5 connected directly to the corresponding terminal of the Duet by a short thick wire, as described in the DueX5 wiki pages?
-
@dc42 I canged the PSU some time ago.I’ll check that wire, I might have forgot about it.
-
Yes, it was that short wire. I forgot to connect one end to the duet board.
-
So it's working now?
-
Yes, everything is working as intended.It is still not working...
Same as before, it restarts, in /multi folder and , after that M999 doesn't do anything. I have to power off/on manually. -
@Ntrack said in External trigger wired on duex5:
Yes, everything is working as intended.It is still not working...
Same as before, it restarts, in /multi folder and , after that M999 doesn't do anything. I have to power off/on manually.Does it work after changing the rocker switch apart from not responding to M999?
If you send M115 after changing the rocker switch, does it still report the presence of the DueX ?
-
M115 doesn't show the Duex and also console reports random weird over temperature warnings on drivers when I try to home the printer .
In single mode it works until current is sent to the bed.I mean that I can set it as active and it will not reset, but it resets in multi as soon as I set a temperature and the bed starts heating.Once it resets in multi M115 does not show the duex and over temp warnings show up if I try to home the printer . -
@Ntrack said in External trigger wired on duex5:
M115 doesn't show the Duex and also console reports random weird over temperature warnings on drivers when I try to home the printer .
In single mode it works until current is sent to the bed.I mean that I can set it as active and it will not reset, but it resets in multi as soon as I set a temperature and the bed starts heating.Once it resets in multi M115 does not show the duex and over temp warnings show up if I try to home the printer .I can also home only X axis (Z and Y being connected on duex, U and W won't home even if they are on duet wifi and configured as sensorless). Also I noticed that M999 does work somewhat - X axis appears as not homed after it - but it stays in multi mode.
-
@Ntrack said in External trigger wired on duex5:
In single mode it works until current is sent to the bed
That indicates that you still have a problem with the power wiring. The negative wire from the PSU must go to the negative VIN terminal of the Duet, and from there via a short thick wire to the negative VIN terminal of the DueX. Do not use a separate wire from the negative VIN terminal of the DueX to the PSU.
The positive VIN wiring is less critical, but is best done in the same way.
-
I’m redoing all the wiring just in case. How short the wires from diet to duex should be?
-
@Ntrack said in External trigger wired on duex5:
I’m redoing all the wiring just in case. How short the wires from diet to duex should be?
Those VIN wires (especially the ground one) should be as short as possible. With the two boards mounted next to each other, there is on reason for them to be longer than 120mm. The wires from the PSU should go to the Duet VIN block first, then wires from the Duet to the DueX VIN block. This ensures that bed heater current doesn't flow in the wires between the Duet and DueX.
-
I redid the wiring that way and it works now. I left both the positive and negative 12cm short.Thank you.