Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: High speed serial communications between multiple Teensies

  1. #1
    Junior Member
    Join Date
    Feb 2019
    Posts
    12

    High speed serial communications between multiple Teensies

    Background
    I am close to finalizing the design for a robotic platform that consists of individual 3 phase motor drivers directed by a central control module, each using it's own Teensy 3.6. Each motor module is to perform current sensing, position sensing via onboard encoder, and direct 3 phase motor control 20khz PWM. The vast majority of serial communication will be unidirectional, with the control module issuing directions to the motor modules en mass (each module receiving the same instruction set simultaneously and parsing variables relevant to that particular module), similar to CANopen without the sequential read. Bidirectional communication will be performed by the control module querying an id specific to a single motor module, which will then respond with the appropriate data. The motor modules will never initiate communication.

    Communication is to be performed via serial using ISL83078EIBZA differential transceivers to reduce cross talk and increase range to at least 10 feet. I have been able to achieve a data transmission rate of 15.4MB/s between 3 Teensy 3.6's in this fashion, verified by scope.

    Status
    I have functional prototypes and each system has been tested individually, but I have not yet attempted communication while the motor driver section is running. I am concerned that the process of receiving serial data packets will degrade the resolution of the motor control.

    Before I spend the capital to prototype the, hopefully last, prototype board design, I have a few questions that I hope you guys can help me with:

    1. Is there a Teensy to Teensy communication method available with greater than 15MB/s transfer rate for small data xfer (<15 bytes)?

    2. Will the interrupts for the serial communication interfere with the PWM timers for the motor driver? In other words, when receiving data will the PWM waveform be effected or will it hold it's current state?

    3. The actual transfer of data takes 5.3us, but what kind of overhead does the transmission require of the Teensy? How long is the processor tied up when sending and receiving data over Serial?


    Thank you

  2. #2
    "2. Will the interrupts for the serial communication interfere with the PWM timers for the motor driver? In other words, when receiving data will the PWM waveform be effected or will it hold it's current state?"


    I am concerned I am having a similar problem using serial communication - I am seeing the PWM timers behaving strangely at times

    when the teensy is programmed to sweep the pwm without serial communicaton all is well

    you can see my issues here - https://forum.pjrc.com/threads/56245...of-serial-data

    what are your thoughts ?

  3. #3
    Setting Serial.setTimeout(0) seems to have got rid of the delays in the pwm timer

  4. #4
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    189
    Thanks for the update!
    Glad you got it working in the end.

  5. #5
    Me too ! I can move forwards now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •