Skip to the content
4 layers86.4 × 61.9 mmInverter, the printed circuit board in 3D

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

7

README

README.md

2040Inverter

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.

Inverter PCB

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:

  1. +VCC (abs. max 100V)
  2. GND
  3. Phase A (Blue Phase)
  4. Phase B (Green Phase)
  5. Phase C (Yellow Phase)

The 16 pins on the JST connector in numerical order are:

  1. LedR (For brake light, active low)
  2. LedG (For brake light, active low)
  3. LedB (For brake light, active low)
  4. RlyCTL (Output to main relay MOSFET/BJT)
  5. PWR_OK (Signal from display MCU that precharging has finished and it is ok to power on)
  6. BOOTSEL (RP2040 bootsel button, for firmware flashing)
  7. +12v (12v 500mA output)
  8. +5v (5v 500mA output)
  9. USB_DP (To USB port)
  10. USB_DM (To USB port)
  11. UartTX (To display)
  12. UartRX (To display)
  13. HallC (Blue hall line, active low)
  14. HallB (Green hall line, active low)
  15. HallA (Yellow hall line, active low)
  16. GND

Parts

106
QtyValueFootprintReferences
13100nFCapacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolderC9, C10, C14, C15, C17, C19, C20, C21, C22, C23, C24, C25, C26
1210nF, 100v, C0G or NP0 dielectricCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC18, C29, C30, C31, C32, C33, C34, C35, C36, C37, C38, C39
8100uF, 100vCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC1, C2, C3, C4, C5, C6, C7, C8
8TestPointTestPoint:TestPoint_Pad_1.5x1.5mmTP1, TP2, TP3, TP5, TP6, TP7, TP8, TP9
610Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R3, R4, R5, R6, R7
6Q_NMOS_GSDPackage_TO_SOT_SMD:Infineon_PG-HSOF-8-1Q1, Q2, Q3, Q4, Q5, Q6
510kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR13, R14, R16, R26, R27
410KResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR15, R17, R18, R25
410kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR9, R10, R12, R22
31uF, >50vCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC11, C12, C13
210uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC16, C47
210uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC45, C46
212pFCapacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolderC27, C28
21kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR8, R11
21uF, 100vCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC42, C43
2Conn_01x02TestPoint:TestPoint_2Pads_Pitch2.54mm_Drill0.8mmFAN, NTC
11.37kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR21
1100µHmy_footprints:Wurth 74404084560L1
110nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC44
1162kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR19
11uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC40
122nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC41
12kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR23
1320kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR24
1330Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR28
175kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR20
1AMS1117-5.0Package_TO_SOT_SMD:SOT-223-3_TabPin2U9
1BLUELED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD1
1Conn_01x16Connector_JST:JST_XH_B16B-XH-A_1x16_P2.50mm_VerticalJ8
1DRV8300DPackage_DFN_QFN:VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mmU3
1LM5161PWPPackage_SO:HTSSOP-14-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3x3.1mmU7
1LOGOLOGOG***
1MCR1101Package_SO:SOIC-16W_7.5x10.3mm_P1.27mmU1
1RP2040Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mmU2
1R_SmallResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1
1SPX3819M5-L-3-3Package_TO_SOT_SMD:SOT-23-5U5
1ULN2003APackage_SO:SOIC-16_3.9x9.9mm_P1.27mmU8
1W25Q128JVPackage_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mmU4
1Wurth 830061647Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSolderingY1

The 104 most common of 106 parts.

Similar boards

  • 4 layers50 × 45 mmBldc, the printed circuit board in 3D

    Bldc

    SJSURoboticsTeam/urc-electrical-2026

    The 2024 - 2026 rover electrical monorepo

    111 parts1
  • 2 layers58.5 × 43.1 mmTorqController, the printed circuit board in 3D

    TorqController

    JoaoWMHentz/Kinematech_Torq

    135 parts
  • 6 layers70.4 × 125.2 mmPower Board, the printed circuit board in 3D

    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 mmGaugeSupply, the printed circuit board in 3D

    GaugeSupply

    paulrbarnard/LandyGauge

    Open-source ESP32-S3 vehicle instrument gauge

    33 parts
  • 6 layers36 × 47.4 mmFpv findland esc, the printed circuit board in 3D

    Fpv findland esc

    juhtipuhti/fpv_findland_esc

    166 parts5GPL-3.0
  • 2 layers135 × 80 mmSpin Coater, the printed circuit board in 3D

    Spin Coater

    hacker-fab/uw-spincoater

    UW Spincoater implementation, started Fall 2025

    100 parts2
  • 2 layers67 × 33 mmSynchroDriverDS, the printed circuit board in 3D

    SynchroDriverDS

    schlae/SynchroDriver

    Various boards for driving synchros and other 400Hz devices

    50 parts1
  • 2 layers72 × 55 mmClock gps, the printed circuit board in 3D

    Clock gps

    saitenntaisei/gps-clock-pcb

    70 parts

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.