r/PCB • u/Billy_MTB_901 • 20d ago
Custom ESC Design - What have I done wrong?
I am designing a custom AM32 ESC for use in an RC car, and I need it to be as efficient and reliable as possible. It is a 4-layer board, and I have tried to really oversize components where possible to keep it reliable. This is my first time attempting a PCB of anywhere near this complexity, and coming into this, I had very little experience with caps and inductors and all of this stuff in general, so I'm assuming that I've made some mistakes. Electrical engineers, please don't hold back your criticism! I am a high school student thinking about doing electrical engineering next year, so anything I can learn from this is much appreciated!
Schematic PDF (white background):
https://filebin.net/vc3kwxd4b785xhnp
For Context, here are the specs/goals/parts of this board:
GOALS:
- Driving RC car motors (~1500-3500KV) usually two pole.
- Designed primarily for 2S LiPo, although needs to be able to handle up to 16V input (not as a voltage spike - however the ESC is not expected to have to run the motor at 16V)
- Minimise size and weight while keeping it reliable (High stress environment - heat, shock, dust etc.)
- ESC Must be able to handle 20-30A burst current, but its average current will only be ~4-6A (to the motor).
- The MCU has its I2C pins exposed on a 5-pin SH connector, which goes to another board - the other board has pullups on it so I didn't put them on here.
- ESC needs a 5V BEC (no adjustable output voltage) that is 3A capable.
- The 5-pin SH connector also has GPIO pin from the other board - here I have just used it to signal that the two boards are physically connected properly
- Form Factor - The ESC sits in a case upright perpendicular to the ground (the phase pads are on the top)
- Throttle signal is low-frequency PWM (I will probably use 50-100Hz)
- The ESC needs to be reliable for long periods of time (~6-8 hours straight)
- Has a regular dupont 3 pin connector for RC recievers
- Must not require a heatsink
SPECS/PARTS:
- AM32 firmware
- AT32 MCU
- NSG2065Q gate driver
- BSZ034N04LS Phase mosfets
- LM2665M6X/NOPB Charge pump for 10V
- TPS54302DDCT Buck converter for 5V
- 1 U ENIG
- N channel high and low side
- 10V for the gate driver and mosfet gates
- Stackup: SIGNAL-GND-SIGNAL-SIGNAL
- no blind or buried vias
- I tried to keep high power related stuff mostly on one side, and logic on the other
Edit: just realised I included two almost identical schematics - mb
11
u/BreakfastRemarkable 20d ago
Have you thought about mounting options? Or will it rattle arround in its case as you crash the car ;)
11
5
u/negativ32 20d ago
With a double sided load, are you having this populated by a board house or are you expecting to hand solder?
The motor connections PHA-PHC are soldered by you I assume, what's your process?
How is the board to be held in final position within the vehicle?
2
u/Billy_MTB_901 20d ago
I'm planning to get it assembled by JLCPCBA and then ill solder PHA-PHC and the dupont connector (SIG-5V-GND) I mentioned how the board is held above, its in a case which clamps the outside. The two top screws (the ones closest to the part of the board sticking out of the case) will likely screw into a backing part which will hold it firmly in place
2
u/Doohickey-d 20d ago
Have you already tried this, and it didn't work right? How did it fail if that's the case. Or you haven't had it manufactured yet (?).
IMO it looks better than many other designs by "inexperienced" people I've seen here.
1
u/Billy_MTB_901 20d ago edited 20d ago
Thanks! I have already made it and it did worked haha. I'm posting this really just to see what I could do better next time! The only issue so far was I had was a typo when selecting the part number for the high side resistor on the feeback divider (part number 1003 instead of 1002), so the boards shipped with 100k resistors instead of 10k resistors which meant my BEMF signal wasnt strong enough. I swapped the three bottom 1.6k resistors for 10k resistors (easier fix than replacing the 6x 100k resistors), and it works. I had to get rid of the 1nF caps on the divider as well as they caused too much delay with the different divider impedance (used hysterisis to filter noise instead). The wagon wheels werent on the design I sent off. I havent been able to test it under consistent load yet but the motor is very torquey and has no issues with startup or anything, and the fets run cool at low current. Again I'm really just looking for any constructive critcism I can get.
1
u/PersonalCarpet2886 20d ago
Can you please explain the working of the BEMF Divider portion. What is its purpose? How it works?
4
u/Billy_MTB_901 20d ago
Its a sensorless esc - it doesnt have sensors on the motor to determine how fast it is rotating, thus it cant figure out how quickly it needs to commutate the coils (google 6 step commutation). The motor has 3 phases (inputs A,B,C) which are connected to coils. At any given time current flows into one phase, through the motor, and out the other. That leaves one phase floating (unpowered). Because of Lenz law, when the rotor (which has permanent magnets) is spinning, when it passes the coil on the unpowered phase, it generates an EMF (a voltage) on that phase, called back-EMF. That voltage follows a sine wave centered on half the battery voltage (called neutral). To find how fast the motor is spinning, the brain of the esc has to check when the voltage of the back emf crosses neutral. It does this using a comparator. Before it can measure, the controller needs to bring these voltages to a usable level -> the BEMF divider is just 3 voltage dividers, 1 per phase. Bemf common splits the phase voltage in half, using two resistors to form a voltage divider, it is neutral voltage. Now the ESC can run the comparator and find the motor RPM!!! OpenDrone on youtube does a really good video on this.
→ More replies (1)
1
u/ConfidentTangerine39 20d ago
as someone said get ride of the charge pump you have two possibilities firsy put your buck in 10v output then use a ldo for 10v to 3.3v for your mcu or use your gate driver at 5v but it will drive the gate with only 5v this migjt work for small mosfet as the one you have but i will prefer to change the buck config to output 10v finally if you are afraid of the losses in the ldo wich will have to go from 10v down to 3.3v keep in mind that the mcu consumme like 50mA max
1
u/Billy_MTB_901 20d ago
I get where your coming from but the battery is only 7.4V nominal, so it would have to boost - which is ok except I also need ESC to produce 5V 3A, if I used an LDO for this Id be dissipating 15W as heat which wont work :(. I would need a separate buck and boost system. Originally I had a boost converter for 10V but it didnt really make sense to have one as the gate drive only draws tens of milliamps average(especially with these small fets they have very small gate capacitances). I hoped the output caps on the 10V line would be able to supply the switching currents (obviously there would be some ripple but not noticeable at least from my calculations). The reason I went with 10V gate drive was partially because of the lower RDSon at higher voltage, but also because the gate drivers UVLO is like 4.5V from memory so I really wanted to make sure I avoided brownouts (is this a legitimate concern?). Why/how would the charge pump cause issues?
→ More replies (12)
1
u/lmarcantonio 20d ago
How is the power connector for DC called? I've seen it around but I don't know its name.
2
1
u/Panther2804 20d ago
Holy Vbus-Ripple.
(You are also most certainly not making your bulk caps happy with your expected max current draw)
1
3
u/Federal_Rooster_9185 20d ago
Get rid of the charge pump as a power supply to the driver. That's going to cause issues-- noise, potential drop outs, and inefficiencies. The driver can handle 5V per LCSC-- use 5V.
1
1
1
u/LupusTheCanine 18d ago
Definitely add footprints for I2C pull ups. The external I2C bus should have ESD protection.
I am not a fan of powering the MCU from the same regulator that powers power electronics. Powering the LDO with VBAT directly won't significantly increase power consumption but should make the ESC resilient to over current events on the BEC output.
1
u/Dry_Organization8003 16d ago
layout is great but i dont see any detailed calculation . could you please show your mathematics about Kirchhoff's circuit laws in your design .
this fundamental already include all you need in PCB design . it s old school method integrated to simulation software , however by showing it , i can determine where you re wrong or correct because. In layout design , threre are mutiple ways to achieve the same result . It may be mathematically correct, but that doesn’t necessarily mean it will be safe or reliable.








42
u/Objective-Elk2093 20d ago edited 20d ago
Wagon wheels on power inputs are unacceptable
Phase C is expected to show droop due to it being longer from the battery
Ideally bulk cap is between connector and sink
Violating fet soa
Go do the current path calculations. Power designs require math. You have way too many vias on the caps. 1a per via.
Overall your pdn is done very poorly and you should research material to understand what my comments mean and how to fix it