Read Proprietary Serial - Manchester Encoding

Hi All,

I'm trying to interface to a high performance industrial serial encoder (Tamagawa TS5643N151) which presents the encoder data (single-turn, multi-turn, and status flags) as a repeating serial bit stream, Specifically this is a 2Mbps (1M baud) manchester encoded serial signal (image attached). The block begins with a 2.625us high pulse, transmits 21 bits of data (including CRC) and terminates with a 0.375us stop pulse. I would like to read this data and store the contents in memory for later use. I purchased a Teensy 4.1 since it has hardware serial support up to 5Mbps.

I'm a little bit at a loss on how to begin tackling this communication. I assume that between the manchester encoding and the proprietary data frame format, I cannot use any standard serial libraries. I also need to be pretty efficient with the code since a new frame arrives every 42us and I need to handle other stuff in between parsing these packets.

Any tips on where to begin? A simple starting program might read the serial data and print the contents to the serial monitor once per second.

EDIT: This is all to try to get an industrial robot working as a hobby. Picture attached.

Hello macardoso
Make a hardware analyise to find an Arduino board that match to the required baudrate.
Have a nice day and enjoy coding in C++.

Hi Paul,

I've selected a Teensy 4.0/4.1 for the 600MHz clock, low cost, and serial compatibility at the baud rates I need. My question is more specifically, where does one start with reading manchester serial, if I cannot use a standard library due to the unique data framing?

Hello macardoso
In this case make a data recording and data analysis to find out.
It will be tough job.
Have a nice day and enjoy coding in C++.

Get a simpler rotary encoder.
or
Check the product ID and get a data sheet
or
Get the AU5688N1 support chip for the Arduino interface
or
Get a PLL module for clock recovery