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

Hi all! First-time poster, avid reader.

For a project I needed something cheap, small and a little better than your average quadcopter ESC (mainly FOC and more telemetry / operating modes). The robot these will go in needs to drive 12 BLDC motors, spread over 6 boards. The motor needs are quite modest (5A cont, 10-15A ~3 sec), but I decided to make the ESCs a little more powerful for lower heat production and versatility.

The PCB is 45 x 30mm and (hopefully) does 2x 15A continuous, maybe more if the XT30 and attached trace allow (doubt it). The MCU is the new Espressif ESP32-S3. The boards do in-phase current measurement and have a Hall sensor header as well. All-in-all I’m quite happy with these so far, but I’d love to have your comments and critiques.

The board:

Schematics:

7 Likes

Welcome, @StefanH, and thank you for writing such an excellent first post in our forum!

Looks really nice! I have to study it a bit more in-depth later this evening, but one thing I noticed immediately is the JST-SH connector for USB - is this something you’ve done before? USB cables are shielded and normally fairly high performance things. Of course this is only full speed, but still… Can’t you move things a little bit to fit a USB-C connector?

I love how neat the layout is, and that it’s top-side only. How many layers is it?

How big are those mounting holes? I ask because there is no space around them for the head of a screw, so the screws better fit within the diameter of the hole’s pad. Incidentally, why the pad? Is the mounting hole also a GND-via?

Thank you for the warm welcome!

Definitely! I’ve done dozens of board designs with it, as these connectors don’t suffer from a large overhang like all USB plugs do. For rough environments it’s a big improvement in reliability. Occasionally used for 480Mbps too, USB 2 is a really forgiving protocol (open a PC case to see). Unlike USB 3 btw.

It’s a 4 layer 3/1/1/3Oz board

2.7mm diameter, suitable for M2.5 ISO / DIN standard hex socket head bolts. The pad is indeed attached to ground, which isn’t very needed, more a personal preference.

I like this too. It gives you somewhere to attach your scope probe’s ground clip…

@StefanH

Thank you, that’s a quality post. Very educational.

Have you manufactured it yet? Some of the components you used are not in stock, how are you sourcing the components?

Also, I tried the EGMicro driver on one of my boards and it didn’t work, have you tried it yourself? I’m not sure what the problem was, but didn’t have time to dig deeper. Any feedback?

Cheers,
Valentine

Painfully would describe it. I’m preparing the first batch now. Are you referring to the ESP32-S3? If so then yes, I should get just over a hundred from the last supplier I find having them in stock. If you mean another part please do let me know! My PCBA service did a supply check and all seemed ok a few days ago.

That driver is a big question for me too. Haven’t used it yet, but others I could find seem to use it (including some ESCs I have here). What didn’t work in your board? I’d love to compare notes!

Side note: Since the v2.0.0 schematic above I added the ability to measure the input voltage (to ADC1CH7)

I refer to the current sense amplifier. It’s out everywhere. Where do you source the components?

Also it’s very hard to get 3/1/1/3 oz copper SMD-ed, and if you do, it’s really expensive. Where do you SMD the board?

I tried the EGMicro on three boards, different designs, and didn’t work, not sure what’s going on there, so I just abandoned the idea.

That’s a 30A ESC board with EG Micro I designed some time ago.

I’m extremely busy and didn’t have time to pursue further the EG driver idea, but at some point later I will try do find out what the issues are. I cannot spend more than an hour a day right now due to other commitments, so I’ve put these on hold.

Let’s keep in touch, it’s always very educational to find others doing board designs.

Cheers,
Valentine

PE

I also made a current sense version of the EG driver ESC

Then I used the Silumin driver which works fine, on another board. For time being I abandoned the EG driver.

Anyway don’t mean to highjack your thread, just pointing out the EG driver issues I encountered. Please post your experience, I’m very eager to learn.

1 Like

Not at all, I’m grateful for you pointing out the issues with that driver!

I might just do the same and drop it.

About the amps: These specific (twin) ones aren’t as desirable and can be bought from Mouser. Just posting this scares me, as Mouser had the S3 in stock in the thousands as well, all of which disappeared in a day or so!

About the copper: I checked with HTY -a regular supplier- and going from 2/1/1/2 to 3/1/1/3 was quite reasonable price wise (approx 8% overall price increase for a prototype run of 10 boards). Anything beyond 3/1/1/3 was far more difficult.

1 Like

I checked the image above, are you missing the current limiting resistors on the gate pins? I see the bootstrap caps and diodes, but no set of 3 resistors?

https://datasheet.lcsc.com/lcsc/1810010132_EG-Micro-EG2133_C190343.pdf#page=7

R4 and R5 on page 7.

You are talking about r4 and r5?

They are not needed in most cases, you add them and the diodes only in case you want to control the slew rate of the mosfets and protect the driver. Since this is a really simple and cheap board which won’t be passing any FCC certification, I omitted them. The resistors are for the mosfet’s benefit, the driver doesn’t know about them. Unless, the driver is so bad, that it cannot charge the gate capacitance, and the current overwhelms it, in which case, they are REALLY needed, but that simply means EG is a really bad driver. I might check that and add the resistors to see if the driver wakes up. But even if it does, then I’ll probably abandon the EG driver and go with either the Fortior (same footprint) or Silumin (a little different footprint but I have proven it works).

I’ would have never picked the EG driver, had it not been for the silicon shortage, there are so many much, much better drivers, all out of stock.

Cheers,
Valentine

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: UNI-SEMI | UNI-SEMI U5315 | Gate Drive ICs - LCSC.COM

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.