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 (think about vesc and odrive compatibility) 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 (USB HID for most users. Could also be a PPM output).

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

  • 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).

  • Announcement video

    Yannick (Gigawipf)03/13/2020 at 15:03 3 comments

    After working on this project for a year now i feel its finally time to make an official announcement video detailing some of the ideas and the current state of this project.

    Due to some requests in the end are also some longer racing demos of the OpenFFBoard in a wheel configuration.

    In this video i am showing project cars 1 and assetto corsa.
    Project cars 2 feels also great with that. Pretty much any racing sim should work nicely with this without drivers.

  • Finally FFB again!

    Yannick (Gigawipf)02/15/2020 at 13:56 4 comments

    The last days i spent preparing the firmware for a modular architecture, porting the old FFB code and improving it to a usable point.

    Constants for the driver and some settings are stored in flash and loaded at boot so you only have to set parameters like motor type, main class, encoder parameters and button sources once.

    Thrustmaster wheels with buttons are supported now as well as 8 local digital pins as button sources.

    Most of the effects are implemented and set to reasonable values.
    Its HID Physical Interface compatible so it works without drivers for any supported platform and game.

    Here is a short race with the new boards on low/medium power for checking some parameters:

    No comments on my driving or the mess of a table please^^

    The motor used is a Nema34 with a 10k ppr encoder on the back with a supply of 19V (Notebook psu).

    The large cap on the left is connected to the internal motor power rails to buffer the power without enabling the braking resistor too often. You don't need a cap this large but having more capacity is always a good idea here.

    I am now waiting for a new version of pcbs to arrive with better hall/encoder filtering as with some very noisy motors the pwm can cause some issues. Apart from that i am pleased with how good it works and feels and with some tuning it should get even better.

  • Improving noise with filters and better amps

    Yannick (Gigawipf)02/04/2020 at 17:23 2 comments

    In the first version of the TMC board i tried INA282 current shunt amplifiers.

    It turns out despite having very good specs on paper they are extremely susceptible to fast rising common mode voltages.

    And we have these a lot as the TMC needs to measure currents on the floating motor outputs.

    This meant extremely bad noise on the current measurements.
    As an alternative there are the AD8417 which are much better suited for this application for the same price.

    See for yourself what a difference this makes:

    3 Phase openloop current
    Open loop current of slow 3 phase motor

    Looks pretty good considering that this is on a low scale and we can go MUCH higher and maybe even improve the noise with filter tuning.

    INA282 at more than double the current

    Looks very bad right?
    This is because the INAs output spikes >1V up or down for up to 15µs after almost every pwm cycle (25-50khz).

    This is the output of the INA282 with no motor current. Only pwm active. yup. pretty bad.

    Obviously we are now using the AD8467. For even better noise the AD8468 with low gain could be used but this would decrease the maximum current even more. I am aiming for >25A fullrange for this version for now.

    By using different shunts or the lower gain AD8468 we can decrease or increase the limit depending on the application.

    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 :/

    Next step is to order new pcbs to fix the previous errors and write the firmware.
    The firmware is currently in a stage where most base features are working and i am implementing an example for FFB soon

    Also as the board is quite small there is not much room to add capacitors causing high ripple on the motor voltage rail when backdriven as there is currently only space for one larger cap.
    When used with large motors it is recommended to add external caps between GND and PB+.

View all 18 project logs

Enjoy this project?



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