High speed communication between Teensys for multi axis fast stepper accelerations

Status
Not open for further replies.
I'm relatively new to coding and find myself currently using a Teensy 4.0 (will upgrade to 4.1 shortly) to control a bunch of high speed stepper motors for an art installation. I'm currently running a single axis system using a DM542T drive and running at speeds of up to 50k steps/sec, but plan to use other drives and waaay more motors. I looked into teesnystep, and may go back to it, but at the time of this post, it does not support teensy 4's. Furthermore, my moves have different acceleration and deceleration profiles and are non-blocking which seem to be rare features in open source motion control libraries. For overkill, I'm re-calculating the acceleration delays for every step which is currently taking under 1us to perform the calcs for every pulse on/off. I plan on controlling 4 or more motors with each teensy 4.1 depending on how things shake out. I'm sure I'm not the only one to have gone down this rabbit hole and welcome any "constructive" comments or direction.

Now for the main reason for this post. I'm currently working on using another Teensy 4.0 to process a bunch of data that will include wireless signals and PWM Analog sensors that batch send this data to the 1st teensy. I plan to send this data unfrequently (say every 10ms) and it would be 128 bytes/characters, or less if needed, to allow the sensing Teensy time to process a bunch pwm inputs and wireless data. The two teensys will hardwired right next to each other. Is UART the quickest method communicate between the two? Ideally I would like to send/receive the data in under 5us in order to not mess with the motion control on the first Teensy by very much...

Regards,
Matthew
 
In terms of bandwidth, USB at 480 Mbit/sec is definitely the fastest way to communicate.

The serial ports do offer a nice simplicity though, where latency is much easier to anticipate. They can run at 6000000 baud, but at that speed you'd probably want to use RTS/CTS flow control, which is only available on Serail3 and Serial5 (and Serial8 on Teensy 4.1 if a wire is soldered to one of the SQPI memory pins).
 
I've been looking for decent examples on how to do the USB communication between Teensys. Same goes for managing RTS/CTS flow control...


Any links or threads to Teensy specific examples come to mind?
 
Status
Not open for further replies.
Back
Top