I share here a little piece of code I did to make a library that can be plugged to SimpleFoc using a Dynamixel Protocol.
Since the SimpleFoc is a nice project, shared and opensource, I prefer to release this code as GPL.
Also I’m not a hardcore coder and this is a WIP so please be kind
Well, Video is a bit messy I think ^^
The protocol is based on halfduplex UART.
It contains kind of memory direct access with CRC.
The main interest here is to have daisy chained servomotors with a robust protocol.
Also the Dynamixel is quite used and you have a lot of master compatible hardware.
This is quite used in educational robotics
CAN is clearly the best of course.
The idea here was to have a know protocol for hobbyist. Also usually it use the half duplex RS485, in TTL the solution is also cheap compared to an additional chip for CAN.
We use dynamixel in some project I needed something compatible with that.
Also I don’t have in my knowledge a generic CAN protocol, opensource well known.
I’m fully aware that is not the optimal solution! Just a pragmatic one for me.
There is one I’m using but requires a can controller. Upside is that it’s generic, that is, works on any MCU using generic SPI, so you use generic SPI to send/receive CAN. SPI is very widely supported, unlike CAN which is very MCU specific.
But sure I did design for my work some board with CAN. But one of the problem was we had to create fully new protocol to communicate. And Today I don’t know any generic protocol, well known that exist.
Correct me if I’m wrong but Odrive use Odrive protocol, tinymvr use his own protocol, etc…
No one use a generic protocol, I think it’s clearly missing (sadly).
Would be cool, also way off my reach, to have a generic protocol to communicate between any device. I guess it might be outdated and things like Luos strategy is interesting.
By generic protocol you mean application level protocol not the physical/first layer like CAN or UART?
Yes, application level ones do not exist. I wrote my own, too. Not a big deal, I need something very simple like direction, speed, torque, angle, temperature, error, etc. in a simple payload, with a few unique motor/device identifiers.
Yep I meant application level protocol
But well, for arduino hobbyist that is not that simple I believe
I usually working with arduino coders that are not sharper as you are and using arduino for hardware purposes.
I’m not familiar with CANOpen. I’m using CAN 2.0B and CAN FD as supported in silicon by the controller, that’s the whole point of using a controller and not worrying about the protocol. You solve all the messed up coding CANBus issues with a simple chip and two wires.
Plus you also side-step all licensing and CANBus HAL crap bullsh*t with the chip manufacturers.
oO You mean as Dynamixel device not as master? Do you have example? I only found one example Dynaban opensource firmware that seamed to me complex to connect with SimpleFoc. Or maybe I didn’t understand your explanation ^^