Code Monkey home page Code Monkey logo

openffboard's Introduction

Open FFBoard

The Open FFBoard is an open source force feedback interface with the goal of creating a platform for highly compatible FFB simulation devices like steering wheels and joysticks.

This firmware is optimized for the Open FFBoard and mainly designed for use with DD steering wheels. Remember this software is experimental and is intended for advanced users. Features may contain errors and can change at any time.

More documentation about this project is on the hackaday.io page.

The hardware designs are found under OpenFFBoard-hardware.

The GUI for configuration is found at OpenFFBoard-configurator.

These git submodules can be pulled with git submodule init and git submodule update

Updates often require matching firmware and GUI versions!

Documentation

Documentation will be updated in the GitHub Wiki.

Available commands are listed on the Commands wiki page

Code summary and documentation of the latest stable version is available as a Doxygen site.

For discussion and progress updates we have a Discord server.

Extensions

The modular structure means you are free to implement your own main classes. Take a look into the FFBoardMain and ExampleMain class files in the UserExtensions folder. Helper functions for parsing CDC commands and accessing the flash are included.

The firmware is class based in a way that for example the whole main class can be changed at runtime and with it for example even the usb device and complete behavior of the firmware.

For FFB the motor drivers, button sources or encoders also have their own interfaces.

A unified command system supporting different interfaces is available and recommended for setting parameters at runtime. (see CommandHandler.h and the example mainclass)

Copyright notice:

Some parts of this software may contain third party libraries and source code licenced under different terms. The license applying to these files is found in the header of the file. For all other parts in the Firmware/FFBoard folder the LICENSE file applies.

openffboard's People

Contributors

groybe avatar jonlidgard avatar manoukianv avatar sampan2000 avatar tda-2030 avatar ultrawipf avatar votrungchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openffboard's Issues

BeamNG Linux

hi - awesome project.

got it running and had some initial trouble getting FFB on BeamNG in Linux(steam).

the trick is:

Once you added your wheel, you will need to enable FFB as it will be disabled by default. If you just leave it enabled without changing anything else, it will not work. You will need to set ''Update Type'' to ''Full (Slow Fallback)''

source:

maybe you could add this to nodes on the working games list.

Sudden loss of force feedback

Because the multi-axis firmware supports more types of force feedback, I changed the firmware to a multi-axis firmware, but this firmware is not stable enough. When the power setting is not large, the force feedback is often lost and it will not be automatic recovery can only be manually restarted. How to solve this problem?

out of bounds error before initialization

recently, at least on my setup, my tmc4671 doesnt initialize() or get to encoder alignment()

i have tracked down the change to line 175 in FFBoard/src/Axis.cpp prepareforUpdate()
previously if (!drv->motorReady()) return; allowed the rest of the function to be skipped over

but now with the line commented out //if (!drv->motorReady()) return; the function continues, and asks for a position from the tmc4671 encoder engine. sometimes the encoder engine returns a nonsensical value and the outofbounds error is triggered, which prevents the tmc4671 from ever getting to initialize()

is this intended behavior?
this could be related to my setup (tmc4671-6100 BOB) or the fact that i am using my sincos encoder in single ended mode and the offset is way too far off from the reference 2.5 volts for the tmc4671 to make sense of the reading

F1 2018 doesn't detect the wheel

Might not be possible to get it working with f1 2018, I think the new wheels must be implemented by codemasters in the game, it has a list of compatible wheels

First Try

I compiled using Cube.
I have the STM Discovery card (STM32F407), is the firmware compatible?
I loaded the hexadecimal on the board, Windows installed the drivers and recognized the board, but in the Joystick manager it does not appear.
Something is missing?

Implement missing FFB effects

Most effects are not used by most games but all effects reported as supported should be implemented in some way.

Supported are currently (edited with current devstate):
Constant force
Sine
Square
Spring
Damper
Friction (Needs tuning)
Deadbands for spring and damper
Inertia effect (Needs tuning)
Triangle
Envelope (kind of)
Sawtooth
Always on damper

Missing:
Optional custom force (or remove from descriptor as its not really standard anymore)
Testing multi axis effects
Always on filter and inertia

HID control of certain parameters

While control via a virtual serial port is easy to use and flexible it may be helpful to also have a way to automate some gamepad relevant parameters using vendor defined HID reports when the serial port is already in use.
As it is not feasible to have a report for every setting a single in/out/feature report should be used with handlers listening to commands.

With HID commands it would be possible for external programs to set parameters like strength, wheel range and check the state.

About the game

Do I need to get the game data by myself, or openFFB has realized the related data of the game

Is it compatible with European Truck Simulator 2?

I have compiled the code with CubeIDE and download firmware to STM32F407, then connect the board to pc with usb and hear a tone from pc. But, I can't find new control device in setting of European Truck Simulator 2. By the way, I can see a new serial device in windows device manager panel after connect board.

So, I want to know that this project is compatible with European Truck Simulator 2? Is there a list of supported games?

what would you like help with?

Yannik,
I have been doing research for this project the last few weeks and was just about to start the same adventure with servo motors as it made me upset to see all of these people starting the projects seeing its involvement and then selling the boards for 300-400$ when they all used open source software. so i greatly appreciate your dedication to your work and would like to help you in any way possible.

I have not programmed in python for a while as most my recent stuff has been in C# but it would not be hard to pick up again. it appears you already started working on the GUI and everything so what left do you have to do?

It was hard to get a grasp of what you were saying you were having issues with in the video. is the FFB working 100% ? were you able to figure out the interface and how the drivers work or do you still need help with that?

I look forward to hearing back from you and would like to exchange emails
I can be reached at mgriffizl39 ( AT) gmail(DOT)com

Please switch to makefile

IDK what build system you are targeting, please switch to some kind of standard like make or cmake

Question about driver chip

Great project and thanks all your sharing!

I'm a little bit curious why you choose TMC4671 as the driver. DRV830x series are often used in odrive project, can those chips or other chips be used as an alternative?

Another question... Can I use another motor driver chip with pwm input and current sensor output? In that case, can openFFB main board run the FOC algorithm? If so, openFFB main board+ my own driver board(pwm input and current sensor output) + position sensor board(encoder) seems enough to run openFFB project... If not, which means openFFB main board doesn't run FOC algorithm, it seems that there is no need to choose STM32F407 because weaker chips may enough to run this project.

I don't know if my consideration is correct, so would like to know your answer : D

Build Question

I just uploaded all the board info to pcbway and clicked the order button. Might you know anything about the following request?

Dear Customer, Thank you for your PCBA order [] , we checked all the files you uploaded and find there is no pick&place(centroid) file. Please go to 'Production Status' to upload this file . If you really can't provide this file, please contact your service representative to explain that.

I confess this is my first time going through the board production process. Might you have a clue on what this is or do i tell them i don't have one.

Thanks

Crazy Question

I'm been looking over your project for a while now. Very nice!

I've tried JLCPCB but they are out of stock on parts. I'm working with PcbWay get 5 of your boards made.

Full disclosure ... i'm that crazy boat guy from discord who is trying to make a boat throttle control. So as I continue to understand and setup my system, could I ask your thoughts about implementing the following?

  1. Does the CAN implementation transmit messages based on changes to the inputs? Can it receive messages to change its settings? Or is all CAN messaging a roll your own. My thoughts are to use can to network 3 of these boards via can to function as a unit.

  2. How could you detect pressure being applied to an end stop? The thinking here is to create a neutral position on the wheel. Kind of 3 modes of operation
    a. neutral - 5 degrees freedom of rotation. Force against the end stop would switch mode to either forward or reverse.
    b. forward - 0 to 90 degrees of freedom. When return to 0 switch to neutral.
    c. reverse - 1 to -90 degrees of neutral. When return to 0 switch to neutral.

Good work and thanks for you time!
Ben

discord down ?

the link to discord is expired - is discord still active ?!

Restructuring flow for FreeRTOS

This is still experimental but FreeRTOS might simplify the management of tasks when initializing motors or status checks a lot.

At the current state it is a good chance to check out if it would help with development.
Once functional a lot of parts of the firmware would need some changes to make use of threads and timers and should implement helper classes to handle status checks.

Specifically for the command parsing and TMC4671 calibration and encoder initialisation this would open some simplifying options like using delays and timers for waiting instead of blocking the cpu or using more complicated state machine structures.

The development will be tracked on https://github.com/Ultrawipf/OpenFFBoard/tree/ultrawipf_rtos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.