I think there are a few makers on the forum that are doing stuff with CAN e.g. @erwin74. So I’m wondering if there is some sensible way we could collaborate.
A couple of ideas.
- work towards writing a SimpleCAN library that hides the mcu implementation. This is quite tough as the implementations vary so much and I’m worried that the ‘common denominator’ would be not great.
- work towards defining a set of SimpleFOC CAN frame definitions. This would allow common tooling to request telemetry and/or set config
So what do people think? I think I’m more interested in 2). So the frame definition might be something like:
b00000000000 identifier - is a 4 byte frame that sets (or reads) velocity P term for for motor#1 b00000000010 identifier - is a 4 byte frame that sets (or reads) velocity I term for motor#1 .... b00010000000 identifier - is a 4 byte frame that sets (or reads) velocity P term for motor#2 b00010000010 identifier - is a 4 byte frame that sets (or reads) velocity I term motor#2 ...
So for 11 bit identifier maybe we would use 5 bits for identifying which motor and 6 bits for identifying which telemetry/config value.
I suspect this topic is only interesting to builders wanting to manage lots of motors. It is possible that we could extend @JorgeMaker’s SimpleFOC GUI tool to support CAN as well as Serial. You’d need a CAN/USB dongle and an OS that supports that dongle.
Anyone it’s an idea. I don’t have much CAN experience so am kind of looking to see if there is interest and also to see if we have anyone with more CAN experience who can perhaps advise. I’ve read a little about CANOpen - perhaps that might come in to play.