Hi all, I’ve got a custom machine running grbl-lpc on a smoothieboard 4x. I need to run 2 motors for the x-axis. Smoothie documentation says you can jumper the step, enable, and direction pins from one driver to another for this purpose, but you need to set the current for both drivers. I’m trying to figure out how to set the current for the 4th driver so it can run my second x-axis motor. Both motors need to run at 1.5amps so I can’t run them both off the same driver. I’ve been mucking about in Claudio Prezzi’s grbl-lpc code to try to get this working, but I don’t know much about coding. I have been able to figure out how to do some other minor changes to the code and I can compile it, but if someone is able to point me in the right direction for setting the current on the driver without having any of the A-axis stuff enabled, I would sure appreciate it!
Unfortunately Grbl has no option to mirror axis, so you need to follow the Smoothie documentation to jumper step, dir and enable pins to the 4th axis.
The current for each axis can be set in defaults.h (need to compile). You probably want to make a whole new section for your machine so you can just select that machine with a define in config.h (like #define DEFAULTS_JONAS).
Thanks for the reply Claudio. Unfortunately this doesn’t seem quite that simple. If I define the current for the A-axis in defaults.h, I must also define the other parameters for the A-axis otherwise I get a compile error. But if I do put in some values for the other A-axis parameters, I don’t get movement as expected. It sounds very rough and seems to miss a lot of steps. I just loaded up the official smoothieboard firmware to confirm that I’ve got my wiring correct and it works really nicely there. The smoothie documentation does say to make sure that you don’t define any other parameters for a driver other than current when using the jumpers like this. I guess I was hoping there was a line of code I could add directly to current_control.cpp or something to just set the current on that one driver.
Did you use my fork on https://github.com/cprezzi/grbl-LPC with 4th axis support?
What’s important: If you bridge the step, dir, enable pins to the 4th stepper driver, you need to make sure that the a-axis step, direction and disable bits are set to “NotUsed” in cpu_map.h, because otherwise the pulses of the two axis will get in conflict.
I don’t recommend to change anything in the grbl-lpc folder, as these are just the hardware drivers.
Thanks Claudio! I had tried commenting out the bits for A-axis step, dir, enable, but it didn’t seem to like that. Setting them to NotUsed did the trick and now I believe I’ve got everything working perfectly!
Thank you so much for the help and for all the work you’ve done on grbl-LPC!
Cool. I’m happy I was able to help.