Tiny dual ~10-15A FOC ESC based on ESP32. USB host interface, in-phase shunts, up to 6S batteries

These days I avoid anything which is not on LCSC, and do mine through JLC because the moment I put an order they immediately lock inventory for me.

HTY is Chinese only, no English. I need to get my translator for that and it’s a lot more expensive than going though JLC (they don’t do anything else beyond 1/0.5/0.5/1 unfortunately).

If it’s not a secret, how much is a batch of those 10 PCBs, including the components, with 3oz copper and SMD, at HTY?

Cheers,
Valentine

JLC did one job for me and did such a horrible job of it, with a subsequent indifferent customer support that I’ll need a very good reason to ever consider them again.

HTY’s sales direct speaks English and normally handles my orders (and my client’s). They also have an English brand site, but didn’t have that at hand.

Approx 600 USD for 10. HTY tends to be on the expensive site for small orders, but in most cases are quite competitive in (small) series.

That’s really interesting. JLC has never made any mistakes and the support staff have been very helpful. They even took orders off the production line for me, or re-shipped for free when DHL messed up my shipment. May be because I’ve been doing this for a long time, I naturally avoid making any design decisions that would create problems for them, that’s also a possibility.

Do you have the site handy, if you don’t mind?

Thanks, that’s really helpful. Yes, they are rather expensive. I do a lot of experimentation with different designs with very quick turnover and multiple revisions, so JLC is probably my best choice now. One of my boards went through probably 5 or 6 revisions before I got it to work the way I wanted, and even then I have probably 3. may be 4 more revisions to go before I get it to real production grade. $600 per small board would be $6000 for a 10 revision production cycle just on the PCB.

Please post any pics of the completed board.

If it’s not a secret, what PCB designer software you used to lay out the board?

Cheers,
Valentine

KiCad (usually the latest builds from Git). Works quite well for me.

Sure, found it: https://www.pcbasic.com/

These days I rarely do more than 1 prototype run per design so for me it’s easier to go with a factory with more capabilities than JLC. Plus I avoid hand soldering like the time sucking plague it is, so I need a place that delivers a complete and working board, not with some ICs missing because they won’t carry it.

1 Like

The original iPhone PCB went through about 10,000 revisions, imagine that…

Good luck with your board and post come cool pictures.

Cheers,
Valentine

Well, I’d do more revisions if it was feasible, but with changing times come changing work approaches. Extra engineering pays off when parts are hard to get and lead times long (as you never know if you can get the same parts a second revision).

Digging through the LCSC catalog I came across this chip, twice the price of the EG driver, but pin compatible: U5315 UNI-SEMI | C2892899 - LCSC Electronics

So compatible actually that it looks like the EG might be a cheaper version / knockoff of their older U3315 product (same datasheet images and all). The U5315 seems to switch a bit quicker and wait a bit longer (more dead-time), while doing slightly less current.

You are correct. Also, there is another knock-off of the same chip, if I dig a little I will show it to you. So there are four versions of this chip, Fortior, EG, UNI and that one I’ll look for, just hold on to check my database.

Fortior:

EG has another version of the same chip, too:

OK I was wrong, I was thinking of Princeton Tech but their 20-pin driver is not a knock-off of the UNI/Fortior, it’s a different driver similar to the Silumin driver.

These are all the TSSOP-20 drivers currently being made:

Cheers,
Valentine

I like PCBWay, personally. Only good experiences with them.

I recently found this site, right in Europe: Build your electronic prototypes and small batch EMSFactory
Prices don’t seem too bad, PCBs are pretty competitive once you factor in shipping, tolls and EU VAT on a Chinese-made order. Assembly is a bit more.

One super-cool feature they have is instant online parts quotes from your BOM file, including availability checks across a range of suppliers. That’s a neat feature.

On the technical side, I looked at your design a bit more @StefanH, and for what my amateur opinion is worth, I like it.

It’s for up to 25V? The EG driver datasheet is a bit unclear if it supports 20V or 25V…
And do I see correctly that the 5V is always externally supplied, via the JST (USB) port?

1 Like

The EG driver is up to 600v on the high side and 12v on the supply side with 3.3v compatible logic, if I could decipher the really poor documentation even in Chinese. I very seriously doubt this driver could survive 600V however. In the same document it says it’s up to 300v. Doesn’t really inspire too much confidence. Also, there is a reference to a VDD pin which doesn’t even exist, so they probably meant Vcc.

Huh, you’re right, I got confused by the Chinese datasheet - the one linked by LCSC seems to indicate 300V and either 20 or 25V for VCC, depending on which part of the datasheet you look at…
In any case, the INA2181 has 26V common mode range, and the FETs are labeled 30V, so I don’t think its a high voltage design…

I would not try anything beyond 24V, and probably stay on 12v just in case. There is just not enough silicon, literally, to support such high voltage. The driver is so small, compared to 600v Infineon 3-phase drivers, which are physically gigantic in comparison. You need a lot of extra silicon circuitry to achieve 600V designs.

Infineon 600v driver 3-phase

EG Micro driver 3 phase

Thanks! Of those it seems only the UNI and EG ones are in stock, so I’ll give UNI a try.

Me too in general. I’ve used them a lot as well (and compared to HTY). HTY tends to be a bit more expensive on the sample side, but they are quicker in general and cheaper in series (once you hit about $800 at PCBWay). For example above board was $800 for 10 at PCBWay in 2/1/1/2.

Thanks, interesting site. Didn’t know of them yet.

It’s designed to work with 6S LiPo packs, protection features kick in at 26V. A 6S battery will run at 21-22V loaded, keeping some margin.

Yes, it makes more sense (to me) to take 5V from a collective source, as it’s only direct use is to power Hall sensors, the rest has LDOs so local conversion doesn’t gain much and adds cost, complexity and board area.

I’m hoping to get these down to a $25-30 level in reasonable quantities so they can be on the market for about twice that.

Just to see if I understand correctly. The hall sensors will be used to positioning. What impact does that have on the performance relative to sensorless ESC’s or magnetic encoders.

Obviously the resolution will be lower, but that might not be a big issue?

BR Andreas

Application dependent. The gist of it is that FOC and other sensorless techniques won’t work so well at low speeds (worst of all starting), high load variation during a single cycle or for holding position (servo-type behaviour). On the upside there’s nothing to break or buy on the motor side of things.

Of the sensors Hall are by far the most common. Also by far the cheapest (both the sensor and supporting electronics). Hall sensors allow a motor to start from 0 speed and deliver good torque right away. They also work at pretty high speed due to the low resolution. Note that they measure phase position, not shaft revolutions / position. Encoders tend to measure shaft rotation, optionally absolute. Encoders work great for positioning and starting, but get expensive and unreliable real fast if you still want that accuracy at high RPM.

There is no right answer when it comes to this. It really depends on what you want to use your motors for.

Another excellent feature of hall sensors is that they’re placed off-axis, so you don’t need a perfectly sized through-hole encoder or access to the shaft end like a magnetic encoder. And measuring motor shaft position is fairly useless if you have a gearbox, so I don’t really consider that to be a disadvantage.

One thing I’ve been wanting to try with hall sensors is high resolution position estimation by using the past few sensor state time intervals to estimate the velocity and acceleration of the motor, and extrapolate that over the time since the most recent sensor change. Won’t work at near-zero speed, but should allow proper FOC once the motor is turning.

I’d also like to add compensation for imperfect sensor positioning, by slowly rotating the motor and recording the exact electrical angle fed to the coils when the sensors change. It’s a challenge to get the sensors positioned accurately enough on tiny motors, and I have some skateboard type motors where the sensors don’t look like they’re positioned quite right. Not sure if it’s just poor manufacturing, or to try and improve the timing if you’re using an ESC without timing adjustment. Though that seems like a crap shoot because depending on which way the motor turns to go forward, you may have the timing doubly off…

Are you working on a quadruped? That’s the first thing that comes to mind for 12 BLDC motors with current sensing :slight_smile: I’d love to build one of those if I weren’t already busy with an even more exciting project. Though I want 14 motors, adding a third segment to the hind legs like just about every real four-legged animal.

Good point, yes!

This is for an AUV design (underwater robot), to do thrust vectoring. But I suppose they’d work equally well for legged robots.

Quick update on the ESP32s: My batch was shipped! They have some left in stock, but at much higher prices (still not STM32 territory though).

1 Like

Ah, ocean exploration is indeed awesome as well.

If you haven’t seen it already, check out Nanoparticle’s thread on the use of linear hall sensors. That eliminates the need for my position extrapolation idea. And since it only uses two sensors, you can simply bend them closer or farther from eachother until the sine waves are exactly 90 degrees apart. With regular halls you have three of them to get precisely spaced, plus you have to position them precisely relative to the stator so the sensor state changes happen at the right time for commutation. Much more difficult.

Did this one work? Is the Kicad available anywhere?

Are you happy with the capacitor values on your voltage reg. 78L10G-AB3-R has different capacitors (0.33u and 0.1u). Also you have two LDOs both doing 3.3v - looks like one for analog. Is that because you need 200ma or trying to keep voltage separate? I usually see designs with ferrite beads separating 3.3v and 3.3vA.

Not sure what load you are expecting, but bulk capacitors are popular on high amp boards. (Edit - just seen your army off 22uf!)

No antennae - an esp32 without wifi makes me sad.

Looks like a lovely board btw.