What would be really nice: reprogram a $6 ESC!

You can order it from jlcpcb. I can help you with the order if you’ve never done it, and you can sell it. Costs less than buying pizza. Builds character and enhances your courage and expands knowledge horizons. I’m not being sardonic. I’m very serious. Human frens will be very happy. Just please don’t make me post a happy pepe meme. We are not 4chan.

My paper designs usually work 80% of the time. If they don’t, we will re-design and re-order.

You may be very surprised hw cheap they are to order from scratch. Got a credit card?

Not really. It’s been done many times before.

Well, let me check the available components. If you are interested, I’m interested too.
It may not happen tomorrow, or even next week. I’ve got a lot many other things going on now.


available from multiple sellers at a similar price, so they are unlikely to become unobtainable real soon https://www.aliexpress.com/item/4000386815523.html?spm=a2g0o.productlist.0.0.8054306f5dJRYs&algo_pvid=bcec89eb-917d-4af3-bde8-007183d5a69e&algo_exp_id=bcec89eb-917d-4af3-bde8-007183d5a69e-48&pdp_ext_f={"sku_id"%3A"10000001581643929"}&pdp_pi=-1%3B9.39%3B-1%3B-1%40salePrice%3BCAD%3Bsearch-mainSearch

32 bit ESC, $9 usd.
That appears to be an outlier. Not clear what microcontroller, but you can see the pads in the image for programming, if the programming cannot be done through the servo wires, which I think it probably can.

the next cheapest I could find is

That’s very cool of you. No happy pepe memes, I promise.

I think I can promise to try it and use it if it works, and pass the savings on to people, and it will become part of the commons of design. I think that or chopping up an esc to access the output stage are the best hopes I have. Chopping up an esc would be at least $6 CAD per motor, probably more because these ones I have are the cheapest but they won’t work, but then it would be open loop, which may not work. Open loop is of course less energy efficient, which means the extra energy goes into heat, and these motors can hardly hack it as it is even with a proper controller with back emf feedback.

My current plan is to use rubber mounting washers and the reflashed cheapie escs, but if I in the future can get a line on a sinusoidal drive of some kind, with closed loop to maintain motor power output, then I can swap it in and roll with that and it will be even quieter still. It would be nice to make the motor controller open source as well.

Are you east coast or west coast timezone?

I’m in eastern standard time, same as Toronto and Montreal.
more research to determine the competition or other potential options:
Project | Modified ESC for Bidirectional BLDC Control | Hackaday.io these guys are trying to do something similar. they note that blheli32 supports sinusoidal drive
https://github.com/SAR-mango/SinESC dead project to make a sine wave drive esc
BLHeli32 100% Explained - Part 11 - Sine Modulation, MIn Max Center Throttle - YouTube blheli32 appears to indeed support sine wave drive, or it used to anyway. it is not mentioned in the post from the manufacturer because it wasn’t added at that time apparently.
The question is the price of them and how they compare to other options. It turns out the esc has to be made with blheli32, you can’t get a cheap one and then flash it on after, or it is not very practical, they put restrictions in the software to prevent it.

Flycolor 36A BLheli_32 32bit 3-5S Brushless ESC w/Telemetry another source of the flygood one, similar price. more reliable information.
ok so the flygood one is a serious contender, but $30 Cad, and it has to be one for each motor. That’s $60 per ventilator, compared with 12 bucks for non sinusoidal ones. A factor of 5 difference.
The vgood one is 32 bit and may implement sinusoidal drive, and may not. There appears to be no way to know. I guess best bet is that it does not, as it is not mentioned in the marketing material anywhere, I googled for Vgood esc sine and there is nothing. maybe I should order just one and see, as it would likely be the winner if so.

these guys started investigating reprogramming and esc but they went silent for some reason, never reporting back with whatever findings . apparently it is an stm32 chip, I did not realize that. BLHELI32 ESC feasible? - #7 by MatthiasSchneider

Here, this is the basic design. I’m going to call this ESC the name Lepton. If you make 10 or more at a time, it will be less than $10 USD excluding shipment (extra $4 per batch order).

So, how is $5/board looking for the basic components, including manufacturing? I stil need to add the capacitors and some other basic components, and then route the board. You have to solder your own wires and add a bulk capacitor, but that would be gravy.

Size of board is 25mm x 25mm (2.5 x 2.5 cm). 32bit MCU with 64kb memory, more than enough to run full-blown open-loop SimpleFOC. If you want to add resistors for back-emf, we have to add may be another 5mm to the size of the board.

This is 22A continuous current, up to 40A pulsed current.

I believe I could get it under $10 USD for sure. I added the rest of the more expensive components.

You must add an external bulk capacitor, and external 3V power and whatever PWM or other way to control the ESC however and solder your own wires.

Currently the cost is $6.40 per board for ordering 10 board batch. This is the full BOM below. I will add the rest of the components tomorrow and route the board.

1 Like

As usual, amazing design in such a short time @Valentine !

@Anthony_Douglas , it seems you have come quite far in your research. You can definately run the motors off BLHeli or SimonK type firmwares, and sinusoidal commutation in open loop could be a solution for you. But that isn’t FOC, and these MCUs won’t be able to run Arduino Framework + SimpleFOC due to their limited resources. But maybe FOC isn’t needed for your use-case? In which case why pay the premium for hardware that can do it?

I think, and Valentine has more or less proved it, that the type of driver you need, and FOC-capable, is possible to do quite cheaply.

But reading this whole thread, I also think you’re confusing development and (marginal) production costs. The type of ESC products you’re looking at are hobbyist products, intended for modelling or RC racing users. They can be repurposed for development and prototyping, but you’d never put them into a real product. And since development and prototyping vs production runs have different cost structures, it should normally not be a problem to spend a few hundred dollars on different prototypes, for example by repurposing expensive and suboptimal off-the-shelf stuff. Then, once a prototype is working, you know the attributes of the design you need, you start to develop optimised boards for your solution. The final optimised design can then be produced in higher numbers at a very low cost per unit. Once you reduce it to the essentials, the drivers can be quite inexpensive, take a look at some of the hoverboard PCBs and how minimalistic they are.

In all of the above I am also missing a discussion on safety. Perhaps you have considered it, but from my point of view this should be a primary concern, and not just the cost.

A ventilator sounds like something you might have running continuously, unattended in your apartment. The $6 ESC is designed for outdoor use in a hobby RC-Vehicle or drone, where it is clear that you can only use it at own risk, not above people or roads, etc… I would consider these ESCs unsuitable for continuous, and esp. unattended indoor use - there are no safety features whatsoever, and the case/housing is non-existant…

Classical 1991 case. Takes 1% time&effort to get 99% funcionality and 99% time &effort to get the other remaining 1% . Problem is if the design is only 99% succesfull, that 1% failure edge case scenario will set your house on fire and kill your dogs or worse, your kids. When i fully wake up and have my coffee ill tell a very sobering story happened here in SV last ye ar to a startup company doing something very similar to this.

OK story time. A close friend of mine founded a multi-million startup for advanced UAV (octo-copters) here in BA/SV. Two years later, one of the copters caught on fire due to poor design during testing, burned down the entire lab, then the whole building caught on fire, burned all research and experimental data, and backups and everything. Luckily nobody got hurt. His company disappeared in a few hours. He was so mad he threw away whatever was left, and I went and pulled from the trash two of the rotors as a reminder what not do to when designing and running a startup. These are the rotors below.

Lesson to be learned here.

Each of these rotors today costs $1MM in imaginary money. The only thing left from the company. One of these is hanging on my wall where I work as a reminder.


This is a bit more final ESC design. We are still under $10 per board.

This is a full-blown 6PWM board with 32bit 64MHz MCU and integrated 30A / 30V 1/2 bridge mosfets, 5V tolerant PWM input isolated from the MCU and 5V input power separate from the high-voltage input.

Also I added bootstrap charge diodes for slow moving motors with very low/high PWM duty.

Now comes the really hard part, routing this will be a challenge.

That is pretty awesome. I would very likely need to implement commutation with back emf, yes. It think I mentioned that. The motors can probably not produce the needed power output without commutation, and encoders are too expensive by far. I can try to do the programming myself, I think, however it’s a concern. I seem to have heard that back emf in simpleFOC is not implemented yet, and I don’t know if it would be practical.

I know it’s not SimpleFOC any more, but from a strictly utilitarian standpoint, it might make sense to use one of the dedicated FOC control ics on such a board, though, that’s the thing that concerns me the most from an optimality/ is this the best way standpoint.

I honestly don’t see how the manufacturer can obtain the parts, with shipping and so on, esp in a timely manner, make the board and produce it for such a price. It must be highly automated and I assume only a certain selection of parts are possible.

Regarding development vs production costs, that model doesn’t apply to what I am doing. I am not taking that capital intensive approach. I will make one unit and make it workable, and yes it has to have a fuse etc., then I apply scientific and engineering knowledge for reasonable safety etc. and then publish. It’s just a different mode of operation. I will sell kits on tindie to try to make up some of my development costs, which is likely not going to even happen, but hopefully.

It is a very low speed, low power, low voltage device, it doesn’t plug into the wall, the power supply does, and it is ul listed etc. I think it’s quite reasonably save and so on, far saver than a drone.

Honestly, when/if I use this board, I think it is a lot sketchier to use the designs someone you don’t know off a forum gave you than to buy an ESC that is designed by a company that has legal liability, lots of resources, is identical to a great many others, and well tested. There could be errors in SimpleFOC above all, which as you know could lead to the hbridge shorting out, if some of the pins go on at the wrong time. Honestly, I hadn’t thought about it before, but it is a little sketch now that I think about it. I just recently had the issue of the approved hardware, the l298n board, not actually working, although it was not dangerous, when I updated the firmware on my ESC, it in fact did exactly that thing. The solder on one of the hbridges melted. I caught it and turned off the power supply fast enough, reloaded a different firmware, and it’s fine now. But still.

There are less severe issues too, like PID tuning, for example. In my limited experience I have already encountered situations where a PID controller that I thought was tuned started oscillating, which is not dangerous here, as it would be in a drone, which would fall out of the sky, propellors spinning furiously.

Not meaning to disappoint you however you know these “companies with legal liabilities and lots of resources” do not exist, right?

As you can see it takes a weekend by a professional to design something a lot more capable and better than whatever you could buy for the same price. Who do you think designed these low cost ESCs?

As they say, whatever rocks your boat.


PS FlipSky, one of the better known companies in the ESC market, has about 10 employees, and they occupy a tiny office in Shenzhen, China. That’s a room full of people. The rest of the companies are not even that big. Reality check.

Final silk screen. Ready to order.

1 Like

I think you have the wrong picture here. If you buy an ESC for $6 in china, the legal responsibility for what happens when it is used in USA/EU is all on you.
If you buy it from a store locally, they will make clear that it is for outdoor use, etc… they won’t assume any liability for things you may do with it. They will say - its a hobbyist device for use in outdoor line of sight RC racing, at the owners own risk. And besides, the owner assembled and installed it. If you buy a RTR model your chances might be a little better, but even here I doubt you’d make any kind of liability for anything stick, and certainly never ever for any kind of home-made devices…
The type of motor controller that comes with liability is made by Bosch et al, for use in vehicles, or by various manufacturers for industrial applications. Needless to say these will not suit your project price-wise or size-wise.

Absolutely true! I always try to point out, to make sure people are safe - it’s one thing doing a hobby project in the shed, or working on a prototype that will never directly be used in real life. Its another putting something in your apartment, running 24/7 and connected to mains power.

Much as I love our project here, I do think the FOC-capable controller of a reputable brand like TI or Trinamics would be a safer choice, but of course these driver ICs typically cost quite a bit. Those are performance ICs, but there are also less expensive fan-controller ICs, some for brushless fans, that don’t give you that kind of performance but are cheap and should run smoothly and quietly. Might be something to look at?

Hey! Nice job @Valentine !
Seems cool.

And just so, the quest for the Philosopher’s Stone continued. The promise of rediscovering the secrets of the ultra-cheap yet re-programmable BLDC Controller served as the proverbial carrot on a string that played a large role in driving the donkey cart of scientific pursuits of ancient and mediæval times into the modern age of advanced science and technology. The Reprogrammable ESC dates back thousands of years to a time in history when science, philosophy, magic, and mystery were synonymous. Hobbyists in former times addressed important issues such as the nature of reality, forms of knowledge, motor coil windings, technology, and the human condition. These lovers of wisdom attempted to understand and harness the forces of Electromagnetics through what might today be described as a multidisciplinary holistic approach. BLDC Alchemy began with the manipulation of analog and digital signals for hobby and industrial purposes. It was an ancient science of matter based upon trial and error. Early hobbyists sought to discover The One Board that would enable them to perfect motor control. The Reprogrammable ESC fit the profile so well that, because of their attempts to reveal its secrets, hobbyists developed equipment and discovered new substances and processes very relevant to modern science and physics. The secret of the Reprogrammable ESC – believed to be a key that would unlock the mysteries of motor design and control – played a central role in the hobbyists’ pursuits of all FOC traditions. Success at confecting the ESC was a rite of passage and a milestone accomplishment passionately pursued by ancient hobbyists and modern makers. Those who attained success became legends, whereas others were led to absolute ruin, madness and, in some cases, death arising from their obsessive pursuit of the ESC.


Amazing work! I would love to have a batch of those. How do we go about ordering them?

Talking about my scifi fiction essay or bldc board?

lol, it really is impossible to tell sarcasm from sincerity in text form. I was referring to the Lepton board.
Although on second thought, I don’t actually know how to compile SimpleFOC for it or upload to it either, and I don’t want to be too much of a nuisance.