YAFO: Yet Another FOC controler

Dear All,
I am designing a STM32-based BLDC controller called “YAFO”
Initially I posted it on Endlessphere forum because lot of VESC variants and experience sharing.
Then I realized that it could be possible to run SimpleFoc firmware, of course without having VESC tool monitoring. It seems there is also some kind of monitoring with SimpleFoc.
So, we are now facing a double choice while keeping the same hardware.
Any comment will be welcome.

3 Likes

Why choose.
You can get it to run in little time on SimpleFOC.
And port something else with more advanced control (e.g. smartesc) but it will take more time and you will have less support.

Ah it’s a f4, so the vesc firmware or mesc should run on it as well?

Have you got it produced? What kind of cost per board?

Regarding VESC firmware, I say yes because I took some ideas in the below list


In addition to this, I have downloaded VESC firmware source code, changed some parameters in the hwconf directory, and then compiled with success. Just to evaluate the amount of work for customization.
Regarding MESC, I must admit that I did not give look (yet) at it.

No production. Just a hobbyist project where cost is not the highest priority.
Reliability and robustness are.

OK I misunderstood the initial query.
I thought you only wanted a firmware that can interface with Vesc tool, without running Vesc firmware. Smartesc does that.
But you can run Vesc firmware directly.

I am trying to join the VESC forum but it won’t let me post, for a day now. IDK what’s up with the VESC project, on the one hand it’s where I want to be already except the software doesn’t seem to be modular and well documented, and it’s not clear who is doing the dev work or whatever. It looks like it’s going to become another o-drive. Some people on the forum are saying large changes to the firmware have been made but aren’t published yet, also the xESC guys seem to have a terrible time getting it working on new hardware.

I honestly don’t know what’s going on. SimpleFOC I think may be fairly described as a set of modules which a lot of work has been done to get broad compatibility, whereas VESC is going through to the end to a complete motor driver but they are kind of taking shortcuts that make it hard to use the firmware with other hardware and thus produce drivers with different properties.

I believe there is a golden mean, we don’t need to be able to mix and match an enormous variety of hardware (and a toolkit that would allow this is a very tall order), but we do need a wider spectrum of solutions than is coming out of VESC.

VESC is particularly interesting to me because they seem to have got sensorless FOC working even at zero velocity ok, however it remains baffling to me how their system works, it is not documented and explained the way SimpleFOC is. And it only runs on hardware which is totally unsuitable for me.

As an aside, Getafix, while I would hate to deter any efforts or come across as negative, I wish you would just help with the next flagship SimpleFOC board, there are an enormous variety of “motor drivers” kicking around, and if you actually try to evaluate their usability, very few of them are at all usable. What always happens is people start out with great ambition and realize it’s actually way harder than it looks, then they give up halfway or only get things working at the bare minimum level for their own exact scenario.

If we would just survey the common use cases and identify the vacuum in the existing options, which I think we have, then collaborate to methodically fill that, I think that would be a better way to build the open source technology base we stand upon.

If you look at this forum for what people are trying to do, we are converging on something like the QUADVRANS or LeptonG4, with an MCU of the same variety as the b-g431b-esc1 board, which works reasonably well with the code base already and is powerful feature rich and easy to get ahold of/have boards made with, and then fishing around for particularly highly available and cost effective components like the mosfet drivers, mosfets, current sensors, then applying lessons learned (break out lots of pins, current sensing has many uses, use an Xtal not internal oscillator, perhaps explore tricks to improve current capacity without using relatively expensive PCB technology (like flooding areas with solder manually), the importance of snubbing on the mosfets and many many other things that I don’t know but others here do).

Even the use of the open source hardware website and their jlcpcb integration etc. is a trick that’s in the bag here, so anyone can easily order copies of a board.

I don’t think it’s very respectful to kind of tell people around. I understand you haven’t found hardware that works for your case, but it’s just not true that user-designed drivers are not usable.

Wow, very interesting. Do you mean that you made a software that could run on VESC hardware boards, Which could also use VESC tool ?

VESC is particularly interesting to me because they seem to have got sensorless FOC working even at zero velocity ok,

Thats exactly what I am looking for. Sensorless working close to null speed. Thanks for this input.

So it seems like you didn’t investigate before coming here

Well, I must admit that I focused first my attention on all STM32F405-based designs only because I wanted something 100% compatible with VESC. That was a huge task.
I found endless sphere very useful for this preliminary stage.
After some rough calcs on power stage, I started to design YAFO. VESC based.
Then I took time to go deeper in this forum and I came to the conclusion that it could be possible to run Simple Foc on YAFO.
So now, on the paper , I have 2 software solutions for the same hardware which seems really smart :slightly_smiling_face:

1 Like

No. Simplefoc is a given as it has low hardware requirements.
But you cannot compare with the vesc features.

I would like to add that I did not found a hardware design with the following specifications:

  • 14s Battery
  • 50 Amps per phase
  • TO 220 FET’s
  • Classic 8 pin drivers for each leg.
  • Ease of DIY soldering AND servicing.
  • No fine pitch components, except MCU (no choice !)
  • Running VESC FW compiled with the appropriate parameters set
  • Full compatibility with VESC tool
  • 4 layer design PCB
  • HAMMOND 1490WB Aluminum enclosure (106mm x 54mm pcb size)

So, the answer is: Do it Yourself !

2 Likes

Have you checked mp2?

I have understood that MP2-ESC doesn’t allow compatibility with VESC tool.
I have also understood that it will need the STMCube environment, which is a little bit more complex to learn. Therefore, I like the hardware design using TO220 Fet’s

Oh, I don’t mean like a factory, just was wondering if you have an idea of how much the design costs to build.

No idea yet, because I am at the very early design phase :wink:

No. Simplefoc is a given as it has low hardware requirements.

AFAIK Simple FOC is also able to cope with STM32F series, and that’s great !