Open FFBoard

A modular and open source force feedback interface and motor driver for DIY wheels and controllers

Public Chat
Similar projects worth following
The goal of this project is to develop a simple and highly customizable force feedback interface for stepper motors and servos or other motors for hobbyists as an alternative to expensive commercial options or for custom setups.

This will allow for example to build DIY direct drive wheel with high accuracy and responsive force feedback yourself or any crazy simulation interface you can dream of.

While there are several commercial toy grade FFB steering wheels and some higher end simulator grade producs these are very expensive and and are often not moddable or come with their own expensive ecosystem.

It makes sense to focus this project on a simple open source force feedback interface as this is the part where the community lacks a good and open solution.

Therefore the main goal will be to develop a universal FFB controller (Open FFBoard).

It will provide a modular architecture and interfaces with multiple motor drivers and a reference motor driver board based on the TMC4671.

The FFBoard is just an interface for USB HID, encoders, buttons and pedals. It can interface with almost any sensor or motor.
The software is modifiable for different motor drivers and control outputs.

Currently supported motor drivers: - FFBoard TMC4671 - ODrive (CAN) - VESC (CAN) - PWM (centered, pwm+dir, RC ppm, dual PWM)

Currently supported encoders: - ABN incremental (PWM) - BISS-C (PWM, TMC, requires external transceivers to SPI3) - MT6825 (PWM, TMC) - Encoders supported by VESC and ODrive - SinCos (TMC)

  • 1 × Motor driver For example TMC4671 FFBoard driver
  • 1 × Servo or Stepper motor
  • 1 × 36V or 48V Power supply

  • Update 6: Live effect monitoring, ADS1115 ADC, Analog processing

    Yannick (Gigawipf)09/21/2022 at 08:07 0 comments

    Watch the video for a full summary and demos.

    In V1.9.x the GUI was redesigned to be easier to use, and we added effect monitoring options to see the calculated forces and statistics.

    A simple profile management system allows to quickly change between settings for different games.

    The speed and accel filters for the encoder can be tuned with 3 presets now with preview graphs.

    The ADS1115 is now supported via I²C to allow 16b differential inputs with variable gain settings. This can be useful for pedals and reducing noise by placing the ADC close to the sensors.

    The ADS1115 and local analog inputs now have manual range selection options and an optional digital lowpass filter.

    Belt/Gear driven setups with a reduction between the encoder and the wheel/handle can use a fraction based reduction setting that prescales all positions so the range selection and all effects still work normally.

  • Update 5 - BISS-C, Linux, CAN button/analog sources

    Yannick (Gigawipf)05/08/2022 at 14:11 0 comments

    In version 1.8.6 the OpenFFBoard now has support for more button and analog sources:

    • Local pins
    • CAN frames for buttons and analog sources
    • PCF8574t I²C port expander for buttons
    • Analog Shifter (Logitech G29/G27)
    • SPI shift registers and Thrustmaster wheels

    External encoders for TMC allow the use of BISS-C and Magntek MT6825 encoders with the TMC4671 motor driver module even when those are not directly supported by it.
    This works by reading the encoder at fast intervals and forwarding the position via SPI to the TMC4671. This increases the load of the microcontroller dramatically but seems to work well in usual setups so it is a viable solution if you don't have a directly supported encoder.

    From this version on the configurator also supports the windows dark mode and the TMC graph follows GTK styles as well.

  • Update 4: VESC, ODrive support & new command system + HID

    Yannick (Gigawipf)01/13/2022 at 14:17 0 comments

    ODrive and VESC based motor drivers can be used via the CAN bus now.

    Those drivers need to be configured manually for torque mode as the FFBoard will just be sending torque values and reading the encoder positions from the drivers.

    The old command system did not really fit into the current modular class structure after the introduction of FreeRTOS previously so it was completely reworked into a system with a modified syntax.

    Each command and class has a string name and also an integer ID allowing readable terminal commands and transmission of strings from the firmware to report back lists of enabled features and names but also almost full control via HID which does not support strings.

    The new command list is available in the github wiki.

    The changes in the configurator also make it more stable and responsive.

    HID can be used in the FFBWheel mode with third party applications to change settings automatically. For example changing the steering wheel angle or intensity scaler based on the currently driven car. (Example implementation submitted for AC content manager).

  • FreeRTOS + TinyUSB + Multiaxis support

    Yannick (Gigawipf)05/23/2021 at 10:11 0 comments

    There was a long time between the last 1.2 and current 1.3 firmware release.

    The reason is a huge internal change porting everything to support freertos and using TinyUSB as a USB backend instead of the customized ST middleware examples which had to be modified a lot to fix bugs in the original code and making it composite device compatible.

    With TinyUSB its a matter of a few lines of code to define a new composite device now.

    At the same time we also got basic support for multiple FFB axes (2 at the moment) by sending force to multiple motor drivers based on the direction sent by the game. This is still quite experimental.

    Doxygen site:

    The serial protocol was changed to echo back the original command to be more resilient to out of sequence or lost replies. Which should normally never happen but it makes programming a user interface a bit easier and safer as well.

    That of course also required changes in the configurator gui as well.

    Changes GUI:

    • The axes and common ffb gamepad settings were split into separate tabs.
    • The integrated DFU uploader now also supports hex files directly out of the stm32cubeide.
    • Option to change the Q value of the constant force filter
    • Encoder configuration and selection changed
    • Independent damper option
    • Unavailable but existing options (already selected motor drivers, sources with pin conflicts) show up greyed out
    • Spinboxes on most values as an alternative to sliders
    • Added dump and load options for settings

    Changes Firmware (+more):

    • FreeRTOS support
    • TMC4671 split into separate subclasses for multiple instances
    • TMC now using current control mode during init phase
    • TMC calibrating ADCs with PWM active (Better offset correction)
    • Encoder system reworked to pass encoder to motor driver
    • Multiaxis support in FFBWheel
    • USB System using TinyUSB
    • USB running in rtos task
    • New serial protocol
    • CAN bridge supports GVRET/SavvyCAN
    • Improved TMC debug bridge to support newer TMCL-IDE
    • All FFB effects implemented
    • Independent damper support
    • User selectable CF filter Q factor
    • Improved PWM output
    • Added dump and load options for eeprom emulation
    • Basic error handling system
    • Improved led blink effects for status messages
    • Fixed many bugs impacting stability

  • Full build video. HR115 + TMC4671 demo build

    Yannick (Gigawipf)02/26/2021 at 10:50 0 comments

    This video was made over the course of a few months and may be outdated at some point.

    I hope this gives you an idea what you need for building your own direct drive wheel and what to watch out for.

    The quality is extremely good. Feels even better than the 130ST-M15015 but the SEM HR115 is sadly not manufactured anymore. Sometimes they come up for sale used.

  • New FFBoards (Update Video)

    Yannick (Gigawipf)12/10/2020 at 17:02 0 comments

    The project switched from the STM32F411RE to the F407VG because we need more pins and the availability is currently still better.

    In the video many changes from the last update are discussed.

    The new TMC boards were already shown in the last logs but in the video i am again going over some changes and what new features can be helpful.

  • New TMC drivers!

    Yannick (Gigawipf)10/18/2020 at 20:16 1 comment

    Finally after a long wait the new TMC4671 boards are here!
    This time almost fully assembled from the factory. Not going to make any more completely by hand...
    The picture shows the old one compared to the new one.

    Changes include:
    • 2 motor caps
    • Onboard 5V regulator
    • Differential SinCos encoder inputs (Insane resolution)
    • Common voltage reference for shunt amps
    • Mosfets not blowing up on 48V (lowside gate pulldowns, safery zeners + 5v regulator for quick startup)
    • LM74700 instead of LM5050 for much stronger and faster active diode switching.
    • Better terminal layout for connecting motors due to rotated power stage.
    • NTC temperature sensor

    Update video hopefully coming soon with some details about the changes and sincos features.

  • SinCos encoders and a tiny wheel

    Yannick (Gigawipf)06/25/2020 at 19:25 2 comments

    While working on the next pcb version one task was to improve the support for analog sine/cosine encoders.

    With sincos encoders we have the option to use high resolution absolute encoders and in the next version hopefully even with differential inputs for less noise.

    For testing i made a few AS5115 based magnetic encoders and mounted a magnet to the shaft of a drone motor as a test setup.
    That gave me the idea to make a tiny ffb wheel :)

  • Added 3 phase servo support

    Yannick (Gigawipf)05/23/2020 at 20:54 0 comments

    As most high end direct drive wheels use servos instead of steppers servo support is important.

    The 130ST-M10010 and 130ST-M15015 are the most common servos for this application with over 20Nm of torque.

    In the last weeks i was able to compare the Nema34 stepper and a Mige 80ST-M02430 and a 130ST-M15015. Two very different servos.

    The 80ST is with under 5Nm a bit weak but has very low resistance and good reaction speed while the 130ST has dangerous amounts of torque and a bit more mass and resistance.

    For a wheel the 130ST is probably the best option here.

    The next TMC motor driver will also have the new chip with a few fixes, an onboard step down for better reliability and will probably keep the external braking resistor as the large servo does generate quite a lot of voltage when being turned manually.

    Update summary from the last video:

    Reasonable motors are for example:

    3 Phase servos:

    Nema34 Steppers with Encoder:

    34HS59-5004D +Encoder (E6B2CWZ6C or AMT132)

    Those are all usable motors :)

  • Developing a GUI

    Yannick (Gigawipf)03/27/2020 at 11:15 1 comment

    The setup procedure via command line can be confusing and error prone.
    Therefore a graphical interface should help with the setup and tuning of parameters.

    I chose python with Qt as this allows rapid development of a nice interface for changing main classes or setting up the motor driver.

    This is a very early version and later the most common setups might be done via a simplified wizard to reduce problems.
    The DFU mode allows to flash new firmwares without a debugger. Remember to do a full erase if problems occur as sometimes the ST programming tool does not erase the correct sectors...
    Later the DFU programmer will hopefully be integrated as well.

    The GUI can be found on Github (Ultrawipf/OpenFFBoard-configurator).

View all 21 project logs

Enjoy this project?



Elton Jhon wrote 06/27/2022 at 01:22 point

hi friends ... 

Will this servo motor work? ESM 125C (I)

  Are you sure? yes | no

Artemis152 wrote 04/07/2022 at 05:39 point

Hey, you are doing some awesome stuff there!
What budget motor do you recommend?

  Are you sure? yes | no

Yannick (Gigawipf) wrote 08/13/2022 at 21:07 point

Usual motors are the Mige 130ST 10010, 15015 and the 80ST 04025 and similar ones. The 80ST 04025 can be cheap to ship as its light and will work pretty well.

  Are you sure? yes | no

fredwuxs wrote 07/13/2021 at 14:37 point

hello, I am on the way make a FFB and i got a Err in GUI shows "Err:21:crit:TMC Adc/Shunt offset calibration failed." please help. 

  Are you sure? yes | no

laverdone wrote 07/01/2021 at 14:11 point

It's work with linux with force feedback?

  Are you sure? yes | no

Eugene wrote 03/02/2021 at 09:01 point

Hello, Yannick. Maybe this is a stupid question, but does FFBoard absolutely require something like 407VG or can the firmware run on a board with less powerful components? Is F103 board not enough? For example EMC runs on F103c8t6.

  Are you sure? yes | no

Yannick (Gigawipf) wrote 05/24/2021 at 09:53 point

The F103 is not enough. It has not enough flash and no fpu.

A F411RE for example works but if you want it to run on a custom board you might have to port the code manually and set the pins, flash addresses and settings accordingly. Also be careful that some devboards have no usb vsense. Without that it will not detect the usb connection.

  Are you sure? yes | no

starsc wrote 02/15/2021 at 21:54 point

Hi Yannick, very compliments for your project, really great. Do you have a possible roadmap for it? Also, do you think you'll be selling your pcb assembled when it'll be ready? Any way to plug a diy pedal set?


  Are you sure? yes | no

Jason Cho wrote 01/05/2021 at 13:49 point

Amazing project, thanks for sharing

  Are you sure? yes | no

jaygrovr wrote 11/09/2020 at 20:29 point

If I get some boards made, is this project far enough along it will run my servomotor with the software you provided?  Great job btw.  Is there a place i can donate for the hard work?

  Are you sure? yes | no

mayataotaotao wrote 07/22/2020 at 04:49 point

Hi Yannick,
Can you send me a complete keil project?

I download your source code from gethub, but many libraries are missing and there are many errors in compiling. Now I have a complete set of hardware and software of motor driver, and I want to write a program similar to MMOs separately. However, after reading your source code and the open source simucube source code on gethub, there are still a lot of problems, which I don't understand. Do you have open source materials for MMOs firmware?

  Are you sure? yes | no

Yannick (Gigawipf) wrote 11/13/2020 at 09:41 point

its a stm32cube project and should compile directly. if not check some include paths.

mmos firmware is not open source and the creator afaik abandoned it years ago.

  Are you sure? yes | no

Peter Fröhlich wrote 06/07/2020 at 09:26 point

Hi Yannick, thanks for sharing the great project! I'm a professor teaching elektrical machine to mechanical engineering and mechatronics students (only basics, I'm no drives expert). Out of interest for a DIY FFB wheel and for the topic I found your project. I would like to create a prototype for testing myself. I cannot promise that I can make any useful contributions but who knows. Found everything on Github - thanks for sharing!

For force feed back we need only to control the torque, correct? Is that the main variable that's being passed on from the PC FFB driver to the wheel controller?

Thank you!


  Are you sure? yes | no

fernando wrote 05/26/2020 at 17:05 point

I recently bought this hydro servo, to try to use it with another project, servo driver + arduino, but I didn't want to make it work, I would like to know more about the project.
I have this kit at the moment

  Are you sure? yes | no

Datch O`Neil wrote 04/20/2020 at 11:41 point

Hi! It is great project! Wanna try to use it, so I've ordered nema 34 stepper motor with driver and STM32F411RE developer board. Hope that I can run it with you software in a week!

Because of it got some questions:

Is it any PC software available? I just want to set up turning angle from PC, but I didn't saw it in your video.

What model of encoder are you using and how is it connected?

Is it any wiring diagram available?

  Are you sure? yes | no

paytufo wrote 04/01/2020 at 23:37 point

Wow!!! I'm realy shocking!!! Congrats!!!

Will this work to use with a bike as a turbo trainer with programs as zwift?? The idea is very similar but simulating inclination and some other fisic parameters.

  Are you sure? yes | no

Sean McVeigh wrote 02/28/2020 at 19:02 point

I'm working on a similar project to yours (even considering using TMC4671 early in the design stage, but I expanded my project to a custom FOC design). Its not for FFB, but does implement closed-loop torque control.

"INA232 shunt amplifiers are extremely common mode step sensitive despite very high claimed CMMR. The slopes are too steep while switching. This causes high noise in the measurements."

TI has an APP notes (sboa170b and sboa174a) and on currents sense amplifiers that describes this. There are three types of current sensing for an H-bridge: high side, low side, and inline. The TMC4671 expects you to use inline (at least the eval design uses it). One of the primary disadvantages of inline is the dV/dt. 

"We will also add low pass filters to the encoder and hall inputs as with some motors significant pwm noise gets back through these lines and causes glitches. This means even more components to solder :/"

Check out note sboa170b:

"For applications that require measuring current in a high dv/dt common mode transients like motor control and solenoid control, the INA253 is specifically design to reject PWM signals with a settling time of <10μs."

  Are you sure? yes | no

Crousti wrote 12/17/2019 at 14:37 point

Hi, i kind of stumbled on your project as i am currently making one myself.

I am using a stm32f4 discovery board,  a Xnucleo powerstep01 for control, a hybrid 2 phase stepper that consumes a maximum of 6A per phase, with a 1000PPR encoder.

I am trying to adapt the software  from simucube instead of MMOS, as it is supposed to work better, but it seems i still have a very long way to go.

I am also building a 8 speeds H shifter that will be connected to the board.

For now i'd really like to see the thing moving. I will surely follow your example and use the TMC driver when it is released, but for now i'd like to get the first step, with the powerstep.

It does not matter If it fries, or is not good enough. It will motivate me to continue ...
Since you abandoned the powerstep solution, would it be possible to get a look at your code ?

Thanks :)

  Are you sure? yes | no

Yannick (Gigawipf) wrote 12/20/2019 at 11:00 point

The main part will now be a stm32f4 based usb interface with a modular software architecture. This would be kind of an open source alternative to mmos if you are interested.
You could use it to also control a powerstep based motor driver. I can send you some ressources, but while it worked, it was also far from finished.
Therefore the new modular software approach.
The first boards for that should arrive soon. Think of it like the top half of the old board with a bunch of headers for extension and your own motor drivers.

  Are you sure? yes | no

mayataotaotao wrote 07/22/2020 at 04:40 point

Hello, man, do you have the source code of MMOs? I'm also doing the same thing as you, but I don't have all the source code of simucube. I still think it's better to have the source code of MMOs.

  Are you sure? yes | no

julien.greffeuille wrote 12/04/2019 at 18:18 point

Hi Yannick, i'm looking to make a diy nema 34 based steering for over 2 years, i'm now in first year of electronic school (hopefully i would be able to created circuits like you one day :) ). I'm looking at your project for several months now and i would be glade to be one on the first to try this circuit when it will be finish.

  Are you sure? yes | no

Yannick (Gigawipf) wrote 12/05/2019 at 12:49 point

The next motor driver board will probably be made soon once the pcb design is final.
Its pretty much almost finished. I will post a log once it runs and if you have any requests you can message me via PM or the group chat.

  Are you sure? yes | no

Benjamin wrote 11/22/2019 at 21:27 point

It would be wonderful if you could add 2 axis/joystick force feedback to this project. An open source solution is much in demand.

  Are you sure? yes | no

Yannick (Gigawipf) wrote 11/23/2019 at 18:24 point

Currently not the main goal as i am trying to get a reference motor driver finished and the boards done, but certainly possible to implement later.

The design will be modular with the ability to have up to 3 motor drivers on one bus. It should be possible to implement that in software.

  Are you sure? yes | no

Dmitriy wrote 07/08/2019 at 10:30 point

Great project! Any chance you can show piece of code for maintaining constant torque while changing position? I'm just curious of powerstep01 capabilities

  Are you sure? yes | no

Yannick (Gigawipf) wrote 11/23/2019 at 18:21 point

I have used a foc like control scheme by sending bursts of step pulses to align the measured encoder angle to the current phase of the powerstep. Crude but worked. The the motor current was changed to set the torque together with a 90° phase offset of these step bursts. The next version will feature a real FOC motor driver and should run much better.

  Are you sure? yes | no

Daren Schwenke wrote 05/11/2019 at 19:35 point

I have always dreamed of a controller board which could handle both steppers and BLDC motors.  FOC applies to both in the realm of what you have done here.  The H-bridges required don't care if they are all bound to a single motor, so the same board could effectively handle both 3 stepper motors (6 H-bridges required), or 2 BLDC (3 phase delta wired) motors (6 H-bridges required) and use FOC control.  Just a thought...  :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates