SSerial remote stepgens?

More
04 Mar 2023 04:57 #265821 by blazini36
I've never seen a smart serial stepgen, I'm not quite sure whether that is because of the SSerial update rate, the remote card's microcontroller capabilities, or just lack of necessity but I'm curious if it can be done and in what capacity.

I have a setup were I currently just take step and direction from a 7i96 to drive steps to a traverse with a custom PCB with it's own step driver @ about 5khz. there's a couple of in/outputs there too directly from the 7i96 nothing above 100hz but 1 output requires reasonably low latency.

I now have a requirement to also drive 3 very small steppers in the same traverse. There's a few ways to handle it but for software and wiring ease I'm thinking about what is possible with Smart Serial. Each of these 3 small steppers has a max step rate of 600hz-1khz.

First question I suppose is does a SmartSerial remote step firmware module exist and if not could it. Second is what could it possibly be capable of?

 

Please Log in or Create an account to join the conversation.

More
04 Mar 2023 12:35 #265843 by andypugh
Replied by andypugh on topic SSerial remote stepgens?
I think that it could be done. After all the STMBL servo drive works fine to move motors in position mode over sserial.
You could run it in position mode, and just send a target position, or send velocity commands and get motor-position back to close the loop of a PID.
As far as I can see it should work just the same as any other external stepgen.

Please Log in or Create an account to join the conversation.

More
04 Mar 2023 20:54 #265869 by PCW
Replied by PCW on topic SSerial remote stepgens?
We have considered this for things like toolchangers
May need to reduce the resolution of the data somewhat
(say 16 bit velocity/position 16bit 12.4)

Please Log in or Create an account to join the conversation.

More
04 Mar 2023 21:57 #265871 by andypugh
Replied by andypugh on topic SSerial remote stepgens?

We have considered this for things like toolchangers
May need to reduce the resolution of the data somewhat
(say 16 bit velocity/position 16bit 12.4)

The smart-serial driver supports floating point datatypes. I think it might need a bit of work to fully support 16-bit and 8-bit floats, but the structure is there to do it. 

Please Log in or Create an account to join the conversation.

More
04 Mar 2023 23:44 #265875 by blazini36
Replied by blazini36 on topic SSerial remote stepgens?

I think that it could be done. After all the STMBL servo drive works fine to move motors in position mode over sserial.
You could run it in position mode, and just send a target position, or send velocity commands and get motor-position back to close the loop of a PID.
As far as I can see it should work just the same as any other external stepgen.
 

Yeah I figured it would be done pretty much the same as the FPGA stepgens are done at somewhat reduced expectations. Whatta ya think the best way to go about trying to get it added is....submit a feature request through git? Sadly I'm limited to crap Arduino code so not a whole lot I can do.

I was trying to find a suitable Mesa remote card for what I'm trying to do but they're all either too much or not quite enough. I may have to roll my own, Is the microcontroller firmware open source? Looks like they use PIC32's?

Please Log in or Create an account to join the conversation.

More
05 Mar 2023 12:06 #265908 by andypugh
Replied by andypugh on topic SSerial remote stepgens?
I think I would try an STM32 dev board (like the Blue Pill or Nucleo) and the STMBL code base.
github.com/rene-dev/stmbl/blob/master/src/comps/sserial.c

Please Log in or Create an account to join the conversation.

More
06 Mar 2023 16:03 #265958 by rmu
Replied by rmu on topic SSerial remote stepgens?
A 7i90 can be used as smart serial slave, and in 224 bits per 1ms you could fit command / feedback data for 6 stepgens, plus 32bits for enable/other stuff.

Please Log in or Create an account to join the conversation.

More
07 Mar 2023 01:09 #266006 by blazini36
Replied by blazini36 on topic SSerial remote stepgens?
7i90 is definitely too much for what I'm trying to do, The board has to fit in a confined space and then be connected to another board with the field capable IO. Even a 7i69 is too much. Maybe the 7I73 could be made to manage since it has 6 outputs, that's enough for 3 stepgens. I could sort of use it as a plugin module to a Field IO PCB

Either way the SSerial MCU firmware for stepgens doesn't seem to currently exist and I'm not quite sure how LCNC handles SS slaves in hal. I'm not sure if it's a generic driver that instantiates the pintypes after reading the SS slave's capabillities or if each slave has a specific hal driver.

Same issue exists for the STM32 ports, I forgot about the STMBL setups but there's obviously no stepgen available on either side of that and about all I can muster personally is maybe editing the pin descriptions. I can get an STM32 running on a PCB but that's about as far as I'll get

Please Log in or Create an account to join the conversation.

More
07 Mar 2023 01:21 #266007 by PCW
Replied by PCW on topic SSerial remote stepgens?
The SS driver is generic, it reads the pin names and data types from the
remote device.

A remote stepgen would probably just have enable,velocity,reset and positionFB pins. I don't think any changes in the driver would be
needed as long as the encoder data type was used for the position
feedback (so it handles wrap correctly)

Please Log in or Create an account to join the conversation.

More
07 Mar 2023 01:35 - 07 Mar 2023 02:04 #266008 by blazini36
Replied by blazini36 on topic SSerial remote stepgens?

The SS driver is generic, it reads the pin names and data types from the
remote device.

A remote stepgen would probably just have enable,velocity,reset and positionFB pins. I don't think any changes in the driver would be
needed as long as the encoder data type was used for the position
feedback (so it handles wrap correctly)

 

PCW, would Mesa add a stepgen to the SS 7i73 firmware? The more I look at it the more it seems it might just do the job as a mezzanine sort of PCB. I just need 3 1khz stepgens, a couple of limit switch inputs. I don't really need the encoders at the moment but them as well as the analog inputs could come in pretty handy in the future.

Edit: Since the 7i73 only has 6 outputs they would just need to be 2pin without the hardware enable pins. I assume the steptype would be selectable, I'm not really sure whether I would actually use step+dir for such small motors, that would require an stepper driver chip with an indexer like a DRV8825 which is overkill for tiny motors.

I ran into something before thinking about using quadrature to drive a bipolar stepper. Not sure if there's a better way but I had the idea of using a differential transmitter to generate each phases opposing signal and then arranging the 4 outputs to drive the motor. 1 Quadrature cycle and an opposing pair can roughly resemble a single step sequence.....Or maybe that's a bad idea lol, I never actually tried it.
Last edit: 07 Mar 2023 02:04 by blazini36.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.078 seconds
Powered by Kunena Forum