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.