Duet 3 Toolboard - UART to motor

  • Hello everyone.

    I would like to modify Duet 3 Toolboard. Everything as is, only without using a TMC motor driver. I need UART output with simple information (words) including CW/CCW direction, speed, and final position.
    Is possible to remap IO2 for that application?

    After some reading of the forum and firmware on GitHub, I become a bit lost. Do you have some recommendations on how to do it and hints where to start?

    Of course, the easiest way is to use Step/Dir from the board, but I still hope there should be some not too much difficult way how to do via UART.

    Thank you, best regards

  • You'd need to check the datasheet for the atmel microcontroller to see if the pins used for IO2 can function as an UART; there is a thread that looks into that with respect to i2c and iirc pins that can do i2c could also do uart. in any case there may be some refrences to the datasheet in that thread (but couldn't find it just now)

  • administrators

    You might find it easier to use a SammyC21.

  • Hello, thank you for your fast reply.
    Regarding the IOs, I found this table 67f1b798-1a8c-477f-af18-b569e78ade1f-image.png so if I understand well, IO_0 in/out should be used with no problem.
    Anyway, the bigger issue is coding. Is possible to make it some easy way or I need to make my own UART library.

  • administrators

    There is already a UART support class in the firmware.

  • @dc42 That's great, so do I need to program C code on the Duet 3 FW layer or only configuration on the RR FW layer? I am still not really familiar with that. This is my first time using Duet 3 and needs so big modification.
    What I need is control of the heater, fans, and extruder but with no integrated stepper driver. So everything on Toolborad should stay the same, only the information for motor needs via UART.
    Do you have some documentation where can I find some hints close to my needs?
    Thank you very much, BR

  • administrators

    You would needs to program C code in the tool board firmware. You can find the code in the Duet3D github in project Duet3Expansion. The dev version uses project CoreN2G for most of the hardware interface, and that project provides a UART class.

Log in to reply