-
Notifications
You must be signed in to change notification settings - Fork 100
Driver Trinamic 5160 - SKR3EZ MB don't communicate with IOSender #381
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
Comments
Motor power is on before booting the controller? If not communication will fail. There is not much I can do without access to a board as it uses soft SPI for communicating with the drivers. Enabling a single driver with $338 and using a logic analyzer or oscilloscope to check that the signalling is ok is one way forward, another is to set breakpoints in the driver code to see what the drivers responds with. Can you, or @dresco, do that? |
Yes, the motors is power on before boot. Yes, I send M122I and the answer is the same (Could not communicate with stepper driver!). This M122I command was made for all 4 axes first and then separately with only 1 of the axes enabled (1 at a time). I don't have an oscilloscope available but I'll try to get one to evaluate the signals from the drives. I think that next weekend I will have some results, answers. For now, thank you very much for your help... |
Hi, afraid I'm still travelling at the moment, without access to any development hardware.. There was this issue raised on the H7 repo, but it shouldn't affect the PlatformIO or web builder builds. |
Hi, just back home and looking into this. It does appear to be working fine for me. Testing with a single 5160 breakout board attached via jumper wires, as I don't have the EZ5160 plug-in modules. Are you able to share your build configuration? |
Hi Dresco, It doesn't matter the configuration. For testing, I put in the standard firmware, and the dimensions of X, Y and Z only. No other information has been added and even so, the drivers not communicating message remains (via IO-Sender send M122 I and the message continues)... In my opinion, the hardware is not configured (drivers or libraries are missing), but this is just speculation because I don't have the expertise... |
Adding... I'm new to GRBL... But I've had some experience in Marlin (I have a 3D_Printer) for a few years now. Take a look at my comparison... When I turn on 3DPrinter, the "positions" of the axes appear with values, "crazy, weird" numbers but after referencing (home position) these values, numbers become "cute, suitable". On the CNC when I turn it on, the numbers are at "ZERO". And since I can't "reference" due to the communication error (drivers don't communicate), these numbers don't change... |
What exactly is this "standard firmware" though? Are you building through the web builder or locally. and what options are you using? It would be helpful to see the build configuration either way. I think it is most likely to be a configuration issue, as it seems to be working as expected here.. |
$338 is set to enable the drivers? For a 3 axis machine set $338=7. There are other related settings as well as some M codes that can be used to query driver status etc. |
Hi, am a bit confused, you shouldn't have to change anything for compilation to complete. The CI workflow test builds all environments from platformio.ini each time the H7 GitHub repo is updated.. Could you perhaps have a mismatch of driver and submodule versions? It would be a more common workflow just to clone the repo and it's submodules in one command, e.g. I committed a couple of small updates this morning, and this is the CI generated firmware for the |
Following your comments and notes, I downloaded the firmware.zip attached. Same issue. Then via GitHub Desktop I cloned the repository (cool, it comes complete, I don't need to "handle" anything). But it also has the same issue. I still have the message of "could not communicate with the stepper drives". |
the infos... |
One note... the version of the grbl is out of date (when I downloaded it via github, I cloned it)... |
Thanks, that all looks correct to me. And you've tried (for instance) setting |
Is expected, the driver needs updating for core changes etc. Currently testing the latest changes in a local repo.. |
Yes I also tried only one axis (X axis) and the result was the same... Message "Could not communicate with stepper driver!" |
Afraid I'm pretty much out of ideas, as it seems to be working as expected here - within the limitations of my slightly different hardware setup (H743 SKR3 variant + external 5160 module). I think probably next step would be a scope or logic analyser to check the SPI signals on the module connector, if you have access to one? |
Actually, one more idea... Looking at the manual + schematic, the drivers can either be powered by the main DC IN supply or a separate Motor Power terminal. Which one is used depends on the jumper position above the module connector. Jumper on the right uses the main DC supply, and jumper on the left uses the separate motor power terminal - worth checking they're actually getting power? |
I'm using the "Motor supply" selection (pic 3.2.2). The multimeter show me the voltage is OK!!! I bought a low cost oscilloscope (car maintenance) with 1 channel and 18 MHz. Should arrive tomorrow...Then I'll try to analyze the signs of SPI. |
The SKR3 board uses a soft SPI implementation for the motor drivers (code is in Src/tmc_spi.c) - as the wiring doesn't quite match any of the hardware SPI pins.. |
Initially I was happy, there was no 5Vdc (2 modules lowering the voltage). I removed them, I left only 1. I adjusted it to only 1 axis, #338=1. The supply voltage (5Vdc) is OK now, but it still has no communication. Checking the signals, I don't have any frequency on any of the pins (MISO, MOSI and CLK, CS)... |
I don't know what happened, but now I'm getting 3 times the pins for SPI. Nothing has changed, except for the drivers, now I have only 1 physically installed and with setup #338=1. |
That's a red flag, how are you powering the modules? Have you tried a known good firmware (e.g. Marlin) to verify the hardware setup? The 5V VIO pin is only for the signalling, also needs 8-46V on the VM pin before it will respond - this comes from either the main board supply, or from the separate motor power pins if selected by jumper...
Are you triggering off one of the SPI channels? The communication attempt will be over very quickly (~70uS) without a response from a module. Here's a startup soft spi trace from a dev board with no module attached. Which driver modules do you have from here, the 5160 Pro? Maybe I'll get one for peace of mind, will take a couple of weeks to arrive though..
That implies the trinamic driver setup function is running multiple times. No idea how that happens, I have only seen it called once from grbl_enter() on startup. |
The motors are powered by the board. There are the 5VDC (Vin) and also the 24VDC (Vm) on the pins of the modules. I know there are other SPI channels, but they are not being used (yet), i.e. only SPI motors. I'm using the EZ5160pro V1.0 (the same one you're waiting for). Today I set up Marlin to test and communicated normally, no errors. I'm only using the X-axis (a single driver on the board). I'm buying new drivers to replace the damaged ones. They should arrive this week... |
Okay thanks, have ordered a EZ5160pro V1.0 module to verify against my setup here.. |
Other information... I tested before with Marlin and all motors (4) moves |
I'll take a look, my EZ module should be on the way also.... |
Hi @dresco, Information for you to think about... Yesterday I noticed that there was H7 driver update. I cloned it and put it on the motherboard. The communication error goes straight in. I put the previous version back in and I have communication with the drivers normally. Another important detail!!! If you leave the motherboard on, in about 15 minutes, the drivers heat up and a lot (they fry!!). Especially the Z driver (tested only previous version). This is probably what damaged my other drivers (remember that I put in new drivers because the previous ones were draining the 5v, sending it to 0v). |
Interesting, thanks. My 5160 EZ driver arrived this weekend, will test tomorrow & compare to a Marlin build.. |
New information (to me terrible, horrible information). The motherboard no longer turns on. I left it on for about three hours (I removed the Z drive, which was "frying". The other drives (X, Y, and A) were "manually touchable", i.e. I can put my fingers in and hold). Loss of 60 dollars.... I'm going to buy another motherboard and we'll talk again... Now I need a few days... |
Ah, sorry to hear that @MrKapim :( Will try to figure out what is going on... |
Hi @MrKapim I've done some initial testing here, and (unfortunately?) I'm not able to reproduce your issue.. Documenting my testing setup here; Hardware setup Initial software setup for each firmware version Results for 2209 Results for 5160 I then used I then physically moved the 5160 module to the Y and Z slots, changing the Trinamic axis mask ($338), and the M906 command each time to reflect the new axis. Results from these tests were exactly the same.. Further thoughts Each Trinamic module should only sink a few mA unless the enable pin is pulled low, which should only happen during movement (and momentarily at startup). Need to have a think about how to re-test your setup. If it was me, I would start with a bare board, no connections apart from power and USB, then add a single driver module, then add the stepper motor - checking the voltages & current draw after each change.. Regarding your board, there is a fuse on the board for the DC input, perhaps worth checking that out to start with? |
Hi @dresco The new card arrived, I did new tests and I have good news and bad news... |
There must be something in the initialization that is not quite right (in relation to the Z I say). For now it's working (I have to untick and tick the Z driver after turning on the set) to have the Z axis drive (first in the Home sequence). |
I am wondering whether it is related to current draw? There was an issue with the driver enable pins glitching on during initialisation, that is fixed in my latest commit (driver version 231205), but would have caused a brief current surge during startup. Also, please check the current limits in the $14x settings. There was also an issue with the default current values after a settings reset. Have just noticed it's been fixed upstream, will get these latest changes pulled into my repo over the next couple of days. Probably best to keep these values to 500mA while troubleshooting. And if you do see a communication error, then I would proceed with caution, as presumably has not been able to configure a safe current limit either. How are you powering the board, are you able to check the current? Does it make any difference to the Z behaviour if the stepper motors are unplugged before you power up the board? |
hi @dresco... good news!!! I made a change to the logic (trinamic.c) and now have the drivers initializing and communicating normally (no tick untick required to eliminate the communication error). |
About your question, even starting the motors after booting the system, the communication problem continues... The current shows no "peaks", surges or overflows, $14x is at 500mA |
Not. No difference if the motors are off when you turn on the system. Even if you send it to be moved (home for example) the logic interprets normal and IOsender updates the position values, but there was no movement because the motors are out of power. |
Good news, maybe the drivers aren't all powered up in time.. @terjeio see typo above, trinamic.c lines 424, 441, and 458 |
Typos has now been fixed. |
Hi @MrKapim Im having the same issue i think. My 5160´s on an octopus max ez, arent recognized either. They do get warm and definately have power to them. Did you find a fix? |
Hi @T4KUUY4, the firmware was fixed about this problem by @dresco. But I remember that when my drivers were heating up and there was no movement and/or they were not recognized it was because they were damaged. After I replaced the drivers they worked normally. An important detail!!! I discovered that I had changed the driver enable inversion signal and this was causing them to "burn", damaging them (in config.h the DEFAULT_ENABLE_SIGNALS_INVERT_MASK signal). |
@MrKapim Thanks for the quick response. Thanks for the headsup with the inversion signal, even though it wasnt the culprit in my case. |
Hi Terjeio, I'm trying to use GrblHal on a SKR3-EZ board with 5160 drivers (4 axis). I had some problems with USB communication, but @dresco helped me and solved it. Now I'm having problems with Trinamic. The steppers don't move, they're dead. Below is a photo of the IOSender with information, where I receive the drive not communicating message after sending the M122 command. Can you help me please?
The text was updated successfully, but these errors were encountered: