
Rev6.0 flat powerstage
oresat/oresat-adcs-hardware
Controller PCB for OreSat reaction wheels, magnetorquers, IMU, and magnetometers

Open-source Motion Control Platform
Foc driver is an open-source printed circuit board by sirojudinMunir, from the sirojudinMunir/sf-motion repository on GitHub, published under the MIT licence. It is a 2-layer board of 36.5 × 56 mm with 132 parts on 142 nets, routed with 1,028 tracks and 213 vias.
It is built around the INA240A1PW, AS5047D and LM321, with the LP2985-33DBV, TJA1051TK/3/1 and USBLC6-2SC6 among its other parts. Its parts include 51 capacitors, 37 resistors, 11 connectors, 10 ICs and 6 transistors. It belongs with the robots and motor control boards and the STM32 boards of this library.
Open-source BLDC/PMSM motor control platform based on STM32 and Field-Oriented Control (FOC).
The project includes:
⚠️ This project is under active development. Hardware and firmware may change between versions.
You will need:
The hardware design is available in:
Hardware/
├── production/ # Gerber manufacturing files
├── .kicad_sch # Schematic
├── .kicad_pcb # PCB design
└── ...Used to configure the STM32 peripherals and generate the initial project configuration.
Download: https://www.st.com/en/development-tools/stm32cubemx.html
Used as the main development environment.
Download: https://code.visualstudio.com/
PlatformIO is used to build and upload the firmware.
Install PlatformIO through the VS Code extension:
Verify the installation:
pio --versionIf pio is not recognized in the terminal, use the PlatformIO terminal inside VS Code or add the PlatformIO CLI directory to your system PATH.
Python is required for the communication tools and GUI.
Recommended version:
Python 3.10+Download: https://www.python.org/downloads/
Check the installation:
python --versionCreate a virtual environment (recommended):
python -m venv .venvActivate it on Windows:
.venv\Scripts\activateActivate it on Linux/macOS:
source .venv/bin/activateInstall the required packages:
pip install numpy pyserial PyQt5 pyqtgraphClone the repository using Git:
git clone https://github.com/sirojudinMunir/sf-motion.gitEnter the project directory:
cd SF-MotionOpen the project in VS Code with PlatformIO installed.
Build the firmware:
pio runIf the build is successful, the firmware binary will be generated by PlatformIO.
Connect the ST-Link to the FOC Driver board using the 3-pin PicoBlade connector.
The board can be powered from a 6–24 V external power supply. For the initial test, it is recommended to use USB Type-C as the power source if applicable.
Upload the firmware:
pio run -t uploadYou can also use the Upload button in the PlatformIO interface in VS Code.
After uploading the firmware, follow these steps:
Make sure the D3 LED is blinking after the firmware starts.
Connect the BLDC/PMSM motor wires to the FOC Driver board. Make sure the diametrical magnet is securely mounted on the motor shaft and properly aligned with the magnetic encoder on the FOC Driver board. The board should be positioned directly beneath the magnet.
If you are using an external power supply, set the current limit to 1 A for the initial test. This helps prevent damage if there is an unexpected issue with the board or motor.
Connect the USB Type-C cable to the board.
Run the Python motor control program:
python communication/motor.pySelect the correct COM port and click Connect.
Before running the motor, set the correct motor pole pairs:
motor.set_pole_pairs(<your_motor_pole_pairs>)Replace <your_motor_pole_pairs> with the actual number of pole pairs of your motor.
Run the self-commissioning process:
motor.self_commissioning()The self-commissioning process measures the motor resistance and inductance and calibrates the magnetic encoder.
Important: During encoder calibration, make sure the motor rotates counter-clockwise (CCW). If the motor rotates in the opposite direction, swap any two motor wires to reverse the rotation. Automatic motor direction detection will be implemented in a future version.
Save configuration
motor.set_save_config()Test the FOC motor modes using:
motor.set_motor_mode(<mode>)Available modes:
0 -> for current control mode
1 -> for speed control mode
2 -> for position control mode
5 -> for open-loop mode
6 -> for disable the motor
⚠️ Keep the power supply current limit low during the first test. Do not increase the voltage or current limit until the board, encoder, and motor are confirmed to be working correctly.
If you find this project useful and would like to support its development, you can become a sponsor:
Your support helps fund hardware development, testing, documentation, and future improvements to SF-Motion.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 19 | 100nF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C1, C2, C3, C4, C5, C10, C11, C21, C31, C37, C40, C41, C45, C47, C48, C49 +3 |
| 17 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C12, C16, C17, C25, C26, C27, C28, C29, C30, C32, C33, C34, C35, C38, C39, C43 +1 |
| 9 | 1k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R2, R4, R5, R14, R20, R24, R32, R33, R34 |
| 7 | TestPoint | TestPoint:TestPoint_Pad_D1.0mm | TP1, TP2, TP3, TP4, TP5, TP6, TP7 |
| 6 | 10R | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R12, R15, R17, R21, R22, R25 |
| 6 | WSD30100DN56 | Package_TO_SOT_SMD:TDSON-8-1 | Q1, Q2, Q3, Q4, Q5, Q6 |
| 4 | R | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R7, R8, R10, R11 |
| 3 | 0.01R | Resistor_SMD:R_Shunt_Ohmite_LVK20 | R13, R19, R23 |
| 3 | 1nF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C36, C42, C46 |
| 3 | 1uF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C18, C20, C22 |
| 3 | 2k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R35, R36, R37 |
| 3 | Conn_01x01 | Connector_Wire:SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm | J4, J5, J6 |
| 3 | Conn_01x03_MountingPin | Connector_Molex:Molex_PicoBlade_53261-0371_1x03-1MP_P1.25mm_Horizontal | J1, J8, J9 |
| 3 | INA240A1PW | Package_SO:TSSOP-8_4.4x3mm_P0.65mm | U4, U6, U7 |
| 2 | 0.1uF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C13, C15 |
| 2 | 100R | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R27, R28 |
| 2 | 10k | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R1, R3 |
| 2 | 30R | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R29, R31 |
| 2 | 33pF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C8, C9 |
| 2 | Conn_01x02 | Connector_AMASS:AMASS_XT30PW-M_1x02_P2.50mm_Horizontal | J2, J3 |
| 2 | LED RED | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D1, D2 |
| 2 | MBR0530 | Diode_SMD:D_SOD-123 | D4, D5 |
| 1 | 10nF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C24 |
| 1 | 120R | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R30 |
| 1 | 12MHz | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | 18k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R6 |
| 1 | 1k8 | Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder | R26 |
| 1 | 1uF | Capacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolder | C6 |
| 1 | 2.2uF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C23 |
| 1 | 22uH | custom_LCR:L_SMD_4X4 | L1 |
| 1 | 2k2 | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R18 |
| 1 | 39k | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R16 |
| 1 | 3k3 | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R9 |
| 1 | 4.7uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C14 |
| 1 | 47nF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C19 |
| 1 | AS5047D | Package_SO:TSSOP-14_4.4x5mm_P0.65mm | U10 |
| 1 | Conn_01x05_MountingPin | Connector_Molex:Molex_PicoBlade_53261-0571_1x05-1MP_P1.25mm_Horizontal | J11 |
| 1 | Conn_01x06_MountingPin | Connector_Molex:Molex_PicoBlade_53261-0671_1x06-1MP_P1.25mm_Horizontal | J10 |
| 1 | DRV8323RHRGZR | DRV8323RHRGZR:QFN50P700X700X100-49N | U2 |
| 1 | LED GREEN | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D3 |
| 1 | LM321 | Package_TO_SOT_SMD:SOT-23-5 | U5 |
| 1 | LP2985-3.3 | Package_TO_SOT_SMD:SOT-23-5 | U3 |
| 1 | NetTie_2 | NetTie:NetTie-2_SMD_Pad0.5mm | NT1 |
| 1 | STM32F405RGTx | Package_QFP:LQFP-64_10x10mm_P0.5mm | U1 |
| 1 | SolderJumper_3_Open | Jumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1 |
| 1 | TJA1051TK-3 | Package_SON:HVSON-8-1EP_3x3mm_P0.65mm_EP1.6x2.4mm | U9 |
| 1 | USBLC6-2SC6 | Package_TO_SOT_SMD:SOT-23-6 | U8 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_G-Switch_GT-USB-7010ASV | J7 |
| 1 | fcm 1608-0603 | Inductor_SMD:L_0603_1608Metric_Pad1.05x0.95mm_HandSolder | FB1 |

oresat/oresat-adcs-hardware
Controller PCB for OreSat reaction wheels, magnetorquers, IMU, and magnetometers


Novin3dp/7inch-hdmi-screen
این برد دولایه (۶۸×۴۲ میلیمتر) همان پنل ۷ اینچ AT070TN92 و تاچ GT915 را این بار از پورت DSI رزبریپای راه میاندازد. نسخهی HDMI در پوشهی hardware/ دستنخورده باقی مانده است.



pointhi/HighPower-Mechaduino
Mechaduino derivative which drives up to 10A, drawn using KiCad


It measures 36.5 × 56 mm and has 2 copper layers, 1.6 mm thick.
132 parts, built around the INA240A1PW, AS5047D, LM321 and LP2985-33DBV. 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 sirojudinMunir/sf-motion repository on GitHub, at the commit this page was made from: the board is Hardware/foc_driver.kicad_pcb and its schematic Hardware/Communications.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).