

CARTPOLE MOSFET
Designed PCB board with 24V/150W DC Motor Controller for Cart-Pole systems using IRF3205S MOSFETs and IR2104 drivers.
- Size
- 100 × 100 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 129
- Nets
- 106
- Pads
- 422
- Tracks, vias
- 622, 331
- Pours
- 9
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 18 Mar 2026
- Updated
- 19 Mar 2026
Overview
CARTPOLE MOSFET is an open-source printed circuit board by conmeokhoi, from the conmeokhoi/Controller-for-Cart-Pole-System repository on GitHub. It is a 2-layer board of 100 × 100 mm with 129 parts on 106 nets, routed with 622 tracks and 331 vias.
It is built around the STM32F103C8T6, B0505S-1W and IR2104PBF, with the TPS5430DDA, AMS1117-3.3 and L7812 among its other parts. Its parts include 39 capacitors, 31 resistors, 16 diodes, 16 connectors and 12 ICs. It belongs with the robots and motor control boards and the STM32 boards of this library.
Main components
9STM32F103C8T6
LQFP-48(7x7)-40℃~+85℃ 12bit 20KB 2V~3.6V 32 Bit 37 64KB 72MHz ARM Cortex-M3 Built-in FLASH LQFP-48(7x7) Microcontrollers (MCU/MPU/SOC) ROHSSTMicroelectronicsMicrocontrollers (MCU/MPU/SOC)B0505S-1W
SIP-4-45℃~+85℃ 1 1.5kV 100uF 1W 200mA 23mA 4.5V~5.5V 5V 60mVp-p 77kHz 79% SIP-4 Isolated Power Modules ROHSEVISUNIsolated Power ModulesIR2104PBF
PDIP-8-40℃~+125℃ 100ns 10V~20V 130mA 150ns 150uA 2 270mA 50ns 680ns Enable shutdown、Interleaved conduction protection、Dead-time control Half-Bridge IGBT、MOSFET PDIP-8 Gate Drivers ROHSInfineon TechnologiesGate DriversTPS5430DDA
ESOP-8-40℃~+125℃@(TJ) 1 1.221V~32.04V 3A 4.4mA 5.5V~36V 500kHz Adjustable Buck Buck Built-in No ESOP-8 DC-DC Converters ROHSTexas InstrumentsDC-DC ConvertersAMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsL7812
TO-220ST0℃~+125℃@(Tj) 1 1.2A 12V 2V@(1A) 30V 71dB@(120Hz) 76uV Fixed Positive Short Circuit Protection TO-220ST Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSOSENVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsSS36
SMA(DO-214AC)-55℃~+125℃ 3A 500uA@60V 60V 700mV@3A Independent SMA(DO-214AC) Schottky Diodes ROHSMDDSchottky DiodesIRF3205
TO-220MOSFETsMinos47UF/25V
C1812C1812 SMT ROHSJLCPCB AssemblyUncategorised
README
README.md150W Isolated Cart-Pole Control Board (STM32)
📌 Project Overview
This project presents the design and implementation of a specialized control board for an Inverted Pendulum on a Cart (Cart-Pole) system. It serves as a benchmark for testing cascaded control strategies in highly non-linear, unstable, and under-actuated environments.
🛠 Hardware Architecture

1. Multi-Stage Power Management
The system operates on a primary 24V DC input with hierarchical regulation to ensure signal stability and efficiency:
- 12V Rail: Regulated by the L7812 for MOSFET gate drivers.
- 5V Auxiliary Rail: Stepped down via a high-efficiency TPS5430 Buck Converter (~90% efficiency) to power encoders and sensors.
- Isolated 3.3V Logic: Utilizes a B0505S isolated DC-DC converter and an AMS1117-3.3 LDO to shield the MCU from power-stage inductive switching noise.
2. Motor Drive Stage (150W H-Bridge)
- MOSFET Selection: Features four IRF3205S N-channel MOSFETs with an exceptionally low $R_{DS(on)} \approx 8 m\Omega$ to minimize conduction losses.
- Gate Driving: Employs IR2104 drivers with bootstrap circuitry to maintain high-side gate saturation.
- Safety Logic: Integrated 520ns hardware dead-time prevents "shoot-through" short circuits.
3. Galvanic Isolation
- High-Speed Paths: 6N137 optocouplers (10Mbps) are dedicated to PWM and Encoder signals to prevent propagation delay in the real-time control loop.
- Isolation Barrier: Complete physical partitioning between the Power Zone and Clean Logic Zone via the optocoupler bridge.

💻 Firmware & Control Logic
Powered by the STM32F103C8T6 (ARM Cortex-M3) at 72MHz:
- Encoder Processing: Utilizes hardware Timer Encoder Mode for high-resolution quadrature decoding without CPU overhead.
- PWM Configuration: Frequency set at 20kHz to eliminate audible jitter and provide granular torque control: $$f_{PWM} = \frac{f_{CLK}}{(PSC+1) \times (ARR+1)} = \frac{72,000,000}{36 \times 100} = 20,000 \text{ Hz}$$
- Control Algorithm: Implements a Cascaded PID structure where the outer loop manages cart position and the inner loop stabilizes the pendulum angle.
🔍 Failure Analysis (Root Cause)
During integration, a hardware breakdown occurred in the H-bridge. Forensic analysis identified a missing connection between the VS pin (Pin 6) of the IR2104 drivers and the source terminals of the high-side MOSFETs.This led to a "floating gate" state, causing a direct short-circuit from the 24V rail to Ground.

🎥 Experimental Validation
The following video demonstrates the individual functional verification of the control board:
- Hardware Self-Test: Verification of the 24V, 12V, 5V, and 3.3V power rails.
- Encoder & Sensor Feedback: Real-time pulse capturing and gyroscope data retrieval.
- PWM Output: Validation of 20kHz complementary signals via oscilloscope.
- Video Demo:

Author: Nguyễn Huỳnh Khôi.
Supervised by: PhD. Võ Lâm Chương.
University: Ho Chi Minh City University of Technology and Engineering (HCMUTE)
Parts
129| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 100 nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C11, C15, C19, C21, C32, C33, C39, C40, C42 |
| 7 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2, R9, R11, R18, R22, R27, R29 |
| 6 | SS36 | Diode_SMD:D_SMA_Handsoldering | D2, D5, D7, D8, D11, D12 |
| 5 | 10 nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C23, C24, C37, C38 |
| 5 | 220R | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R13, R14, R24, R25, R28 |
| 4 | 100 nF | Capacitor_SMD:C_0603_1608Metric | C26, C27, C28, C29 |
| 4 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C4, C17, C20, C41 |
| 4 | 1N4148 | Diode_SMD:D_SOD-123 | D3, D4, D9, D10 |
| 4 | 27R | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R4, R5, R6, R7 |
| 4 | 4k7 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R8, R10, R19, R23 |
| 4 | 6N137 | Package_DIP:SMDIP-8_W9.53mm_Clearance8mm | U7, U8, U10, U11 |
| 4 | GND | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J10, J12, J14, J16 |
| 4 | IRF3205 | Package_TO_SOT_SMD:TO-263-2 | Q1, Q2, Q3, Q4 |
| 4 | ~ | MountingHole:MountingHole_3.2mm_M3_Pad_Via | H5, H6, H7, H8 |
| 3 | 10k | Capacitor_SMD:C_0603_1608Metric | R12, R15, R17 |
| 2 | 100uF/50V | Capacitor_SMD:CP_Elec_8x10.5 | C2, C13 |
| 2 | 10pF | Capacitor_SMD:C_0603_1608Metric | C35, C36 |
| 2 | 10uF/25V | Capacitor_SMD:C_0603_1608Metric | C25, C31 |
| 2 | 1k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R26 |
| 2 | 1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C9, C10 |
| 2 | 3k3 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R3, R30 |
| 2 | 47uF/25V | Capacitor_SMD:CP_Elec_6.3x5.4 | C16, C22 |
| 2 | 4k7 | Resistor_SMD:R_0603_1608Metric | R20, R21 |
| 2 | IR2104 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U2, U3 |
| 1 | 0 | Capacitor_SMD:C_0603_1608Metric | R16 |
| 1 | 1.5A | Fuse:Fuseholder_Littelfuse_Nano2_154x | F2 |
| 1 | 10 uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C12 |
| 1 | 1000uF/50V | Capacitor_THT:C_Radial_D12.5mm_H25.0mm_P5.00mm | C6 |
| 1 | 100nF | Capacitor_SMD:C_0603_1608Metric | C34 |
| 1 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C3 |
| 1 | 100uF/25V | Capacitor_SMD:CP_Elec_8x10.5 | C18 |
| 1 | 120R-2A | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | FB1 |
| 1 | 12V | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J13 |
| 1 | 12V_LED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D15 |
| 1 | 15A | Fuse:Fuseholder_Littelfuse_Nano2_154x | F1 |
| 1 | 220uF | Capacitor_SMD:CP_Elec_8x10.5 | C5 |
| 1 | 24V | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J15 |
| 1 | 24VDC IN | TerminalBlock:TerminalBlock_Ningbo-Kagnex_HB9500_1x02_P9.5mm | J1 |
| 1 | 24V_LED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D14 |
| 1 | 3.3V | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J11 |
| 1 | 330 nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C14 |
| 1 | 330R | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R31 |
| 1 | 3V3_LED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D16 |
| 1 | 47uH | CDRH127_LDNP-221MC:INDPM120120X800N | L1 |
| 1 | 5V | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J9 |
| 1 | 5V_LED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D6 |
| 1 | 60V-4A | Diode_SMD:D_SMB | D1 |
| 1 | 8Mhz | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U5 |
| 1 | B0505S | RFM-0505S:CONV_RFM-0505S | U6 |
| 1 | ENCODER | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J5 |
| 1 | I2C | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J4 |
| 1 | L7812 | Package_TO_SOT_THT:TO-220-3_Vertical | U4 |
| 1 | LED | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D13 |
| 1 | LOGO | Picture:UTE_15x15 | G*** |
| 1 | Motor | TerminalBlock:TerminalBlock_Ningbo-Kagnex_HB9500_1x02_P9.5mm | J2 |
| 1 | PB3-PB5 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J8 |
| 1 | PC13-PC15 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J7 |
| 1 | PC817X2 | PC817X2NIP0F:SOP254P975X460-4N | U12 |
| 1 | STLINK_DEBUG | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J3 |
| 1 | STM32F103C8T6 | Package_QFP:LQFP-48_7x7mm_P0.5mm | U9 |
| 1 | SW_Push | Button_Switch_SMD:SW_SPST_CK_RS282G05A3 | SW1 |
| 1 | TPS5430DDA | Package_SO:TI_SO-PowerPAD-8_ThermalVias | U1 |
| 1 | USART | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J6 |
Similar boards
- 4 layers110 × 80 mm

- 2 layers100 × 100 mm

- 4 layers90 × 80 mm

- 2 layers98.8 × 55.1 mm

H bridge controller
jayanta525/dual-h-bridge
Dual H-Bridge Controller with IRF3205 and IR2104 MOSFET Driver, and with ATMega328P-AU PWM Controller
104 parts5MIT - 2 layers

- 2 layers67.7 × 63.6 mm

- 2 layers78.5 × 46.5 mm

Buck
G-Leonel-6/C2
En este repositorio se guardaran los archivos correspondientes al desarrollo de una fuente de alimentacion regulada
14 parts - 2 layers70 × 53 mm

LDOs
Princediscjalpha/DIY-PCB-Projects
I am creating this repository that will include most of PCB Board designs and layouts that are mostly used for hobby purposes and are very helpful to understand the industrial projects and their working as well.
17 parts2
Questions
How big is the CARTPOLE MOSFET PCB?
It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.
What parts does the CARTPOLE MOSFET use?
129 parts, built around the STM32F103C8T6, B0505S-1W, IR2104PBF and TPS5430DDA. 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 CARTPOLE MOSFET KiCad files?
From the conmeokhoi/Controller-for-Cart-Pole-System repository on GitHub, at the commit this page was made from: the board is CARTPOLE_MOSFET.kicad_pcb and its schematic CARTPOLE_MOSFET.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the CARTPOLE MOSFET design in my own project?
Its repository states no licence, so its author keeps all rights: ask conmeokhoi before reusing the design.