Holidays end today.
And finally got something repeatable with the motor.
The motor talks at 115200 bps, 8N1.
It expects an Init command. And it asks for it (or at least it complains of something). But it also requires some sort of warm up procedure that requires sending to the motor a lot of ’00’ for a while. It seems like a long break before start communication but for some reason it doesn’t work if I use pyserial break command.
Python code here.
Tried to use it in EV3 running ev3dev but no success. 115200 might be to much for the Ev3… or it’s just my bad programming skills.
And this is the FTDI Beefy 3 adapter that I’m using:
To recap the wiring:
- FTDI GND (black wire) to pin 3
- FTDI 3V3 (red wire) to pin 4
- FTDI TX(white/grey wire) to pin 5
- FTDI RX (green wire) to pin 6
And a sample of the output:
Speed : 00 (h) = 0 (d) Position: 00 00 00 00 = 0 degrees CRC : 27 (h) = 39 (d) Speed : 11 (h) = 17 (d) Position: 09 00 00 00 = 9 degrees CRC : 3F (h) = 63 (d) Speed : 1D (h) = 29 (d) Position: 13 00 00 00 = 19 degrees CRC : 29 (h) = 41 (d) Timeout -> Resync Speed : 04 (h) = 4 (d) Position: 9D 00 00 00 = 157 degrees CRC : BE (h) = 190 (d) Speed : 00 (h) = 0 (d) Position: 9D 00 00 00 = 157 degrees CRC : BA (h) = 186 (d)
The script is still far from perfect – I was rotating the motor half a turn clockwise and it lost communication in the middle… but at least it reconnected fast enough to preserve position.