SimpleFOC on RMD-L driver

Hello everyone. I’m designing a robotic hand and have settled on these chinese RMD-L-4015 bldc motors. The controllers are good. However I would like some more customizability. So I’ve been wondering if it would be possible to load SimpleFOC onto them. I dont know how exactly to do this so I was hoping for some help.

There isn’t a lot of information available of the driver. I believe it’s a smt32 based controller. It has a built in encoder and is capable of current based torque control. I have uart access. And it doesnt look like the advertised images on aliexpress. I’ve included pictures I took of it myself.

Does anone have any suggestions on how to load Ardino on it to run SimpleFOC? Thanks!


I’m pretty sure this is the actual driver: alibaba link

Did they etch the part number off of the microcontroller?
It looks like a pretty simple board. If you can get well lit photos of front + back from a top down view, we can reverse engineer the pinout.
It has the SWD pads exposed so maybe you can read the chip info from that? But certainly it can be reprogrammed.

Ok cool. I’m on travel right now but I’ll try and get magnified images of everything when I’m back in the lab.

Just to clarify, is this the process?:
Identity MCU pinout → flash arduino → modify SimpleFOC code to match pins

The pin identification can be done visually? Even with double-sided or multilayer boards?

With double sided boards, you can flip one of the images and put a transparency on the top layer to work out what pins are where. It doesn’t work for multi-layer boards but this doesn’t look multi-layer to me (from what I can tell). If you were really dedicated you can beep out the connections but I think this is a lot slower and more prone to error.

Yes, if you can figure out the pinout, then you can just write the system flash via SWD to put whatever program you want on there. Of course, it will only work if you have the right pins on the right peripheral.

Hey, we’d need to know which part this is:

Hopefully its some kind of MCU we support, then you can probably use SimpleFOC.

Often the markings can be seen in different light / at different angles, but if they’ve really be scratched off, you may be able to ID the chip using STM32CubeProgrammer (if is a STM32 MCU).

Driver is a FD6288Q and the sensor a MagnTek 681x - maybe 6816? Can’t quite see.

Visually, I would not say is the way to do it. Use your multimeter in “beep mode”. Choose a target pin of interest (let’s say the LIN1 pin of the driver) and touch it gently but firmly with one probe of the multimeter. Then touch the other probe to pins of the MCU until you hear the beep.
Once you get some practice this becomes quite easy, and if your multimeter is good (low delay until the beep) you can even “drag” the other probe around (gently!!) to quickly find the pins you’re looking for.

All this becomes considerably harder if you have to map the pins from one side of the board to the other, but its basically a physical problem of having to keep the board steady and the probe firmly in place.

First we need to identify the chip that is on there.
Once we know, then we know which type of programmer and software we need to talk to it via SWD.
At that point we can just try to flash it, but there can be several reasons why it will fail:

  • custom boot loader
  • memory protection / boot loader protection
  • chip locked down

Some of these things can be corrected by “setting fuses”, depending on the MCU type, but if the MCU supports locking and they have locked it against changes then you might also be out of luck.

Another possible outcome is that the chip is fine to program it, but only has a low amount of flash memory. In that case, depending on MCU type and how much it has, SimpleFOC + Arduino won’t fit on it.

I look forward to hearing more, because I actually have one of these RMD motors somewhere in my collection, and it would be cool to suddenly learn I can run SimpleFOC on it :smiley:

1 Like

Thanks! I’ll post what I find in a few weeks.

I wanted to use simpleFOC on these motors too. Any success?

Hello - I purchased one of these motors for a force feedback steering dial. I want to connect this motor to my RPI5 through the CAN connection. I am having trouble with the RPI5 seeing any data from the connection.

I am wondering if I can fix the issue by installing and using FOC with Arduino code. I took some closer pictures of the motor that I have. I can only put one photo in a post.

Hi @Christopher_Coulter,

I have one of these motors somewhere. It looks well made.

The chip in question is this one:

But it looks like it is unobtainium… shame because it looks like a nice device for motor control…

it’s an ARM MCU so once you figure out it’s SWD and JTAG pins it should not be too hard to flash it. Without CMSIS headers developing for it will be kinda hard. Probably the company can provide those, but Arduino framework won’t be available, I’m guessing. So it will be a large amount of work to write some Arduino compatibility or to adapt the library to not need Arduino and compile for this chip…

On the positive side it has a datasheet in English. Most of the rest of the documentation is in Chinese…

All in all, a not small development and reverse engineering task where I would hesitate to do it if this chip isn’t really available to buy…

Damn, this is actually a pretty nice chip :slight_smile:

And what’s with this?

Looks like they have a PIO-like feature in there too.

I’m going to inquire about it, maybe they can be encouraged to put some on LCSC or digikey…

I found a document that details the protocols to communicate with the motor. It is here

The document that details it is this one - Motor Motion Protocol V4.2-250208.pdf

1 Like

That would be amazing to port Arduino on those, and even more to be able to get the chip for custom board.

I have to say that Myactuator firmware have been very disappointing, and for some project, I even had to simply replace the board with my own to have something useful.

This mean that I have a lot of control board to do test on.

I would love to help on this topic. I could for example take hi-res pictures of the boards, or try to plug a JTAG/SWD programmer.
This looks quite informative : https://www.spintrol.com/uploads/20220126/4f83ac199fb694f9a2c5bf3a4c5ed261.pdf
Having a blink hex file to flash for this would be a great start, I might try to play with Keil MDK (never used).