-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trinamic plugin not supported? #41
Comments
Wiring? The pico_cnc_map.h is for a board with connection to external drivers so not well suited for (on board) Polulu style drivers. However, it can be wired for external TMC2209 drivers in UART mode by modifying the map file. See the btt_skr_pico_10_map.h for how to do that. Note that a single (soft) UART per driver is not supported, only a common UART for all. This limits max drivers/motors to 4. |
Hi @terjeio, Thanks for the tip. I'll just hi-jack this issue now that I'm a little more familiar with the codebase, and have a somewhat working picocnc board. I've current populated it with a single tmc2209 (fysetc 3.1) mapped to the z-axis. I'm also trying to use gpio0 (tx), and gpio1 (rx) to get comms going. There's a 1K resistor between TX and UART_PDN, and RX(pico)), as per the tmc2209 datasheet. So far i'm not having any luck. I'm receiving the "Could not communicate with driver" for all values of $338. Right now i'm using a simple
while I found some pre_init magic from a similar-ish issue on the ESP32 board.
The board_init is calling this function. I've modified serialxInit to use uart0, which I'm assuming is not a problem. Anyway, any help is appreciated. All the best, WakA |
Happy tidings for the new year. It appears the motor supply (V_s) is required before it responds to commands. 🎇 |
Pin mappings are mostly done in the MCU specific driver.c via #defines in a board map file. The core communicate pin state changes of the pins via functions (function pointers) set in the HAL structure by driver.c at startup - so the core has not idea about how the actual hardware is working.
Correct - when a single UART is used for communicate with all (up to 4) the TMC2209 drivers. The slave address set for the driver has of course to match that. Separate (soft) UARTs, one per driver, can also be used - this typically use slave address 0 for all and then the Techincal documentation is a sore point, I have started using doxygen to create it from the source but there is a lot more work to do before that is finished. |
Thanks, the structure of the HAL abstraction layer is becoming a little more clear as I go a long. Still, yes, more documentation is more better :) Keep up the good work! My UART is working great now. I'm now in the process of trying to get sensorless homing going, and hope you have some advice. My general approach is xlimit and ylimit pin mapping to the DIAG pin of the tmc2209. Which I'm hoping is the correct approach. I'm finding that the motor moves just fine with some basic settings ($10x - steps/mm, $110- max rate, etc), a relative move G91 works just fine. Here's a list of events, attempting to debug this issue:
I'm also curious the usual approach to tuning StallGuard within grblHAL, if indeed there is one. Is it the intention to have M122 X S1 enabled during $HX homing sequence for example, and are these results then e.g. reliable. I'd be happy to make a little document describing any steps when I've eeked out my machine. WakA |
Cannot answer that as I do not remember. I will have to go back to the datasheet myself...
Meaning that sensorless homing is working?
No, currently I use the output for the Trinamic tuning tab in ioSender. There motion commands (G1) can be sent and a graph is plotted using the reported values.
That would be nice. Not that some parameters are hardcoded in trinamic.h.
Well, I find the whole tuning process quite complicated, motor characteristics, feed rate, acceleration, load and what not affects the results. |
OK, I think i figured some stuff out. I've raised some issues terjeio/Trinamic-library#6 I'll try to do a nice write-up on the tuning-process in the near future. Cheers |
Thanks for digging into this, I'll come back to this after finishing a core update and clearing most of the issue backlog. |
Hey,
I wanted to experiment a little bit using the pico and tmc2209 drivers, in combination with homing/bed scanning. Setting "#define TRINAMIC_ENABLE 2209" throws me an error in pico_cnc_map.h, but seems to not be a problem when manually editing the code to remove it.
Is this still not supported, what is the exact technical problem for compatibility?
Cheers,
waka
The text was updated successfully, but these errors were encountered: