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 131 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)2 days ago 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

Javier wrote 01/04/2024 at 23:12 point

Hello Yannick, did you ever got in mind the idea of making a wireless communication capability to it in order to communicate to a wheel like MOZA or Simagic or so wheelbases? I'm just a electronics and SIMRACING enthusiast and I've done my own wheel with FreeJoy, I don't know how difficult it would be but I'm pretty sure that's the only thing your project doesn't have that other commercial wheelbases have. But still, amazing project and keep it up!! 

  Are you sure? yes | no

john wrote 11/25/2023 at 22:22 point

Hallo, what does the ODrive board do? If I get the TMC 4671 motor driver board  +  OpenFF STM32F407 USB board;  do I need an additional ODrive board for a 2 axis joystick?

  Are you sure? yes | no

George22 wrote 03/21/2023 at 03:03 point

Hi Yannick can you point me to firmware documentation? I looked under gitHub but all I see are doxygen files related configs, are any html/pdf doc version or maybe wiki pages?

  Are you sure? yes | no

Yannick (Gigawipf) wrote 03/21/2023 at 13:20 point

In the github wiki are some helpful pages for the setup and about the project. Regarding the code itself because it changes often it is currently not completely up to date but in general the github wiki is the place for specific documentation.

  Are you sure? yes | no

rjwilliams951 wrote 03/27/2023 at 21:59 point

Hi Yannick, I've got a similar question.  I've built a wheel using a DC motor, BTS7960 driver, 1000ppr encoder, and STM32F407VET6 Disco board, but the software I am using (EMCpro) is underwhelming at best.  I found your work and I'm eager to give it a try, but I'm completely lost on how to get the firmware onto my STM board.  I don't see any .hex files anywhere, am I missing something?  I've read through the wiki mentioned previously, but I'm still lost.

*edit*

I found the firmware and the GUI, and everything seems to communicate as predicted!  The only issue is there's no FFB, I've followed the pin-out for PWM+DIR but still nothing.  I know the encoder is working, and I can get the motor board to emit high pitch resonance when I steer past the steering range which tells me it's getting something from the STM32, but no actual ffb.

  Are you sure? yes | no

sbagwell82 wrote 03/13/2023 at 22:02 point

Where can i find support pages?

  Are you sure? yes | no

Alexandre wrote 01/23/2023 at 03:04 point

Hello everyone, I am planning to use these motor and VESC in my project.

- Lichuan 80st-M02430 750w servo motor flange 80 2.39Nm 3000rpm AC220V 0.75KW ac engine

https://www.aliexpress.us/item/2255800740387103.html?gatewayAdapt=glo2usa&_randl_shipto=US

- Makerbase VESC MINI 6.7 Electric Speed Controller for Skateboard with Heat Sink 13S ESC Based on VESC 6.6

https://www.aliexpress.us/item/3256804089585986.html?gatewayAdapt=glo2usa&_randl_shipto=US

Also, I would like some guidance on the development platform. I don't know if the ideal would be an OpenFFBoard, any STM32 (here I would need a reference), or another option.
Would it be a good starting point?

  Are you sure? yes | no

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?

Thanks

  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!

Peter

  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
https://en.aliexpress.com/item/33041958959.html?spm=a2g0s.9042311.0.0.2742b90amEFHwV

  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

Similar Projects

Does this project spark your interest?

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