
LVP G0S4
Omar-Magdy0/ForgeDriveHW
ForgeDrive is an open-source research and development platform for modular, scalable, and industrial-inspired systems.

A Furuta (rotary inverted) pendulum system controlled by a neural network running on a custom PCB.
Furuta pendulum is an open-source printed circuit board by MHVandborg, from the MHVandborg/furuta_pendulum repository on GitHub. It is a 4-layer board of 32 × 55 mm with 67 parts on 81 nets, routed with 4 tracks and 0 vias.
It is built around the ATSAMD51J20A-AU, DRV8313PWP and AMS1117-3.3, with the USBLC6-2SC6, GZ2012D601TF and TS-1088-AR02016 among its other parts. Its parts include 18 capacitors, 17 resistors, 6 diodes, 5 connectors and 3 ICs. It belongs with the SAM D and SAM boards of this library.
A Furuta (rotary inverted) pendulum system controlled by a neural network running on a custom PCB.
The system consists of a horizontal rotating arm driven by a BLDC motor, with a freely swinging pendulum attached at the end. The neural network controller learns to swing up and balance the pendulum using reinforcement learning trained in a physics simulation, then deployed directly onto the MCU.
The ultimate goal is a double Furuta pendulum: motorised arm → first free pendulum → second free pendulum, all balanced simultaneously in the inverted position by a single neural network. The current hardware (PCB rev1) targets the single pendulum first as a validated stepping stone. Double Furuta requires a PCB rev2 with a third encoder.
[AS5600 arm] [AS5600 pendulum 1]
| |
+-------+-------+
|
[Neural Network] MLP 2×64, trained with PPO
inputs: θ_arm, θ_p1, ω_arm, ω_p1
output: torque_command (−1…+1)
|
[SimpleFOC / DRV8313]
|
[GBM2804H-100T BLDC][AS5600 arm] [AS5600 pendulum 1] [AS5600 pendulum 2]
| | |
+-----------+---+--------------------+
|
[Neural Network] MLP 2×64 (extended inputs), trained with SAC
inputs: θ_arm, θ_p1, θ_p2, ω_arm, ω_p1, ω_p2
output: torque_command (−1…+1)
|
[SimpleFOC / DRV8313]
|
[GBM2804H-100T BLDC]A single NN handles both swing-up and balancing via curriculum learning — it trains near vertical first, then faces progressively larger starting angles.
furuta_pendulum/
├── firmware/ # Bare-metal C (ARM GCC, CMake) → firmware/README.md
├── hardware/
│ ├── pcb/ # KiCad schematic + layout → hardware/pcb/COMPONENTS.md
│ └── mechanical/ # Fusion 360 3D design files
├── neural_network/ # RL training + Gymnasium env + exported weights → neural_network/README.md
├── bootloader/ # UF2 bootloader binary for ATSAMD51J20A
└── docs/ # Datasheets and reference documents| Area | Tools |
|---|---|
| Firmware | ARM GCC, CMake, VS Code, Atmel-ICE + Tag-Connect TC2030 (SWD), UF2 bootloader |
| ML / Training | Python, TensorFlow / Keras, Gymnasium, PPO → SAC |
| Inference on MCU | TensorFlow Lite Micro (TFLM) |
| Mechanical | Fusion 360, PLA (FDM) |
| PCB | KiCad |
| Rev | Tag | Date | Notes |
|---|---|---|---|
| 1 | hw-rev1 | 2026-06-07 | First production run — JLCPCB. Single Furuta (2 encoders) |
| 2 | (planned) | TBD | Add AS5600 #3 + third I2C bus for double Furuta |
| Document | Contents |
|---|---|
| ROADMAP.md | Full phased development plan with checklists |
| hardware/pcb/COMPONENTS.md | Component choices, rationale, and PCB design decisions |
| firmware/README.md | Firmware architecture, build instructions, peripheral map |
| neural_network/README.md | RL training approach, simulation, reward design, export pipeline |
If you use or build on this project, I'd love to hear about it! Feel free to open an issue or reach out directly.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 100n | Capacitor_SMD:C_0402_1005Metric | C8, C15, C16, C18, C22, C23, C24, C27, C28 |
| 8 | 10u | Capacitor_SMD:C_0805_2012Metric | C9, C10, C12, C13, C19, C20, C21, C26 |
| 4 | 4.7k | Resistor_SMD:R_0402_1005Metric | R22, R23, R24, R25 |
| 4 | M2 | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3, H4 |
| 4 | TestPoint | TestPoint:TestPoint_Pad_D1.5mm | TP1, TP4, TP5, TP6 |
| 3 | 10k | Resistor_SMD:R_0402_1005Metric | R11, R19, R26 |
| 3 | Fiducial | Fiducial:Fiducial_1mm_Mask2mm | FID1, FID2, FID3 |
| 2 | 1k | Resistor_SMD:R_0402_1005Metric | R15, R17 |
| 2 | 2k | Resistor_SMD:R_0402_1005Metric | R14, R16 |
| 2 | 33 | Resistor_SMD:R_0402_1005Metric | R1, R2 |
| 2 | 330 | Resistor_SMD:R_0402_1005Metric | R13, R18 |
| 2 | 5.1k | Resistor_SMD:R_0402_1005Metric | R3, R4 |
| 2 | GREEN | LED_SMD:LED_0805_2012Metric | D3, D4 |
| 2 | GZ2012D601TF | Inductor_SMD:L_0805_2012Metric | FB2, FB5 |
| 2 | TS-1088-AR02016 | furuta_pendulum:SW_TS-1088-AR02016 | BTN1, RESET1 |
| 1 | 10u | Inductor_SMD:L_0603_1608Metric | L1 |
| 1 | 4.7u | Capacitor_SMD:C_0603_1608Metric | C17 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | ATSAMD51J20A-A | Package_QFP:TQFP-64_10x10mm_P0.5mm | U7 |
| 1 | BLM18PG121SN1D | Inductor_SMD:L_0603_1608Metric | FB3 |
| 1 | Conn_ARM_SWD_TagConnect_TC2030 | Connector:Tag-Connect_TC2030-IDC-FP_2x03_P1.27mm_Vertical | J5 |
| 1 | DRV8313 | Connector_PinHeader_2.54mm:PinHeader_2x07_P2.54mm_Vertical | J3 |
| 1 | Encoders | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J7 |
| 1 | GZ2012D101TF | Inductor_SMD:L_0805_2012Metric | FB4 |
| 1 | LCD_ST7735S | Connector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_Vertical | J2 |
| 1 | RED | LED_SMD:LED_0603_1608Metric | D5 |
| 1 | SMBJ12A | Diode_SMD:D_SMB | D2 |
| 1 | SMBJ5.0A | Diode_SMD:D_SMB | D1 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U3 |
| 1 | USB_C_Receptacle_USB2.0_14P | Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J8 |
| 1 | YELLOW | LED_SMD:LED_0805_2012Metric | D6 |

Omar-Magdy0/ForgeDriveHW
ForgeDrive is an open-source research and development platform for modular, scalable, and industrial-inspired systems.


hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

misko/prompt2device
The separate vNext PCB skill and orchestrator package is available alongside the reference workflow below; existing projects keep their accepted toolchain until an explicit migration.

igorwolfs/modular-processing-hw
MCU Breakout board with Hirose BM28B connector

7903555032/AERIS-H743-PCB
A 6-layer STM32H743-based embedded development and flight-control/data-logging PCB designed as a practical hardware-design and PCB-layout project.


shachi-lab/greaseweazle-v41-plus
Greaseweazle V4.1 based compatible board design for 3.5/5.25-inch FDDs
It measures 32 × 55 mm and has 4 copper layers, 1.6 mm thick.
67 parts, built around the ATSAMD51J20A-AU, DRV8313PWP, AMS1117-3.3 and USBLC6-2SC6. 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.
From the MHVandborg/furuta_pendulum repository on GitHub, at the commit this page was made from: the board is hardware/pcb/furuta_pendulum.kicad_pcb and its schematic hardware/pcb/furuta_pendulum.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask MHVandborg before reusing the design.