Use of linear Axis independently of Snapmaker -Controller

Hello Forum,
I would like to use the linear Axis for a different application. So my question is:
What is the CAN id of the Axis and the commands to move the slider ?
Has anybody done this before ? Any advice/hints would greatly appreciated. (G code commands for the axis, etc)
Best regards,

For your purposes you can completely ignore can and just control the enable direction and step lines like you would any stepper driver. If you need the status of the end stop switch then you would need to monitor for that in can and that gets way more complicated honestly I wouldn’t recommend that path as something you should go down

I’d suggest doing a bunch of reading on can if you really want to go down that path because there’s no such thing as a module ID in can that’s not how the can protocol works. There’s only function ID subscriptions

Export the logs from the touch screen or monitor over serial after controller restart and you can watch the entire startup sequence of all the function IDs getting exchanged to register all of the hardware with the controller

thank you very much for your comments. Unfortunately, I need the status of the limit switch. I think I have to work with CAN. I will experiment a bit and see if it is worth it. Does anyone know of any documents/sources that might be helpful in this direction. From another post on the forum I have a rough idea for the pinout in the connector and will start listening to the bus there.

The best reference is the source code. There’s not much else.

That’s what I thought already. I’m already sifting through the source code and if I have something usable, I’ll post it here in the forum. I can imagine that the very good linear axes from Snapmaker could be interesting for other positioning tasks.

@brent113. Do you happen to know what the pinout is in the connector for the linear axis ? I can see 8 pins - the two thicker ones are probably the power pins and two are for CAN, any idea what the remaining 4 pins are used for ? Direct stepper movement ?

I’d love to know too. There’s got to be a way to repurpose them for something. Such nice machinery laying idle.

You can always disconnect it from its control board and provide your own connector and circuit to sense it.

1 Like

thanks to brent113, I have now an idea how to interface the axis on an arduino based level. I’ll do some experiments and if have have something useful, I’ll post it here on the forum.

Hi, I had the same idea about building a custom device using the SM aixs modules, which really look great. From what I have read in the forum so far, the cable seems to have both CAN and the stepper pulses.

Hence, wouldn’t it be possible to connect the axis modules to a different controller, e.g. a GRBL shield without drivers? I have to look further into it, my guess would be that what goes into the stepper driver on the GRBL shield could just be sent to the SM axis modules.(*)
I imagine that this would be an easy and straight-forward solution to control a custom setup with G-code, without having to worry about too many things.

Any thoughts?

(*) EDIT: Just looked it up, the axis modules could be connected to an arduino running GRBL, no need for the hat carrying the drivers. However, any other more advanced printing/CNC controller with MCU on board could also be used this way, i.e. by leaving out the driver modules and just connecting the Snapmaker axes - so more axes and additional functionality would be available.

I love it. I haven’t followed up on it since we bought a new house and moved and that has been taking up all my time. We should be settled by the end of the month and I’ll look back into it. I’d love to hear what your results are if you run tests too.

PS I’m not familiar with GRBL, although there’s plenty on the Arduino site, and other sites too. Please tell me it is pronounced gerbil!

I don’t have a snapmaker, I’m thinking about getting an axis module to try.
A colleague told me that the TMC2209 driver chip can do current sensing and use that to stop at the end of the rail, so no switches are needed.
Apparently, the chip can also receive commands digitally and perform the movement, without needing the controller to calculate and send the individual pulses.
Have to find out more and try, once I have the object of desire… GRBL might just be the first step! :slight_smile:

I have an extra I can send you if you want. I have all 5 but only need 2 or 4 for my project. It would be worth it to have someone working on this!

Thanks for the offer - in the meanwhile I figured it would be most straight-forward to use the printer as-is, and just send custom g-code to it, ignoring the print head, before fiddling with the hardware. Pronterface has a nice interface for manual control and could fit in nicely. Just ordered an A250 for 800 €.

Hello Frank,
if you do not need it, I will gladly buy this extra module from you.
Please write me your offer in a private message, Thx

Looking forward to hearing about how it goes!

These controllers from Makerbase support sensorless homing for TMC2209:

One option could be to use the linear modules and bypass their internal driver board.
Or find a way to connect their TMC driver to an external controller like this, to get around using the CAN bus.

There are other MKS controllers for up to 8 axis, a couple of outputs for fans and heaters, that might be used for other peripheral devices.

Octoprint running on a Raspberry Pi has dedicated commands (OCTOnnn) to run external shell or python scripts, for using the GPIO pins or anything else. Seemingly these commands can be used inside G-code instructions to enhance functionality.

For now, I’ll proceed with the printer as-is and see how far I can get using its own controller. Looks like with Octoprint / G-code one can control at least the axes, with extra functionality via the Raspberry Pi, which seems to me quite a flexible solution without too much hassle.