Close
0%
0%

Open FFBoard

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

Similar projects worth following
Starting from
$40.00
gigawipf has 133 orders / 2reviews
Ships from Germany
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.

Also supports 2 axis joysticks with the ODrive.

Currently supported motor drivers:

- FFBoard TMC4671

- ODrive (CAN)

- VESC (CAN)

- PWM (centered, pwm+dir, RC ppm, dual PWM)

- Granite Simplemotion (Ioni,Argon, original Simucube 1)

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

  • TMC4671 1.3.3 kits and setup video

    Yannick (Gigawipf)03/17/2024 at 17:40 0 comments

    After a long time finally a reliable version of a TMC4671 + STM32F407 kit has been produced.

    This version used the AC724 30A current sensors for lower noise and more reliable mosfets and protections for the mosfets as the previously used BSC030N08NS5ATMA1 can briefly glitch on due to the miller effect during steep switching transitions at voltages over 36V.

    This issue has been eliminated in this version by using different mosfets and discharge diodes on the gates.

    For this an updated setup and tuning tutorial is available:

    The STM32F407 is available on Tindie, the full kit now available on Elecrow (at the time of this log).

  • 2 Axis joystick support

    Yannick (Gigawipf)04/05/2023 at 08:01 0 comments

    For a long time 2 axis support was always promised and was partially implemented but just now I finally got an actual FFB joystick to test and improve it with.


    And to my surprise even the TMC4671 which was never tested in a dual configuration worked almost perfectly after some small modifications.

    The ODrive CAN bus implementation caused more time debugging than the TMC4671 :)

    See for yourself in the video below.

  • Simplemotion V2 support

    Yannick (Gigawipf)01/17/2023 at 09:40 0 comments

    With having basic support for Granites Simplemotion V2 protocol users have more options of motor drivers again.

    While the project is best uses with our custom designed TMC4671 based driver the Granite Ioni drivers were in the past used for Simucube V1 / OSW kits and also provide good quality force feedback with high compatibility.

    The drivers use RS485 instead of CAN or SPI so it has to use the less reliable uart peripheral of the STM32 with new pins but it still works perfectly fine at 1kHz single with a single axis by using the fast cycle update. The regular protocol has a high overhead and does interfere slightly so it should be avoided at the moment and is only used for the setup and getting specific data from the driver.

  • 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: https://ultrawipf.github.io/ffboard_doxygen/index.html

    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.

View all 24 project logs

Enjoy this project?

Share

Discussions

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