SAMD21 + DRV8316 Board

Hello, I have just made a motor-mounted controller inspired by @Jason_Kirsons board with the help of @runger designed to fit snugly on 41xx motors.

The Altium files and flashing instructions are on the repository here (WIP).

So far the SAMD21 is able to keep up with controlling motors well enough, and the DRV8316 is also working like a champ (as expected). Motors do not get warm when idle and are essentially silent so it seems to be functioning properly.

The board should be able to work with a supply voltage of up to 40v.
The board also has a USB Type C port and there is a USB protection circuit that pulls DRVOFF high if the USB port is the current source.

Total cost is about $25, assuming you can find stock for the SAMD21G18 ¯_(ツ)_/¯

Here is what it looks like:

Any IO stuff (digital read or write for instance) definitely interfere with the FOC loop so I would like to look into redesigning this board with the RP2040 to utilize the dual cores.

8 Likes

Nice work!

image

I like the block title :slight_smile:

1 Like

awesome! love it. I think I might try it, with a samd51

1 Like

Haha I just checked the datasheets and I had no idea the pinouts were exactly the same, maybe I’ll get some SAMD51s to put on these boards!

That’s one nice looking board. Excited to see some motors spinning!

Thanks,
Matt

Looking at micro controllers. I can buy aSTM23M4 for the price of a SAM21. The M4 has hardware floating point and CAN bus pins. The crazy chip supply has some M4 cheaper than M0

Multitasking can be make easier with an RTOS. But I admit to ignorance about mixing SimpleFOC and an RTOS although Google finds many people running FOC in a real-time task.

Using a faster uP with hardware math and one of the RTOSes opens up a lot of silly stuff like “Micro ROS”, CAN bus, One is freertos.org, another is zephyrproject.org

Hi everyone,

apologies for a duplicate question here. I created a separate post and then realised, the right place to ask this question is here.

I am updating @AdinAck SAMD21 board to SAMD51. I’d appreciate a helping hand on confirming the following please:

We are using ATSAMD51G18A-MF. Considering the SERCOM config, what should be the SPI host pinouts to communicate with 2 SPI devices supporting the simpleFOC firmware?

Currently mapped as -
MOSI- PA12
MISO- PA14
SCK- PA13
SS1- PA18
SS2- PA19

Is this mapping ok?

@AdinAck - thanks for this board design.