Idea: ask STM for a bit of funding to make the next gen open source flagship board, and a demo sensorless program

I’ve been thinking, STM releases all kinds of code and software that they don’t charge for, to try to sell more chips. We can offer a way more interesting reason to buy their chips. We have pretty much converged on using their G431 chip anyway for the next go-to flagship board for SimpleFOC, I think that’s fair to say? We have a big head start because of the work done on the B-G431b-ESC1 board, the supply chain of the chips is well worked out etc.

We should approach them with a proposal. I would propose the next gen flagship board. I would comb this forum to identify the most important features (has to have good current sensing for advanced sensorless i.e. low noise, responsive, lots of pins broken out, an indicator led or two, snubbers on the power stage probably, the possibility to flood with solder or put some large gauge copper wire in the right spots to increase current capacity, leave some space on the board for an XTAL or can oscillator just in case someone needs it, stuff like that), draft a board and ask for error checking on the forum, then get it made and laboriously try to plot a course to implement a good sensorless driver. I like sensorless for many ways at this point, I think it’s actually got a ton of promise, you could even make a sort of servo-motor with it, using advanced algorithms.

Where would we send the proposal though? Anyone got some contacts? I don’t think emailing their public facing email address is likely to work very well…

1 Like

ST has quite a lot of boards available already for “components cost” or less, and they support those with their x cube mcsdk… You can see all the boards at this link X-CUBE-MCSDK - STM32 Motor Control Software Development Kit (MCSDK) - STMicroelectronics

I’m obviously not speaking for STM, but given that they already have a full range of boards and software, I’m not sure why they would want to add more boards or code to support. From my experience contacting them for the mcsdk thru their forums, they don’t seem to be interested in providing any help to hobbyists for these products. ST invested a lot in making Arduino work well for their processors, but they don’t seem that keep for brushless controllers.

I would try asking their forums first, and see. In companies like ST, having a single passionate employee makes all the difference (that’s how the Arduino thing came to be: one of the ST employees spending time on the old STM32Duino forum)

Yeh, it would be nice to have closer contact with stm. They make excellent chips, but their boards are never quite what we want (B-G431b-ESC1 is brilliant but flawed for robotics applications). I’m sure we could given them great insights in what would be super useful but unless we are buying 100K chips I imagine they see simplefoc a bit niche and opposite to their desire to differentiate themselves from other suppliers.

I do find it odd that these suppliers still think that an ancient eclipse based IDE that is super proprietary is what developers want. STM have done an excellent job of making vscode + platformio + stm hal / stm LL with arduino a usable option, so they are offering a viable alternative (hats off!)

1 Like

This also stumps me!!!

“sunk cost” is a powerful fallacy for big companies. And don’t get me started on their HAL: the most bloated and pointless abstraction layer. It’s a hard thing to achieve: so much bloat and inefficiencies, yet each processor needs a different version of the HAL. Abstract nothing, bloat everything (ANBE instead of HAL). I’d happily pay the bloat price for a true abstraction, but the HAL fails miserably there. The LL libraries and even more so the old SPL libraries are the way to go. Luckily, CubeMX allows to use mostly LL for all the peripherals, requiring the HAL only for USB and other higher level functonaity

yeah but you can’t use those in a design. It’s against the licensing terms, and that’s no surprise, they aren’t going to let you buy thousands of the dev boards they sell at a loss.

The crazy thing is it’s actually the opposite. Any developer that was actually making a motor driver would probably prefer to work with something more like SimpleFOC than that crazy motor SDK they have. Unless they were already a whiz at it all. There is a gap in between, but it makes way more sense to close that gap the SimpleFOC way; modularity, open source flexibilty. They don’t charge for their code anyway, why do they keep it closed source? It makes no sense, unless they are afraid someone is going to use it with a different MCU, which is not a very rational fear. They are both trying to lock things down and not lock things down.

If I were them I would either make a complete motor driver board and just give people what they actually need anyway, or make modular building blocks. Not like wacky shaped building blocks that are ridiculously hard to use anyway, if you can succeed at all; good chance you will try and it will be just a waste of time.

Well, I observe that most of the MCU makers out there, be it Microchip, Renesas, Atmel (before Microchip), STM32, Lattice or NXP, they all produce similar IDE products, mostly free to use, and many of them based on eclipse though some seem to be derivations of Visual Studio (the full thing, not VSCode).

The choice of eclipse is a fairly natural one for a big company - its free, extensible, maintained by a foundation but backed by IBM, cross-platform (in terms of running), supports multiple languages, has support for gcc, built-in upgrade and plugin management, built-in marketplace and supports the creation of complex, sophisticated GUIs.

A company can do a lot worse than just taking all this for free, and extending it in ways to make it more useful for a specific product range… and I mean this both from the users point of view and the companies point of view. Building on something capable tried and tested - like eclipse - makes a lot of sense.

And given the choice between ArduinoIDE (now also based on VSCode) and Eclipse based STM32CubeIDE, I’d take Eclipse any day :-). so open source doesn’t automatically mean better…

In the end, I think from a technology point of view, Eclipse was a solid choice some years ago, and these days VSCode would be a more up-to-date and equally solid choice on which to base your IDE.

But lets keep in mind that VSCode is actually proprietary, owned by Microsoft (who have these days somehow become the good guys :slight_smile: ) while eclipse, as mentioned, is open source and controlled by a foundation…

But I agree that as a user it’s very cool that you can also use VSCode and PlatformIO for Arduino coding - it’s what I use myself, mostly. We have the PlatformIO guys to thank for that, not only STM32. PlatformIO is a Ukrainian company which does the VSCode plugin and the required adaptation of the Arduino framework (and other frameworks). It’s quite impressive what they’ve achieved.

ST Micro in turn makes PlatformIO and Arduino possible on STM32 by providing stm32duino (although admittedly we had maple core before STM32 released its official core). stm32duino is open source, and actually the HAL libraries and CMSIS are also all available in code (though I am not sure what the license terms are).
So I actually don’t agree they’re that closed in terms of their approach here either…

I don’t know how much of their motor SDK is available in source.

Thank you for your vote of confidence :slight_smile: but I actually don’t think that’s the case. If you watch their demos or check them out at a convention, what you can achieve using their tools is actually pretty impressive.

VS Code is under a MIT License GitHub - microsoft/vscode: Visual Studio Code (in particular, which is quite the opposite of proprietary. Arguably, the MIT license is more permissive than the Eclipse one.

Part of the reasons why Microsoft is not automatically considered a bad guy, these days :stuck_out_tongue_winking_eye:

Achieve using their tools - in terms of near term performance wizardry. With how much labor effort multiplied by skill, though? And how’s the longer term prognosis for a system based on their stuff? I think when you put it all together, the labor effort*skill required to use an simpleFOC like thing, which they put that labor effort into instead vs. their motor sdk (so not a comparison between their tools as they stand and simplefoc as they stand), is probably better. You could mix up what you needed a lot easier, which means broader applicability and more users, more chips sold, in the end.

If the theory is that wizards are going to take their stuff and make exact specific motor drivers, I have to wonder where all these motor drivers are. If you could just buy the on aliexpress, I would. But there aren’t any like that kicking around, and I have been on alibaba looking for them, too. I’ve searched a lot, actually. So I don’t know who’s using their sdk or who’s using their chips. I’m betting Arduino sold a lot of chips for Atmel. If I had been atmel, and I knew that was a possibility, I would have supported it, I assume they did.

Don’t get me wrong! I’m a VSCode user, a huge fan and user of GitHub, subscriber to Office365, user of Azure cloud and user and also fan of GitHub Co-Pilot.

Lately, Microsoft has been producing amazing stuff, and supports open source in many ways.

But I’m also old enough to remember a time when things were very different, and they were actively working against Linux and open source. So I also can’t help but be a little suspicious of this new Microsoft :wink:

I think you’ll find all these motor drivers embedded in products, millions upon millions upon millions of them. That’s your electric drill, your washing machine, the dryer, the kitchen fan and the garburator, the lawn mower and the electric blinds, and anything around you that you see that moves. They all contain embedded motor drivers, and none of them are built with Arduino-compatible driver boards inside them.

I think Arduino has done amazingly well - 10 million boards sold in 12 years or so. I think that can be considered a successful product. :slight_smile: While the majority of the boards are Atmel based I suppose, Arduino has not been very “constant”, variously using Atmel, Microchip, Ublox, ESP32s, RP2040s, STM32s and more recently Renesas chips on their boards… so its not like they’ve stuck to one series.

I am not sure how that compares to a “real” product like a car or a washing machine. My hunch is that a successful washing machine controller series or something like a ABS controller for a car sells more than 10 million units in 10 years, but I don’t know.

But certainly the “SimpleFOC market” – for inexpensive maker-style prototyping ESCs with open software – is a tiny one in comparison. I don’t think the big companies can be blamed for not giving it much attention.

And politically, the recent switch of Arduino to from STM32 to Renesas might also make it harder to get their support for your project, you might have an easier time talking with Renesas. :wink:

I’ve been on alibaba searching for motor drivers. They all suck. I would also say that the ones in the drills etc. also suck. They are loud, poor efficiency etc. etc. The only thing going for them is they are cheap. And it’s also true that they keep reinventing the wheel.

I’m not necessarily arguing for arduino compatible stuff. I’m just arguing for general purpose broadly compatible modular components and effective collaboration between stakeholders, ultimately. I see a lot that is not getting done. I see a lot of repeated effort. I see people repeatedly rolling their own motor drivers and only achieving the bare minimum, and thus getting a poor result compared to what is clearly possible by putting together the research, the labor effort and the basic parts we do have, to build a foundation upon which we can stand and thus reach even further. Preferrably to build more foundation, and then reach further still.

What we have right now is some foundation to stand upon - the microcontrollers, the ability to produce whatever PCBs we designs surprisingly efficiently - but resistance to recognizing that if that foundation has value, so does more. Why not keep going? Instead people try to slap together stuff on that foundation that quickly collapses when you try to stand on it.

I’ve designed several things already in the past year that needed a good quality motor driver, and I’m faced with this quandry again and again; a lack of foundation that extends far enough that I can build upon it and actually get somewhere. I keep being faced with the need to build a motor driver before I can build a fan before I can build a hepa filter appliance that’s any good, for instance. It’s always the same story, and I’ve been noticing.