Dual brushed ESC based on Raspberry RP2040 (Now with schematic) - Page 1
Forum section: electronics / projects

author: Electro Dodo
author_rank: Contributor
timestamp: September 30, 2025, 10:27:54 am
content: HelloI want to build a small 20x30mm dual ESC.As a controller I chose a RP2040, because it has a pre-installed bootloader, and can be programmed in micro-python or C.For the H bridges I chose Ti DRV8874 with a max current of 6A, over temperature and over current protection.The actual average current should be around 1A max.for the RP2040 design I relied on the hardware design guide from Raspberry.The FLASH, and Oscillator were copied from the guide.I changed the USB to type C, and added resistors to set the voltage.(I hope they are correct, As I didn't find a great source which resistors to chose)I managed to fit all but two of the recommended bypass capacitors of the RP2040.I routed everything on a 4 layer board for now. (6 layer is an option, but significantly more expensive)I hope the design works, but as I have never designed a PCB as complex or dense I'm quite unsure.I'm happy about all feedback and tips.Edit: added the schematic I forgot

author: Someone
author_rank: Super Contributor
timestamp: September 30, 2025, 12:34:00 pm
content: Vin routing is probably too weak for motor drive application and lacking in decoupling capacitance.

author: Electro Dodo
author_rank: Contributor
timestamp: September 30, 2025, 12:40:25 pm
content: What amount of decoupling capacitance would you recommend?The traces are "ok" according to a calculator for 3A and 70degree rise over ambient.The ESC is only for a few minutes of use at a time, so I think that is reasonable.

author: thm_w
author_rank: Super Contributor
timestamp: October 02, 2025, 11:40:06 pm
content: Schematic?What about a pour for VIN instead of having 3 layers of ground pours? At least I think thats how it is, hard to tell with kicads labelling what is on the top layer or on the middle layer.

author: Electro Dodo
author_rank: Contributor
timestamp: October 03, 2025, 09:14:01 am
content: Damn, I really forgot to post the schematicGood Idea with the VIN copper pour.Its easy EDA instead of KICAD

author: thm_w
author_rank: Super Contributor
timestamp: October 03, 2025, 10:34:03 pm
content: Looks better. 100R is a bit low for the LED resistorsAnd that divider resistor R10.You can see capacitor recommendation on page 30 of the datasheet. I would at least add in some points you can solder in a large capacitor, can do it ESC style hanging off the end if that is an option.

author: Benta
author_rank: Super Contributor
timestamp: October 03, 2025, 10:43:56 pm
content: Quote from: Electro Dodo on October 03, 2025, 09:14:01 amSo where's the schematic? I just see boxes with one or two parts in each. A parts list would be just as readable/informative.

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 04, 2025, 07:30:44 am
content: Quote from: Benta on October 03, 2025, 10:43:56 pmNo matter how hard we push back, this seems to be the new norm. Crappy schematics with net ports and boxes making separate parts of something that should be one.About the ESC itself, how is it supposed to be used? The only control path I see is USB, so either standalone working through a program or receiving instructions from the computer via the USB connection. Either way the supply for the MCU comes from the USB connector. Good for power stability on the MCU, but still the lack of filtering might lead to unwanted resets when the motors are controlled.My advice is to make use of ferrite beads in supply chains to reduce high frequency noise. Also keep Vin as far away from the MCU as possible. Do not route it underneath it.Another issue is the current measure feedback to the MCU. With the Vref of the DRV8874 set to the supply voltage of the MCU, the output of the DRV8874 can reach slightly higher voltages than that for short periods of time. It is probably better to make a lower Vref, to allow for a better reading in the MCU. Adjust the IPROPI resistor accordingly to limit the current to what you want its maximum to be.I agree with thm_w that the 100 Ohm resistors for the LED's are low. SMD LED's produce a lot of light with small currents. It does depend on the LED color what the forward voltage is, but this should be used to calculate the resistors. Even 100uA can be bright with LED's like these.Also for the Vin measurement divider I would use larger resistors and also a filter capacitor and a voltage limiting zener to protect the MCU input.