Skip to content

bartei/rotary-controller-f4

Repository files navigation

Rotary Controller (F4)

Discord Shop at Provvedo

This repository contains the firmware for a rotary controller board based on the STM32F411 microcontroller (github.com). It provides Digital Read Out (DRO) and single-axis control for CNC-style rotary tables.

🛒 Purchase all boards from our shop: Provvedo Shop


⚙️ Features

  • Utilizes STM32CubeMX for hardware configuration (.ioc file included)
  • Modular firmware structure with FreeRTOS support
  • Supports ST‑Link V2 and Raspberry Pi + OpenOCD programming
  • Optimized for high-speed encoder + stepper motor control

🛠️ Build & Flash

Requirements

  • CMake & C/C++ toolchain (e.g. arm-none-eabi-gcc, make)
  • ST-Link v2 or Raspberry Pi with OpenOCD

Build

git clone https://github.com/bartei/rotary-controller-f4.git
cd rotary-controller-f4
cmake -DCMAKE_BUILD_TYPE=Release .
make -j$(nproc)

Clean

make clean

Flash

  • ST‑Link V2:

    st-flash --format ihex write rotary-controller-f4.hex
  • Raspberry Pi + OpenOCD:

    openocd -f ./raspberry.cfg

    The default raspberry.cfg configures SWD over GPIO pins 24/25 + GND. Ensure GND wiring is the same length as SWCLK/SWDIO for reliability. Modify the GPIO pins in raspberry.cfg if needed.


🔧 Hardware Configuration

  • .ioc file for use with STM32CubeMX included
  • Pin assignments for encoder, buttons, LEDs, SWD, etc. reviewed and tested
  • Memory layout defined by STM32F411CEUX_FLASH.ld and STM32F411CEUX_RAM.ld

🧩 PCB & Schematic

Firmware integrates with hardware design available at:

  • PCB repo: bartei/rotary-controller-pcb — includes Proteus schematic, BOM (with pricing), and fab files; KiCad version in progress (github.com, github.com, github.com)

Together, they form a complete controller + UI system when paired with:

  • rotary-controller-python — a Raspberry Pi Kivy-based DRO + control UI

🛎️ Usage Notes

  • Works as a single-axis rotary DRO
  • FreeRTOS scheduler handles encoder sampling loop
  • GPIO/button routines support nudge and rotary button functions
  • SWD pins must be appropriately wired and matched in length

📘 Resources & Links


✅ Next Steps

  1. Test hardware interface in CubeMX; verify pin assignments
  2. Build and flash firmware, connect to DRO UI app
  3. Utilize FreeRTOS for real-time sampling and control
  4. Contribute improvements — e.g. KiCad support, UI features, multi-axis

📝 Contact & Support

Need help? Join our Discord community for support, discussions, and updates.


Let me know if you'd like additions like block diagrams, pinout tables, or usage screenshots!

About

Digital Read Out and Single Axis Controller

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages