You need to be sure of the way the encoder data is serialised. I don't think it is going to be output as a bunch of UART compatible bytes. If that's the case, then you can't read the data using a standard serial port.
I would wait and see what you get back from your tech support query.
I did find what may be a single sheet drawing of the motor you are using and have attached it. Does your motor look like the one in the drawing. Note the pinout of the encoder connector.
Is your motor different to this as you mentioned in an earlier post that you only had vcc, gnd, sd+ and sd-.
The motor is exactly the one you found. Unfortunately, I'm not sure about the communication protocol of this encoder. I haven't been able to find any material to understand what type of encoder it is. I only know that it's a 23-bit absolute encoder with four pins: two for power supply, one SD+, and one SD-.
I hope Leadshine will reply soon to clarify this.
Rs485 standard defines A- and B+. Often implemented otherwise round, but try "standard" as well. Would be step ahead to get "anything" out from that data line.
You could use one of the cheap USB logic analyzers to look at the data stream. I would guess it to be 23 bits separated by some constant gap and maybe an encoding scheme that takes repeating 1s and 0s into account since there is no clock.
That sounds like a great idea! I’ll try to capture the data stream to check if the bits are separated by a constant gap and if there’s any encoding for the sequences of 1s and 0s. I found a cheap logic analyzer on Amazon , do you think it would be suitable for this kind of work?
what the heck is that baudrate???
Also, according to your documentation, what should the baud rate be? Can you link the documentation.
Also what are you actually powering from your breadboard with black and red wires?
If you don't get even "inzializzazione completata" in serial monitor, it means your arduino/serial doesn't even work!
Upload a sketch to verify your arduino first:
void setup() {
Serial.begin(9600); // open the serial port at 9600 bps:
}
void loop() {
Serial.println("test");
delay(1000);
}
With great pleasure, the company provided me with this pdf about the encoder.
It applies to the 17bit encoder, mine is 23, I think you just have to adapt the code maybe. Having said that I think rs485 is the correct communication, I see 2.5mbps... Mmm... 38M17 en.pdf (2,1 MB)
You can't make it work with softwareserial at 2.5Mbps, so you need to use another board that has more than one uart port (micro doesn't)
Actually, I doubt that you even find arduino board that can handle that serial speed.
You are absolutely right, 2.5Mbps is too high for SoftwareSerial, and I'm actually considering switching to an Arduino Mega or a Teensy 4.1. Both have multiple hardware UART ports, and the Teensy, with its much faster clock speed, should be able to handle this baud rate without any issues.
yes indeed the translation of that document is really funny... I don't understand why they haven't given me the official document yet but a translated document but it's already a great thing that they answered something... I thought they wouldn't even answer me... anyway I just asked for another untranslated official document of the 23 bit version