makerbase-mks / MKS-SERVO42B

MKS SERVO42B is 3d printer closed loop stepper motor NEMA17 MKS SERVO42 developed by Makerbase that prevents losing steps. CPU is STM32F103C8T6 ARM 32-bit Cortex™-M3 CPU Core,72 MHz. Magnetic encoder is Allegro's A1333LLETR-T Contactless 0° to 360° angle sensor IC ,12bit .This Project open source hardware and code,support platformio build and upload firmware...
https://www.aliexpress.com/item/33032696338.html?spm=a2g0o.store_home.productList_8356958.pic_1
GNU General Public License v3.0
166 stars 70 forks source link

PCB change suggestion #11

Open ljubomirb opened 4 years ago

ljubomirb commented 4 years ago

Did you consider freeing pins PB8and PB9 of STM32, 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.

dzid26 commented 4 years ago

I think it's even easier because CAN is also on PA11 and PA12. image

They seem to be unused: image

Pin 31/32: image

It's rotated 180deg, so they should be here: image

On PCB that is here: image

dzid26 commented 3 years ago

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.

image 20200801_213834 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.

Quas7 commented 3 years ago

for everybody, who ever stumbles over this issue: the latest S42B v2 has a CAN interface now (no promo, just as an info).