[Help] Read magnetic encoder

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!

Moderator: phalanx

Post Reply
shmulik
Posts: 7
Joined: Sat Sep 26, 2015 3:46 pm

[Help] Read magnetic encoder

Post by shmulik » Sat Sep 29, 2018 1:07 am

Hello,
I have an absolute magnetic encoder (MB029+MBA029) that i want to buy (specific this model due to its small size and high resolution).
I want to read its position with a Teensy 3.2, and if its possible with no extra parts.
The encoder comes with 3 optional communication interfaces: (Datasheet P.17)
  1. Asynchronous serial RS422(UART)
  2. SSI
  3. BiSS-C
As i understand only the "Asynchronous serial RS422(UART)" can be used with Tensy with no other parts like communication converots.
In the datasheet there is an explanation about this pins and how to request the encoder position.
But i still have truble with how to wire both of them:
The encoder has 8 pins: (Datasheet P.16)
  • Vdd - 5V
  • GND
  • Temp sens 1 & 2
  • RX +
  • RX -
  • TX data out +
  • TX data out -
And there is an explanation which command do i send to get the info(pos/speed/temp/..) that i need (Datasheet P.18 bottom).

I dont understand where do i connect the RX+/- TX +/-
and which serial i send / read the indormation from the sensor.

Download the Datasheet


Best regards.

paulvha
Posts: 297
Joined: Sat Nov 11, 2017 2:39 am

Re: [Help] Read magnetic encoder

Post by paulvha » Sat Sep 29, 2018 2:39 am

RS422 is NOT the same as RS232 and you need additional hardware to connect. A good article is https://www.omega.co.uk/techref/das/rs-232-422-485.html. SSI is based on RS422 (https://en.wikipedia.org/wiki/Synchrono ... _Interface) and BISS is compatible with SSI.

I assume the reason to use RS422 is because of long distance that is expected between the encoder and the controller. The datalines are balanced (with + and -). A spike or noise caused to the line, will impact both the + and - line and as such illuminated.

shmulik
Posts: 7
Joined: Sat Sep 26, 2015 3:46 pm

Re: [Help] Read magnetic encoder

Post by shmulik » Sat Sep 29, 2018 2:44 pm

The distance between the controller and the encoder is no more than 100 mm.
In this case, do i have to use 4 pins RX+- and TX+-, or can i use only 2 pins (RX+ and TX+) ?

The second question, is it possible to use one of the others protocols SSI or BiSS with teensy 3.2 without any other converters ?
I cam across with an example that someone managed to write SSI protocol (creating the clock output) only with an arduino board.
But it wasn't an official library, so i dont really know if it works
https://forum.arduino.cc/index.php?topic=92552.0
https://forum.arduino.cc/index.php?topic=156812.0

Thank you again for the help !

Post Reply