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

DIY FFB Steering wheel (MMosFFB ) (In Progress)

Discussion in 'DIY peripherals' started by Alexey, Dec 10, 2015.

  1. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    good effort ! - i use these for my motion sim motors and have a fan on them - they seem to work fine

    my guess is the ffb wheel will deliver less heat - i like your adaptation of a PC cooling fan :)
  2. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    • Like Like x 2
  3. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Dudes.

    I have found there to be an issue when using certain encoders. Especially those cheaper ones from china.
    These cheaper encoders have an output type called NPN. This is a type of transistor.

    In short this will not simply plug and play and a modification must be made to the outputs of the encoder.
    What is needed is called a pullup resistor. These are resistors in the range of 2k - 5k that are connected from A/B outputs to 5v.

    These encoders that have a voltage range of 5v - 24v have an internal regulator which brings down the voltage to 5v and we will use this as the 5v source.

    The connection of the pullup resistors are pictured: (the two blue ones with leads)
    20171123_140823.jpg

    It is also advisable to use an external 12V source for these encoders as applying the 5v source from the MMos seems to be insufficient for the onboard regulator to work correctly.
    • Informative Informative x 2
    • Like Like x 1
  4. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    you can also fit the pullup resistor on the input channel of your circuit board
    • Like Like x 1
  5. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    545Coins
    Ratings:
    +45 / 2 / -0
    Hi,
    Does the OMRON E6B2-CWZ6C Rotary Encoder 2000P/R count as a cheap chinese encoder?
    What is the advantage of soldering the resistors inside the encoder? If I don't want to risk opening the encoder case, does an external resistor between the input channel and the STM board have the same result?
    I got it to work with the Leonardo, using 1k resistors, but no success with the STM32 board and MMOS.
    I might be missing some detail. My search had no result so far.
    I could use some help. Thanks in advance.
  6. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Yours is not a cheap encoder however it is an NPN output type. The only way I could get mine to work was by having a 12V input from a separate voltage supply and tied to 5v output of the onboard regulator as shown above. Opening the case is easy, just undo the screws and SLOWLY pull the case back. As you pull the case back feed a bit of cable back into the case so that you do not rip any wires on the inside.
    Do this in a clean area so that you do not allow dust and debris to get on the encoder wheel.
  7. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    545Coins
    Ratings:
    +45 / 2 / -0
    I did some voltage measurements on the encoder outputs. Everything connected and the discovery board plugged in, the two encoder outputs had 5,3V when HIGH, 0,28mV when LOW. They changed accordingly between these values when rotated. Had the same results using 5V or 12V supply to encoder.
    Does that mean the encoder is working as it should?

    I also thought the problem might be on the software side, or I connected them to the wrong inputs. They are on PA0 and PA1 on the discovery board, as shown in some old drawing I downloaded with the MMOS instructions.
  8. Mbakos

    Mbakos Member

    Joined:
    Aug 30, 2017
    Messages:
    51
    Occupation:
    Datacenter Technician
    Location:
    Hungary
    Balance:
    545Coins
    Ratings:
    +45 / 2 / -0
    I finally got the encoder working with 1k pullup resistors. One thing is strange though. Is there any feedback in the MMOS software panel of the rotation? In the Game Controllers window I can see the axis moving, but in MMOS the Rotation Offset stays zero the whole time. Should that counter be active?
  9. 1Wheel

    1Wheel New Member

    Joined:
    Oct 21, 2017
    Messages:
    8
    Location:
    austraila
    Balance:
    272Coins
    Ratings:
    +7 / 0 / -0
    Hey, Alexy once you load the MMOs software to the Stm32f4 it shows up as a MMOs ForceFeedback device.
    In this image, if DIY peddles were connected as in this image .. https://puu.sh/ysxDr.jpg using potentiometers
    do you need any Code for them to work.Im new to this electronics stuff. Sitting in the back of the Brain [ oh its going to go bang or Smokes coming Next ]....lol.
    Still, thats how we learn.

    Thanks.
  10. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hi, If you have downloaded all of the MMos zips then in there is a section that depicts connections for the pedals.
    The specific zip file is labelled as "Anschluss" which has an image named "pedale". This image shows the connections for potentiometers for your pedals.

    There is no code needed.

    For your gears and other functions look at the picture labelled "Anschluss" and it shows connections for button 1 - 16. These are active low. So you connect these pins to ground to activate a button press.

    Page 4 of this thread contains images for connections
    https://www.xsimulator.net/community/threads/diy-ffb-steering-wheel-mmosffb-in-progress.7769/page-4
  11. Arn12345

    Arn12345 New Member

    Joined:
    Dec 23, 2017
    Messages:
    3
    Location:
    Latvia
    Balance:
    29Coins
    Ratings:
    +0 / 0 / -0
    Hello!
    What way i need to connect these wires?
    Can someone help me pls?
    here is the pistures of my arduino and the encorder.
    P.S. Allsoo i have wires, switches for h shifter and 10k ohm encorders for gas, brake and cluth.

    Attached Files:

  12. Fernando Igor

    Fernando Igor Member

    Joined:
    Jul 24, 2017
    Messages:
    53
    Occupation:
    Programmer
    Location:
    Fortaleza, Brazil
    Balance:
    913Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino
    0v Gnd
    Vdc 5v
    A and B on pin0 and pin1
    Z pin6

    In the datasheet there are no internal pullup resistors, you need to use pullup resistors, but test before without.
    See the image, got it from EbolzMagy youtube.
    19055627_10203182761207009_2849296793977840410_o.jpg
    • Informative Informative x 1
  13. Arn12345

    Arn12345 New Member

    Joined:
    Dec 23, 2017
    Messages:
    3
    Location:
    Latvia
    Balance:
    29Coins
    Ratings:
    +0 / 0 / -0
    and from where 5V comes to resistors?
  14. Fernando Igor

    Fernando Igor Member

    Joined:
    Jul 24, 2017
    Messages:
    53
    Occupation:
    Programmer
    Location:
    Fortaleza, Brazil
    Balance:
    913Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino
    5v pinout arduino
    See the previous image:
    - 5v arduino connected to pullup resistors and VDC encoder (brown wire)
    - GND connected to 0V (blue wire)
    • Informative Informative x 1
  15. Arn12345

    Arn12345 New Member

    Joined:
    Dec 23, 2017
    Messages:
    3
    Location:
    Latvia
    Balance:
    29Coins
    Ratings:
    +0 / 0 / -0
    Ok
    i did all that i wired it up but it doesn't show the wheel state all it shows is this...

    Attached Files:

  16. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    what are your advanced settings ?
  17. henrique fernandes

    henrique fernandes New Member

    Joined:
    Feb 19, 2018
    Messages:
    6
    Location:
    melbourne vic
    Balance:
    188Coins
    Ratings:
    +11 / 0 / -0
    hello gentles,
    I'm also working on building a Force Feedback Direct drive, but I'm trying a direct drive with a stepper motor, but with a low cost
    So far the main thing to build a project like this is the driver for the stepper motor. I already found some drivers like the Argon driver with some auxiliary components which is able to control the stepper with the PWM sent by the DISCOVERY board (but the cost for this is way more then I want to spend, and close to commercial steering wheels).
    Considering this cost, I started to think in a cheaper solution to the masses, but before executing this plan I would like a second opinion out it.

    first two basic facts
    1 - commercial steering wheels are based on torque control, so it can give a high torque for strong effects and lower torque for the weak ones.
    2 - to control the torque of an electrical motor we need to control the current, in this case in the coils of the stepper motor.

    Following this thinking, I made a lot of research and I found that the most of the "Chinese cheap drivers" have current control by chopping the current. The problem then was that the mode of we set this current control is mostly through switches, so we couldn't control it by Arduino(I choose Arduino because I couldn't find the code to modify the firmware of the discovery force feedback, just the .hex file to burn on it.)
    Searching a bit more about chopper stepper drivers I found some circuits DIY based on the chip Toshiba tb6600, which can drive steppers using 10 to 42VDC up to 4.5A, and the mode of control of this circuit is via 10K pot, so the plan is to use one of this driver ( I found for 10 aud from China), and replace this pot by a X9C103 Digital potentiometer, so we can control it via Arduino

    PS: As the intention is to build the steering wheel not the driver I'll jump this part and buy one of this,(if someone is interested just let me know that I can share the project of this driver and some more information that I found about Chinese drivers, because I am convicted that we can use this "mod" in any driver)

    Cheap Driver Alternative.png

    I will copy the main idea of another forum that uses an Arduino to convert the PWM coming from the DISCOVERY board into a percentage of effect intensity, to control torque( or percentage of Amps applied to the coils), controlling this way the torque.
    The direction signal I will use to set direction and a constant speed, sending pulses to the driver ( I'm not sure about using a constant speed, but it looks like this is the way the commercial FFB wheels work, constant speed and variable torque depending on the effect)

    if this plan works we can make a direct drive 13N.m for under 250 dollars.(this is cheaper then a logitec g29)
    prices in aud
    90 Keyway Dual Shaft Nema 34 Stepper Motor 13Nm
    50 shipping for the motor
    10 chinese driver
    31 power supply 48v 5A
    28 OMRON E6B2-CWZ6C Rotary Encoder 2000P/R New
    25 discovery board
    10 arduino
    _________________
    245 total

    I would like to listen to a second opinion about this crazy plan before start buying stuff. Do you guys think this would work? any suggestion about the circuit or the mode of control?
  18. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    Hi Henrique,

    would like to see how you progress in your project. Maybe you get some inspiration from this thread https://www.xsimulator.net/community/threads/son-of-opensimwheel-an-experiment.7422/
  19. smogf

    smogf New Member

    Joined:
    Nov 19, 2011
    Messages:
    4
    Balance:
    110Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Is this wiring correct? I tried so, but it didnt worked for me :(
  20. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    You have advanced in your project, I am interested in doing a flyer, do you speak Spanish? could we talk from steam or email?