1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Jay's Force Feedback Wheel Controller

Discussion in 'DIY peripherals' started by jakob, Apr 6, 2010.

  1. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Hi,

    I've finished my X-Sim FFB wheel controller. It allows to assign four independent working X-Sim axis to control the wheel. Single axis like motor RPM for fine vibrations in lower RPM, car speed for a stiffer wheel on higher speed or combined axis with X-Y-Z forces/car movements - or all axis together. Four axis that give a ton of freedom for FFB tweaking.

    A G25 with low or medium force feels spongy and soft. The wheel starts to wobble and curbs or crashes are soft as well. This controller will produce fine vibrations without getting spongy and a mild force that wont affect your lap times in online racing. But still strong enough to cut your thumbs on a crash.

    The code isn't 100% done. I still have to tweak the left/right movements for an aggressive feel. The controller runs with USO with a 256000 baud rate and 20ms delay (50 position changes per second). The crystal + baud rate needs some work, too. Maybe I can lower the delay a bit more. And a version for SCN5 Users will follow.

    It will be very easy to solder - just a microcontroller, some capacitors one resistor and a crystal. Layout, code and parts list will follow.

    Next step is getting the h-bridges + motors running and do the profiling job (with help from Nima). The h-bridges will run in locked antiphase mode. Well, I'm not sure if my h-bridges will work proper, because the controller will cause a big PWM-mess on the motor outputs...I hope they won't be gone in a puff of smoke after testing...har har.

    I also want to implement a few digital outputs for a shifting light or an 7-segment LED as gear indicator (based on a fith axis) and an encoder input to get the wheel position. But this can be also done by a joystick controller like Mjoy or Leo's controller.

    Test run video
    http://www.youtube.com/watch?v=ojP1zQcFlRw


    -------------------------------------------------------------------------------


    EDIT April, 07 2010
    Optimized the code and dropped the USO delay from 20ms down to 1ms @ 115200 baud rate. Yay!


    -------------------------------------------------------------------------------


    EDIT April, 09 2010
    Here is the layout in minimal (working, but not final) config. The cables can be soldered directly to the microcontroller or to header pins. VCC and GND can be taken from a joystick controller like Mjoy or a cheap wall wart. The layout is really simple, there is no need of an etched PCB. A cheap prototype board will do the trick.

    USO_Layout.png

    USO_PCB.jpg


    Jay
  2. willynovi

    willynovi Member

    Joined:
    Feb 13, 2009
    Messages:
    64
    Location:
    Argentina
    Balance:
    354Coins
    Ratings:
    +2 / 0 / -0
    jakob, nice news from you and nice work.
    I can´t wait to see that moving wheel in your hands.

    I have my work in progress, but little progress.
    I decided to use a L298 to build the h bridge, so for a FFB wheel I think 4A is enough.

    As I mencioned I'll get values from rfactor plugin, as steering arm force.
    If it doesn´t work as I want, I´ll work with X-Sim mixing some efects as you have done.

    I´ll keep alert at your progress.

    regards, Willy
  3. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Nice to hear that other are workin on a wheel, too. Keep me updated please.
  4. Nima

    Nima Member Gold Contributor

    Joined:
    Nov 8, 2006
    Messages:
    413
    Occupation:
    Glaser
    Location:
    Bad Zwischenahn
    Balance:
    529Coins
    Ratings:
    +0 / 0 / -0
    hi jakob,
    nice work.i don't can wait for test your controller.i can make a profil with slider
    for the wheel. with slider is many simpler to make a nice feeling.i have make one for
    the sim and i love it. you can use the slider in play in realtime.
  5. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    I'll solder your test controller on weekend. Hopefully I get the time to finish the code also.
  6. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Dropped the USO delay from 20ms down to 1ms @ 115200 baud rate. This means up to 1000 possible wheel position changes per second.

    Can't wait to test it with the hardware.
  7. willynovi

    willynovi Member

    Joined:
    Feb 13, 2009
    Messages:
    64
    Location:
    Argentina
    Balance:
    354Coins
    Ratings:
    +2 / 0 / -0
    As I know, you can change polling speed for USB HID from windows setup, right now I don´t remember how, but if I find that I´ll post, maybe you can get better feelings from tyour G25.
  8. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    I've trashed the whole code. The five bytes send by USO (Startbyte + 4xPWM) were written in a string and from that string into the main loop/code. This solution wasn't the real McCoy and sometimes it angered the snort out of me. I had numerous PWM dropouts and byte errors when lowering the delay.

    The new code works with an array and the 4xPWM can be processed without detour. I've checked the PWM output with my oscilloscope and its looking clean and without any brakes - even with a 1ms delay.
  9. njracer

    njracer Member

    Joined:
    Dec 31, 2007
    Messages:
    125
    Balance:
    2Coins
    Ratings:
    +0 / 0 / -0
    Hey Jakob this is a really cool project man. I have a couple questions if you don't mind taking the time to answer??

    First is your controller going to be for existing off the shelf wheels? ie, you use your board in the g25 instead of the board that comes with the wheel? or is this going to be a project where it'll be scratch built, including motors and all??

    if you're going to use your own motors, which i hope you do, how is the wheel going to stop after it reaches its range?? are you going to implement a mechanical stop or software??

    are you going to use a gear reduction system? any chance of doing this through software?

    very interested in this. i definitely want to build a wheel myself, can't wait till you release more info. with the ability to tweak the ffb through x-sim this is gonna be awesome. this is an awesome project you're doing and can't wait to see what you come up with
  10. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    You can use the controller in every wheel, for example, the G25, G27 or the usurious VPP Wheel. I'll run some tests with a VPP because my DIY hardware still needs a lot of work.

    And there is no need of using two motors and two h-bridges. A single motor wheel can still be assigned to two X-Sim axis. And if you don't like profile tinkering you can use the controller with just one single X-Sim axis.
    A G25 has two motors and a combined dual h-bridge. You can tear out all that electronics and drive the wheel with this X-Sim controller and your own h-bridges. Just using the G25 motors and the pot - but I prefer using rotary hall sensors. They have a guaranteed mechanical lifetime around 100.000.000 cycles. And you don't have to bother about mechanical hardstops. The G25 already has them.

    Additionally I'll provide an alternative controller software that allows using this controller to drive any kind of motor stuff. For example driving some fans for wind simulation, vibration motors (under your seat or behind the brake pedal), gearhead motor sims like wiper sim chairs, gauges etcetera.

    I'll use my own motors and I already have an idea for mechanical hardstops. The hardstops will be easy to build and allow around 700° movement. But software endstops may be an idea. Will think about it.

    I'll drive my wheel with a ratio 3:1. A software gearing is on my list. But the maximum way the wheel moves can also be done in the X-Sim profiler.
  11. ledfoot

    ledfoot Member

    Joined:
    Sep 9, 2009
    Messages:
    369
    Occupation:
    IT Manager
    Location:
    Toronto, Canada
    Balance:
    21Coins
    Ratings:
    +2 / 0 / -0
    Excellent job Jakob. I can't wait to try this out :)
  12. hitme

    hitme New Member

    Joined:
    Mar 3, 2009
    Messages:
    23
    Location:
    ningbo zhejiang china
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    wonderful job.That's so great.
    Can you show some pictures here?? I can't see your video in Youtube.
    thanks!
  13. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Hi,

    I don't have pictures because its my AVR dev board that I've used in the video.

    My dev board:
    Dev.jpg
    http://en.wikipedia.org/wiki/All_your_base_are_belong_to_us

    --

    I'll solder Nima's controller tomorrow and upload some pictures.

    Here is the USO layout. Quite simple, as you can see:
    USO_Layout.png

    USO_PCB.jpg
  14. KTasker

    KTasker New Member

    Joined:
    Apr 13, 2010
    Messages:
    2
    Balance:
    4Coins
    Ratings:
    +0 / 0 / -0
    Hi everyone! Im am a noob to all this stuff.

    I am looking to build my own racing set up. Shifter, pedals and wheel. My question i have is directly about the wheel and FFB?

    This controller is to control the FFB on 4 different axis to a wheel correct?
    Is this controller all you need to build a FFB system into a custom wheel?
    Is there a software I will need to run the controller?
    Also is there a USB version of this controller?

    If someone could PM me and explain to me how I can integrate this system or another system to a custom wheel so it has FFB it would be much appreciated.

    Sorry for the dumb questions and lack of knowledge, but im interested in learning :yes:
  15. jakob

    jakob New Member

    Joined:
    Sep 4, 2009
    Messages:
    83
    Location:
    Frankfurt
    Balance:
    313Coins
    Ratings:
    +4 / 0 / -0
    Hi,

    There are no dump questions, just dumb answers. I've designed this board to control a FFB wheel with 1, 2, 3 or 4 X-Sim axis. All you need to build one:
    - This controller (its still not 100% done)
    - 1 or 2 h-bridges
    - 1 or 2 DC motors
    - Power supply
    - Wheel + stuff

    No special software is needed - just X-SIM + the code inside the controller. And using this controller with USB is very easy. Just buy one of these little USB converters for 14$: Sparkfun (Sparkfun is shipping world wide.) (for germany: Tinkersoup) or this RS232 shifter: Sparkfun.

    Jay
  16. benefie

    benefie New Member

    Joined:
    May 24, 2010
    Messages:
    10
    Location:
    Germany, Hamburg
    Balance:
    1Coins
    Ratings:
    +0 / 0 / -0
    Hi everyone,
    I'm watching this forum for a while now. Already saving for my own simulator. But a few days ago, my G25 broke down. No FFB, not recognition of the wheel position, it justs twitches rightwards. Everything else works perfectly. The sad thing is, the thing died (of course) a week after the warranty ended.

    So your controller should be the perfect solution for a repair, because my budget does not allow me to buy a new wheel. Hope that you finish anytime soon, cause Im dying to drive again :( .

    bene
  17. pjanos

    pjanos New Member

    Joined:
    Oct 4, 2010
    Messages:
    13
    Balance:
    0Coins
    Ratings:
    +1 / 0 / -0
    Hi Jakob,

    This project is very interesting. Did you finish it, or not yet?
    I'm also planning to build the wheel myself, but I think the hardware is the least tricky part of it. The question is if X-Sim can provide enough info to drive the wheel to be reailistic. Do you have any experiences with it? If X-Sim is not capable of driving the wheel, I might not even start it...

    Janos
  18. betomuraro

    betomuraro New Member

    Joined:
    May 31, 2011
    Messages:
    3
    Balance:
    22Coins
    Ratings:
    +0 / 0 / -0
    Hello everyone, this is my first post ever. I've read almost all treads about DIY FFB, and this is peraphs the best one.

    I have some questions: this controller youre making jakob, it will move the actual driving wheel or just the sit where the driver is? If this is going to move the wheel, can I use this with DIY boards like Mjoy or BU0836?

    What should I have, in terms of material do build one controller as this one (jakobs FFB)?

    thanks in advance for the anwsers!!!
  19. Mizoo

    Mizoo New Member

    Joined:
    Oct 10, 2011
    Messages:
    7
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hello,

    great job jakob, like you, I'm currently building my own FFB controller.
    But it's not just for x-sim, it's seen by windows as a standard USB FFB joystick.

    For now, I'm using an external motor driver (AMC) and an arcade steering wheel (from Happ), with optical rotary encoder.
    But I'll also build my own motor driver soon (I hope).

    The main thread of the build is on a french forum: http://www.racingfr.com/forum/index.php ... =40779&hl=
    I have also opened a thread on this english forum: http://www.racedepartment.com/sim-racin ... oller.html

    Are you sure ?
    It's far away from my first measurements.
  20. Darkhanbaatar

    Darkhanbaatar New Member

    Joined:
    Dec 15, 2013
    Messages:
    20
    Balance:
    - 6Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 4DOF
    Can i make FFB use arduino
    • Like Like x 1