Oops, I misread it. My bad.
Still it’s worth to test keeping the master VESC at a lower ID than the slave one.
But still, the ID in VESC FW is coded on 8bit.
CAN bus convention is 11bit for CAN 2.0A and 29bits for CAN 2.0B.
This shows that the standard isn’t strictly respected here.
My concern is : are all mechanisms designed by the standard (bit-stuffing, Error frame, overload frame…) managed by the VESC ?
True, Vesc uses only 8 bits for the actual device ID instead of the full 11 bits or the extended version of 29bits, I guess thats because we won’t ever have more than 255 connected nodes anyway, that being said, it does use the extended 29bits format. The arbitration field is 32 bits, with 29 bits assigned for the identifier.
The Vesc FW uses the remaining bits to concatenate the commands packet IDs, you can see it here
if (rxmsg.IDE == CAN_IDE_EXT) {
uint8_t id = rxmsg.EID & 0xFF;
CAN_PACKET_ID cmd = rxmsg.EID >> 8;
And when sending CAN commands like duty cycle for example
Just to update everyone who was helping out, I believe I figured out the problem I was experiencing. I was scratching my head trying to figure out what would cause the motors to work perfectly fine when run as separate systems, but to not work at all when run in tandem. So on a hunch I tested for continuity across the two motors (phase from one motor to phase on the other motor). Beeped straight away. Proceed to poke around all over the drivetrain, and there was continuity from every phase wire on both motors to every other spot on the drivetrain and the other motor. Bingo
Houston, we got a short.
On @DerelictRobot’s advising I pulled the drivetrains apart, backed out the motor bolts one by one until the continuity went away. Turns out one of the bolts on each motor was about two threads too long, and was shorting against the stator. When only one motor was running, it was not a problem. As soon as current is going to both at the same time, BZZZT
Ground down the problem bolts, loctite, put em back in, no short.
Ran motor detection wizard (2 VESC6 MK3’s, FW4.1, Tool 2.02) and it worked first try. Ran App wizard, first try gave the “old firmware on one VESC” error but a disconnect and reconnect fixed that. App wizard worked second try, and the motors spin up and work correctly now! Threw a cardboard enclosure on and went for my very first ride on my first build!
Took it slow, just up and down the street. Got the FW-induced speed wobbles that others reported since I didnt change the time constant from 4000 to 1000. Got to fix that. Next up, enclosure!
Im kicking myself that it was something so simple, that eluded me for so long. Hopefully that was the only issue. Will definitely update if anything else crops up, but thanks to everyone that contributed suggestions and ideas for debugging, and especially @DerelictRobot for his hands on help and expertise, as well as the use of his workshop and alternate hardware to test against. I really hope I didnt fry any of your ESC’s Andrew!
I think im going to just manually change the time constant and re-run detection. I have had enough with changing variables in this build haha. It works, so Im going to stop touching it.