Using Expansion Mini 2+ on Duet 2 Ethernet
-
Just hoping someone can advise on the given scenario.
I have a Duet 2 Ethernet + DueX5 running a coreXY tool changer beast (slightly larger than usual with 6 different tools and triple axis Z) so have used all the 10 standard breakout stepper drivers ports.
My latest modification is to be an eight filament auto-feeder/changer allowing for lots of colour changes. In order to make it work I need to leverage the last 2 stepper dir/stp pin pairs on the LCD header. Now, I can run those out to a breadboard, pop a couple of stepper drivers in, etc etc or was wondering if I can use the Mini 2+ expansion board.
The board's pin in shown below, specify the standard STEP, DIR, Vcc, GND, etc for each but also a DIAG for each stepper, S_UART_B, and what I assume is a "universal" EN for both stepper drivers (ie pull up/down and it's applied to both steppers)
The pinouts for the last two steppers on Duet 2 (CONN_LCD) are shown in the next image, but are basically the STEP, DIR, EN, GND, and Vcc.
Correct me if I'm wrong, but I could connect the respective STEP & DIR pins, GND, +3.3V, and say one EN pin from the 2x5 pin header on Duet 2 to their mates on the 1x16 header of the Mini, jump the GND across in the connecting cable, add a VIN (regulated/fused) from a suitable power pin and hope things don't let out the magic smoke...
I'm still left with the two DIAG pins and the S_UART_B pin - which, something tells me relate to stall detection and setting appropriate currents, microsteps, etc for the stepper motors. The TMC datasheet says parallel drivers can be sent the same UART settings if the same, so I assume that's the magic there... but the secret magic is how to trigger that, ie send the appropriate values to the TMC registers to set everything. For this I'm hoping that dc42 (or colleague) in his infinite wisdom can advise? I can ignore the DIAG I believe because given the design of the Mini 2 it's only real use must be stall detection.
To make matters more fun I'm also already using the I2C header to control 8 sets of servos and sensors using an SX1509.
Oh, and Merry Christmas everyone!
-
don't forget the 5V (also available at conn_sd). I believe you are right about the diag pin, no idea where to grab enable and uart from.
-
So I took a chance - what's the point of experimenting if you aren't willing to risk a 50 quid piece of kit?!
It works as I expected, I had a look through the TMC2209 reference material and so long as I'm happy with the defaults I can run it. If I wanted to chance things I can potentially wire the UTXD1 (ESP comms) to the UARTB pin of the Mini 2+ - as I am using the ethernet board that doesn't use these pins. Using M118 P5 S"xxxx" GCode I could send the desired values to the appropriate registers - however I would need to calculate the CRC values for the TMC2209 manually (doable, as the algorithm is noted).
Just thought I'd update on the success in case someone happens to hit this thread with similar issues or questions.
Happy New Year all.
-
-
A further update and a moment of head banging/thinking aloud...
While the stepper motors work as expected, without sending a bunch of mystical runes to the TMC2209 chips via the UART port, the current flow is causing "toasty" steppers. As I am using a PanelDue I tried to jump the UTXD1 pin from the ESP32 port (not used) to the Mini 2+, only to discover that it doesn't seem to actually allow external access via M575 P2... trying the UTXD0 port that the PanelDue would otherwise work resulted in the next problem that I can't seem to resolve - actually sending the mythic runes (ASCII representations of the HEX codes I want to send). It seems that M117 will only send character strings, not hex values.
M118 P2 S"ìU»ìU="
Error: M118: control character in stringIf I could send a bunch of HEX values directly I can bypass "control character" by feeding the TMC the desired string (05 EC 10 55 BB 05 EC 10 02 55 3D 05 90 01 1A FF 05 90 01 1A 0A E6) more or less "hey, can you maybe look at setting IRUN to 800mA, thanks, I don't like my steppers melting" - other mystic runes set microstepping, StealthChop etc etc.
Anyone figured out how to send fancy fancy via M117? Failing this I shall have to figure out another way to send the settings... or resort to old school external stepper drivers with trimpots and jumpers to set what I need.