

Inverter
RP2040 Based BLDC Inverter for sensored motors, capable of putting out 50a 100v
- Size
- 86.4 × 61.9 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 106
- Nets
- 95
- Pads
- 664
- Tracks, vias
- 853, 774
- Pours
- 46
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 11 Aug 2023
- Updated
- 30 Apr 2024
Overview
Inverter is an open-source printed circuit board by Kirg5, from the Kirg5/2040Inverter repository on GitHub. It is a 4-layer board of 86.4 × 61.9 mm with 106 parts on 95 nets, routed with 853 tracks and 774 vias.
It is built around the RP2040, DRV8300DPW and LM5161PWP, with the W25Q128JVSIQ, AMS1117-5.0 and SPX3819M5-L-3-3 among its other parts. Its parts include 47 capacitors, 28 resistors, 8 ICs, 6 transistors and 1 diode. It belongs with the power and robots and motor control boards and the RP2040 boards of this library.
Main components
7RP2040
LQFN-56(7x7)12bit 133MHz 30 LQFN-56(7x7) Microcontrollers (MCU/MPU/SOC) ROHSRaspberry PiMicrocontrollers (MCU/MPU/SOC)DRV8300DPW
TSSOP-20-40℃~+125℃ 1.5A 3 5V~20V 750mA、1.5A 800uA Three Phase TSSOP-20 Brushless DC (BLDC) Motor Driver ROHSTexas InstrumentsBrushless DC (BLDC) Motor DriverLM5161PWP
HTSSOP-14-EP-40℃~+125℃@(TJ) 1 1A 1MHz 4.5V~100V Adjustable Buck Buck、Flyback Built-in Yes HTSSOP-14-EP DC-DC Converters ROHSTexas InstrumentsDC-DC ConvertersW25Q128JVSIQ
SOIC-8-208mil-40℃~+85℃ 100,000 cycles 120ms@(32KB) 128Mbit 133MHz 1uA 2.7V~3.6V 20 Years 3ms Power-on reset、Hardware write protection、Software write protection、Write enable latch、Absolute write protection SPI SOIC-8-208mil NOR FLASH ROHSWinbondNOR FLASHAMS1117-5.0
SOT-223-40℃~+125℃ 1 1.3V 15V 1A 5V 60dB Fixed Positive Short Circuit Protection、Thermal shutdown SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsSPX3819M5-L-3-3
SOT-23-5-40℃~+85℃@(Ta) 1 20V 3.3V 420mV@(100mA) 500mA 5uA 70dB@(1kHz) Fixed Over Current Protection、Over Temperature Protection、Enable Positive SOT-23-5 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSTECH PUBLICVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsULN2003A
SOP-16-40℃~+85℃ 0.93mA 100uA 15pF 20uA 30V 50V Seven channels SOP-16 Darlington Transistor Arrays ROHSUMWDarlington Transistor Arrays
README
README.md2040Inverter
RP2040 Based BLDC Inverter for sensored motors, capable of putting out 50a 100v, for use in high power ebike/escooter applications.
Development of this project has slowed due to firmware related complications and odd behaviour. In the current state, the firmware is able to rotate the motor, however attempting to log any data to a serial console causes crashes, communication with the display doesnt work, and there are loads of other issues with the entire system randomly locking up causing all mosfets to get stuck in whatever state they were previously in, which has caused hardware damage on multiple occasions. I have spent too much time trying to debug all of these things and have fully rewritten several times to no avail. I believe that the hardware of the device is robust and functional, but I just cant get the software side of things to work even after many months of work.

Usage
This is a standalone motor inverter, and not a complete motor controller. It does not contain any inputs for assist sensors or throttles as these are sent to the inverter over UART by a seperate MCU, located in the display. You can find the files for the display here.
Upon power-up, the fan will breifly be set to full speed, the brake light will turn white, and 6 tones from 1khz to 6khz will be played as part of the self test sequence. If less than 6 tones play it indicates an issue sending power to each of the motor phases and the inverter will throw itself into an error state. Error states can also be thrown if an issue is detected with any of the sensors (current sensor, voltage sensor, either temperature sensor, or motor encoder)
The inverter shall recieve a throttle input from the MCU in the display over uart with a range of 0-255. These values correlate to the current that the inverter will attempt to draw from the battery, ranging from 0 to the maximum set forward current as defined in the firmware. The maximum forward current should never be set higher than 50A with this inverter (30A without active cooling). The throttle does not directly control duty cycle, and instead the duty cycle is controlled through a PID loop that will match the current draw to the requested current. This PID system will work at low speeds, but as the motor EMF approaches the battery voltage at high speeds, the ability to continue to feed current into the motor will fall off. When the PID loop can no longer provide the requested current to the motor (when DutycyclePID > Dutycyclethrottle), it will smoothly switch to using the direct value from the throttle instead of the PID controlled value.
This inverter supports regenerative braking, where the kinetic energy that would normally be lost to heat while decellerating gets converted into electrical energy to charge the battery. It works in a very similar fashion to the forward power control where a regen signal with a value ranging from 0-255 is sent from the display MCU to the inverter, and it uses a pid loop to map these values to a range of 0 to the maximum reverse current defined in the firmware. The maximum reverse current should be set to the maximum charge current of your BMS, or the maximum charge current of your cells multipled by the number of parallel groups, whichever is lower. You should never set the maximum reverse current value higher than 50a even if your battery can handle it as the current sensor on the inverter cannot measure currents this high, and it can cause damage to the PCB and it's components, especially if you are not using active cooling.
Wiring
Wiring the inverter is fairly straightforward; there are 5 large power pads along the top edge and a 16 pin JST connector along the bottom edge, and 2 sets of labelled through holes for the thermistor and the fan.
The 5 power pads as ordered from left to right are:
- +VCC (abs. max 100V)
- GND
- Phase A (Blue Phase)
- Phase B (Green Phase)
- Phase C (Yellow Phase)
The 16 pins on the JST connector in numerical order are:
- LedR (For brake light, active low)
- LedG (For brake light, active low)
- LedB (For brake light, active low)
- RlyCTL (Output to main relay MOSFET/BJT)
- PWR_OK (Signal from display MCU that precharging has finished and it is ok to power on)
- BOOTSEL (RP2040 bootsel button, for firmware flashing)
- +12v (12v 500mA output)
- +5v (5v 500mA output)
- USB_DP (To USB port)
- USB_DM (To USB port)
- UartTX (To display)
- UartRX (To display)
- HallC (Blue hall line, active low)
- HallB (Green hall line, active low)
- HallA (Yellow hall line, active low)
- GND
Parts
106| Qty | Value | Footprint | References |
|---|---|---|---|
| 13 | 100nF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C9, C10, C14, C15, C17, C19, C20, C21, C22, C23, C24, C25, C26 |
| 12 | 10nF, 100v, C0G or NP0 dielectric | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C18, C29, C30, C31, C32, C33, C34, C35, C36, C37, C38, C39 |
| 8 | 100uF, 100v | Capacitor_THT:CP_Radial_D8.0mm_P3.50mm | C1, C2, C3, C4, C5, C6, C7, C8 |
| 8 | TestPoint | TestPoint:TestPoint_Pad_1.5x1.5mm | TP1, TP2, TP3, TP5, TP6, TP7, TP8, TP9 |
| 6 | 10 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2, R3, R4, R5, R6, R7 |
| 6 | Q_NMOS_GSD | Package_TO_SOT_SMD:Infineon_PG-HSOF-8-1 | Q1, Q2, Q3, Q4, Q5, Q6 |
| 5 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R13, R14, R16, R26, R27 |
| 4 | 10K | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R15, R17, R18, R25 |
| 4 | 10k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R9, R10, R12, R22 |
| 3 | 1uF, >50v | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C11, C12, C13 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C16, C47 |
| 2 | 10uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C45, C46 |
| 2 | 12pF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C27, C28 |
| 2 | 1k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R8, R11 |
| 2 | 1uF, 100v | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C42, C43 |
| 2 | Conn_01x02 | TestPoint:TestPoint_2Pads_Pitch2.54mm_Drill0.8mm | FAN, NTC |
| 1 | 1.37k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R21 |
| 1 | 100µH | my_footprints:Wurth 74404084560 | L1 |
| 1 | 10nF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C44 |
| 1 | 162k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R19 |
| 1 | 1uF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C40 |
| 1 | 22nF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C41 |
| 1 | 2k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R23 |
| 1 | 320k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R24 |
| 1 | 330 | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R28 |
| 1 | 75k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R20 |
| 1 | AMS1117-5.0 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U9 |
| 1 | BLUE | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D1 |
| 1 | Conn_01x16 | Connector_JST:JST_XH_B16B-XH-A_1x16_P2.50mm_Vertical | J8 |
| 1 | DRV8300D | Package_DFN_QFN:VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm | U3 |
| 1 | LM5161PWP | Package_SO:HTSSOP-14-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3x3.1mm | U7 |
| 1 | LOGO | LOGO | G*** |
| 1 | MCR1101 | Package_SO:SOIC-16W_7.5x10.3mm_P1.27mm | U1 |
| 1 | RP2040 | Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm | U2 |
| 1 | R_Small | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1 |
| 1 | SPX3819M5-L-3-3 | Package_TO_SOT_SMD:SOT-23-5 | U5 |
| 1 | ULN2003A | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U8 |
| 1 | W25Q128JV | Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm | U4 |
| 1 | Wurth 830061647 | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSoldering | Y1 |
The 104 most common of 106 parts.
Similar boards
- 4 layers50 × 45 mm

- 2 layers58.5 × 43.1 mm

- 6 layers70.4 × 125.2 mm

Power Board
vinhphannn/ESC-G474-24S
Dự án phát triển mạch điều khiển tốc độ điện tử (ESC - Electronic Speed Controller) điện áp cao (100V) sử dụng vi điều khiển STM32G474, hướng đến các ứng dụng công suất lớn như Drone công nghiệp, máy bay không người lái…
248 parts - 2 layers27.6 × 45.1 mm

- 6 layers36 × 47.4 mm

- 2 layers135 × 80 mm

- 2 layers67 × 33 mm

SynchroDriverDS
schlae/SynchroDriver
Various boards for driving synchros and other 400Hz devices
50 parts1 - 2 layers72 × 55 mm

Questions
How big is the Inverter PCB?
It measures 86.4 × 61.9 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Inverter use?
106 parts, built around the RP2040, DRV8300DPW, LM5161PWP and W25Q128JVSIQ. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Inverter KiCad files?
From the Kirg5/2040Inverter repository on GitHub, at the commit this page was made from: the board is PCB/inverter.kicad_pcb and its schematic PCB/inverter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Inverter design in my own project?
Its repository states no licence, so its author keeps all rights: ask Kirg5 before reusing the design.