Open ljubomirb opened 4 years ago
I think it's even easier because CAN is also on PA11 and PA12.
They seem to be unused:
Pin 31/32:
It's rotated 180deg, so they should be here:
On PCB that is here:
Ok, I did it - I added CANbus to it. I used tja1050 transceiver that I had on hand. But I am not recommending doing it as it is pretty difficult and easy to damage the chip.
But anyway, it works. If anyone decides to build a board with the transceiver, here is CAN setup code.
Additionally, I added 5V DCDC to power the board from V_mot - that's another board suggestion. And an important TVS clamping diode between V_mot and GND. The reason is that if V_mot is disconnected and motors are driven by hand, there can be even 70V BEMF generated by the motor so it can damage DCDC converter or even A4950 that is rated 40V.
for everybody, who ever stumbles over this issue: the latest S42B v2 has a CAN interface now (no promo, just as an info).
Did you consider freeing pins
PB8
andPB9
ofSTM32
, currently used by A9450 (move it to other pins) and then add and connect MCP2561-E/SN to it? I did not try this, but this particular STM32 has CAN there, all it needs is 3.3V tranceiver. This would raise price per board maybe 1USD max, but would allow CANBUS functionality. And that would be something. Think of connecting multiple motors in series, having simplified MB and such... You may not even bother to add software support for it right away, just allow HW to have it as soon as possible, and include all libraries. The protocol can always be left undefined, so people can make do their own if they feel so.