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

$450 Mige Direct Drive Wheel using MMOS and AASD

Discussion in 'DIY peripherals' started by Peacemaker105, May 6, 2020.

  1. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    Hi there,
    So after using the AASD servo drivers for my rig and with how cheap you can get them bundles with servo motors i have been wondering if anyone would ever be able to get a Direct Drive FFB Wheel up and running with one.. Then i stumbled upon a post on Hackaday.io and someone had done just that! . Using an STM32F407 Discovery board and running MMOS he was able to achieve this. I then set out to try and build one myself. His post is in Chinese and i had to work with google translate to figure out what was needed but with the help of his pictures i was able to make some sense of it.

    Here is the wheel all connected in its working state and the stm32 control box:

    20200506_111646_compress23.jpg 20200506_110928_compress84.jpg 20200506_103931_compress91.jpg

    Links and Sources:
    Software and files - https://drive.google.com/file/d/1szklvVdJ3R_UgiG6nuSoo5OjDvgcZej2/view?usp=sharing
    Hackaday project - https://hackaday.io/project/168801-diy-mmos-ffb-stm32-and-servo-drive-servo-motor
    DIY Sim Racing (his youtube) - https://www.youtube.com/channel/UCKOHWlPf_8TIHPGB0uo6Nrg
    AASD Manual - https://www.machsupport.com/forum/index.php?action=dlattach;topic=33543.0;attach=44811

    Parts:
    130ST-M10015 (25NM) + AASD-30A - $600 - https://www.aliexpress.com/item/32868662195.html?spm=a2g0s.9042311.0.0.67274c4d5qpWWV
    STM32F407G-Disc1 - $32 - https://au.rs-online.com/web/p/processor-microcontroller-development-kits/9107951/
    OMP style rim - $66- https://www.ebay.com.au/itm/Universal-320mm-Black-Suede-Leather-Flat-Steering-Wheel-Drift-Rally-Yellow-AU/323875136988?ssPageName=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649
    3D Printed hub Adapter - https://www.thingiverse.com/thing:1575453
    DB25 cable - $12 - https://www.lindy.com.au/serial-cab...EcdyMbqejnxuTy9Js35pStYljWF6hiKgaAus7EALw_wcB (not necessary just some cable would work to use supplied db25)
    2x20 + 2x10 Pin header connector - https://www.robotgear.com.au/Produc...-54mm-Crimp-Connector-Housing-2x20-Pin-5-Pack (not necessary.. can just solder)

    Total = $710 AUD ($456 USD)

    Steps.....

    Connect the AASD drive to Mains power (220v). If you search @Thanos Youtube account i think he talks about how to get it working with 120v somewhere. make sure you know what you are doing or get a trained professional to help you!!
    L1 - Active
    L2 - Neutral

    Powering with 110v -

    Screenshot_20200506-120511_Gallery.jpg

    Power on and Setup Driver before plugging anything into it.
    Press MOD to select PN000 then arrows up and down to select number and hold SET to enter that parameter.. set value required and hold SET to save.

    Here is the AASD settings you'll need to change:

    PN001 = 22 (motor code, requires restart)
    PN002 = 0 (control mode - voltage mode, requires restart) 02
    PN003 = 0 ( Servo enabled? - external)
    PN018 = 0 (Take the encoder output pulse AB phase logic - 0-1)
    PN051 = 1500 (Motor max RPM - see motor specs)
    PN053 = 18 (SigIn 2 port functional allocation -27 - 27)
    PN188 = 159 (Analog torque instruction smooth filtering time - 1-500ms)
    PN189 = 39 (Analog torque instruction gain 1-300 %/V)
    PN190 = 0 (Analog torque instruction offset adjustment -1.5v - 1.5v)
    PN191 = 1 (Simulation of torque command direction - try 0 first)
    PN198 = 250 (Torque control speed limit - 0-4500rpm)

    EDIT:
    PN190 = -100 (Torque command voltage offset - if you wheel slighty turns and wont hold center when powered up try adjusting this into the negative until it stops spinning)
    There maybe a slight torque voltage reading when idle making the motor spin slowly, this is how to counter that. You can calibrate this offset by running FN007. It may still need a slight offset but wont be as much as before. This can drift higher over time and may nee slight adjusting every now and then or recalibrating (zeroing)

    Next you'll need to wire up the STM32 discovery board. The motor bundles come with a DB25 connector so you can just wire up the pins to the connector using some cable and plug it in and away you go.. but i opted to design a board and use a db25 connector along with the 2 x db9 connectors for logitech wheel and shifter support. Yes the MMOS firmware and stm32 board allow you to plug in your logitech shifter and pedals allowing for a cheap USB adapter as well, all in the one package! Not too shabby.

    1.jpg

    Now you want to Plug in the Mini-USB to the stm32 board (this is the ST-Link programmer side). Install ST-Link Utility software onto your computer and then run it.
    Click connect to target
    Click full chip erase
    Click Program Verify and select MMOS Firmware (FFB2014-0.99.2.hex)
    Click start
    Done.

    Connect your AASD to your motor with both power and encoder cables. The power cables are usually labelled with ID tags so its straight forward. The encoder only fits in one spot on the AASD and then plug in the stm32 board using the db25 connector.

    Now plug in Micro-USB end to other side of stm32 board (you need them both connected to run)
    Now open MMOS Tool (MMosForceFeedback2014.exe)
    Ensure the connected symbol is lit up green.
    Click setup
    Enter the values below:

    3.png

    Now you can configure your MMOS Force feedback settings.. Save it to a profile name and when you want to use the settings load the config and save to the EEPROM. So everytime you want to change game profiles save it to the EEPROM to load those settings (well thats what i ahve been doing haha). Here's an example for Assetto Corsa Competizione:
    ACC MMOS.png

    Setup the wheel direction and FFB settings in the game and go for gold.

    Verdict: This was a cheap way to get into a Direct drive wheel without breaking the bank. It was suppose to tie me over until i can afford a Simucube controller and is doing its job nicely. A few things worth noticing are..

    1. It is using a 2500PPR (10000CPR) encoder. Most if not all the OSW guys run 10000PPR (40000CPR) minimum these days and say the fidelity is a huge upgrade over the stock encoder. Mige can supply the motor with this encoder installed but after factoring in their shipping and then getting an AASD-20/30A and paying for their shipping it was blowing out. My thoughts were if it didnt work and i had to go simucube then i would order a Biss-C or Sincos encoder when i did as they are in the Millions! (MMOS wont support these encoders) But if all went well then i could try and pick up a second hand 40000cpr encoder off someone who has upgraded.. there should be heaps around really.. otherwise Mige themselves can sell you the 40000 encoder for $89 usd delivered. I also would like to see the difference between the 2 encoders myself so now i will go ahead and order a higher res encoder and do a comparison video or something on the 2 :)

    2. Having problems getting Project Cars 2 to calibrate wheel.. it detects multiple inputs.. still working on that, seems alot of people have had this issue before
    EDIT: Got it working, my joystick was getting picked up as well. Unplugged it and all is good. :)

    3. Experiencing small humming vibrations when turning the wheel, like when the steering force is applied. Not a big deal but maybe once i set it up properly and they aren't sitting next to each other it may settle down. I've only bench tested so far. Or this could be totally normal feeling as i have never use a Direct drive wheel before haha.

    EDIT: The E-Stop is a normally closed circuit. So when the estop is pressed it will open the circuit. I believe in my video is got this bit wrong as i was off the top of my head talking haha.

    I have filmed the whole build along with a wireless button box and will post the video within the next week or so hopefully.

    Attached Files:

    • 2.jpg
      2.jpg
      File size:
      185.5 KB
      Views:
      3,237
    • 4.jpg
      4.jpg
      File size:
      135.7 KB
      Views:
      2,962
    • 6.jpg
      6.jpg
      File size:
      173 KB
      Views:
      2,649
    • Winner Winner x 9
    • Like Like x 7
    • Informative Informative x 3
    Last edited: Jan 26, 2021
  2. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    Build Video:



    Alternate Firmware to try:

    • Winner Winner x 1
    Last edited: Jan 23, 2021
  3. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,358
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,773Coins
    Ratings:
    +1,051 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    Ok, I see where the issue is by using the PWM from the stm32f4 to analog input for torque on the AASD drive... it chops the voltage, so its not completely smooth...

    You need to add a converter from PWM to clean analog voltage. Here is one I used in the past on older AMC controllers:

    https://www.digikey.com/product-det...2645CMS-L12-PBF/LTC2645CMS-L12-PBF-ND/4931884

    Notice this is 12bit resolution DAC, meaning it will work fine with 12bit resolution pwm from the stm32f4 (4096 values) to output really smooth voltage for the torque and eliminate any noise you see!

    IMG_20200505_225427.jpg


    There are a few pieces on breakout development board as well to easy hook it up :
    https://www.digikey.com/product-det...analog-devices/DC2197A-A/DC2197A-A-ND/5011089


    Thanks
    Thanos
    • Agree Agree x 1
    • Informative Informative x 1
    • Useful Useful x 1
    Last edited: May 6, 2020
  4. lromaniuk

    lromaniuk bny

    Joined:
    Mar 23, 2018
    Messages:
    27
    Occupation:
    Software Programmer
    Location:
    Poland
    Balance:
    366Coins
    Ratings:
    +19 / 0 / -0
    Also the voltage coming out of this DAC has to be scaled to +-10V. You can use opamp for that (you can use symetric DC-DC converter to obtain required +-10V power supply). I did it this way when driving this kind of drive with analog speed (same connection just different drive settings).


    Edit:

    I've searched a bit for DAC simillar to what Thanos linked (PWM interface) but with +-10 supply range - but no luck :(. Anyway I can lookup parts and schematics I've used to achieve 0-5V to +-10V - let me know if you're up to it.
    • Informative Informative x 2
    Last edited: May 6, 2020
  5. Hoantv

    Hoantv Active Member

    Joined:
    Jul 19, 2019
    Messages:
    117
    Balance:
    981Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    AC motor, Arduino
    I did with teco driver with pwm+/-. I used optocoupler convert 5v to 10v for torque control.
    It work smooth. My problem is if i dont have ground, It can not run because motor causes my pc crash (had EMI)
    Here is video i test on 1st floor with ground. It work smoothly.

    Now i move it to 2nd floor, ground cable is too long. My pc crash too much. No idea for that :(.
    • Like Like x 1
  6. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,936
    Location:
    London
    Balance:
    11,844Coins
    Ratings:
    +474 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    thanks for doing this guide, I already have a STM32F407 Dicovery board lying about somewhere

    so it seems to buzz a little at this time - this may be due to the encoder pulses or because the pwm output is not a true analogue value ?

    could you just put a small capactitor across the output ?

    is it possible to look at the signal using a scope ?
  7. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,358
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,773Coins
    Ratings:
    +1,051 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    Using capacitor adds latency if not very low value. Very low capacitor value is still choppy.

    Best way is with PWM to Analog DAC suggested above... easy as to just drop it between the stm32f4 and servo signal.
    • Agree Agree x 1
  8. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    You guys are awesome! This seems promising. So if i was to give the 5v DAC a go and see how it fairs then perhaps if i need in to be finer i could try the 10v solution. I have just gave it a good test in position, bolted to the rig, and it turns out the vibration noise is the actual quick release. It's amplifying the humm/buzz and making it sound and feel worse than it really is. Its only noticeable when you're wheel is forceless and going into force so like driving straight and initiating a slight turn will trigger it. most of the time i did not even notice it and you would hardly know if the quick release wasn't amplifying the vibrations and noise! Pretty damn happy with the outcome so far!

    Also a side note, Project Cars 2 is working fine now, turns out my hotas joystick was fluctuation values so it was picking up them and the wheel.. unplugged it and calibrated the wheel fine! although the force feedback profile needs a lot of work with that one! I have read this on forums everywhere though.. might try Cristiaans FFB profile for it. Feels weird.. Assetto Corsa and iRacing feel great out of the box with minor adjustments!
  9. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    Here's a quick video i whipped up of it in action and the noise i'm talking about!

    • Like Like x 4
  10. sedesa tatasa

    sedesa tatasa Member

    Joined:
    Jun 16, 2018
    Messages:
    60
    Balance:
    497Coins
    Ratings:
    +15 / 0 / -0
    10v is not necessary.
    You can adjust the gain of the driver-PN189.

    Does noise occur at the point where the left and right forces switch?
    • Like Like x 1
    • Informative Informative x 1
  11. DimitrisD

    DimitrisD New Member

    Joined:
    Apr 14, 2020
    Messages:
    1
    Balance:
    39Coins
    Ratings:
    +0 / 0 / -0
    Awesome build! I will be following your progress with a lot of interest. I was ready to order materials for a ffb wheel based on the MY1020 motor I've seen in other posts, but your project and your detailed guide is making me reconsider my options. Do you have any experience with commercial wheels in this price range, like the Fanatec or Thrustmaster belt driven wheelbases? How would you say it compares?
  12. wannabeaflyer2

    wannabeaflyer2 Well-Known Member

    Joined:
    Jun 12, 2015
    Messages:
    724
    Location:
    london uk
    Balance:
    8,310Coins
    Ratings:
    +953 / 7 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform, 6DOF
    Damm LOL @Peacemaker105 your putting another dent in my plastic , have made so many variants of DD FFB wheels using DC motors but all sidelined ,,, Now you drop this little cracker into the mix and im Placing order COVID or No Covid .. .. This Price range i can tolerate :) Gotta say Thanks for doing this hard work for all us and showing another option for entry level Simmers . Great Write up and informative easy enough to follow instructions .. in for a penny now in for £350.00 pounds :) Thanks again for pulling info together posting this Project ... :)
    • Funny Funny x 1
  13. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    Ahhh! Thats good to know. Yes well that's probably a better way to describe when the noise occurs. Just more noticeable when trying to keep the car straight as you are turning left and right a lot. But it does happen in other instances too.. which i think is when coming out of corners which would be changing direction.. i'll have to pay more attention to that next time now that you mention it. Would adjusting this gain help with that, if that's the case? or perhaps work on the filtering (PN188)? I'm going to Take off the quick release and see just how noticeable it is without it being amplified through that as it may not be as bad as i think.

    @wannabeaflyer2 I'm sorry mate! haha. Well i think this might be the best route as if you ever feel the need to upgrade to a Simucube controller you already have the right motor for the job at least ;) The information is a bit vague as i whipped it together over my morning toast but i will have a complete video from start to finish in more detail done soon hopefully. Should be done before before your order arrives at least :p
    • Like Like x 2
    • Useful Useful x 1
  14. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,358
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,773Coins
    Ratings:
    +1,051 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    Someone ought to make a PCB for this to be plug and play... no hustle with wiring (my nightmare lol ).

    But I know what to use for that extra 90st motor for now, not as powerful as 130st one, but will do for my weak hands... lol

    IMG_20200507_093545.jpg
    • Like Like x 1
    • Agree Agree x 1
    • Winner Winner x 1
    Last edited: May 7, 2020
  15. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    I did start mapping out a pcb then forgot all about it haha, never done one before so was working off tutorials, thought it would be a fun project. Then just solder on a db 25 connector and plug in the stm32 board and away you go.
  16. Peacemaker105

    Peacemaker105 Active Member Gold Contributor

    Joined:
    Jul 18, 2017
    Messages:
    197
    Location:
    Perth, Aus
    Balance:
    1,997Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    6DOF
    Hey mate, sorry i've never laid hands on any sort of Direct drive wheel or any other wheel other than logitech so have nothing else to compare it to unfortunately. But its a hell of a lot better than my g920/g27. that feels like steering a bucket of marbles compared to this haha
    • Like Like x 1
  17. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,358
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,773Coins
    Ratings:
    +1,051 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    • Winner Winner x 2
    • Friendly Friendly x 1
    Last edited: May 7, 2020
  18. sedesa tatasa

    sedesa tatasa Member

    Joined:
    Jun 16, 2018
    Messages:
    60
    Balance:
    497Coins
    Ratings:
    +15 / 0 / -0
    The low level of the STM32 output may not be 0v.
    You can adjust pn190.
    But I don't think using pwm directly is a good idea.
    Dac introduced by Thanos,
    or you should use a cr low pass filter.2000Ω 1uf I recommend.
    I think Pn188 can be lowered to 1ms or less.
    Dac looks like a good solution, but I think you need to test if it's perfectly smooth to human hands.
    If you can't solve the point where the force switches or other problems,
    This is a converter that produces +-analog that I made. converter.png
    • Informative Informative x 2
  19. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,358
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,773Coins
    Ratings:
    +1,051 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    Ok, all done... I'll be ordering a few pieces made to try on my servomotor...

    I added in the circuit pads to install the DAC to try if its better with clean signal.

    AASD-MMOS_TOP_sm.jpg
    • Like Like x 1
    • Winner Winner x 1
    • Friendly Friendly x 1
  20. wannabeaflyer2

    wannabeaflyer2 Well-Known Member

    Joined:
    Jun 12, 2015
    Messages:
    724
    Location:
    london uk
    Balance:
    8,310Coins
    Ratings:
    +953 / 7 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform, 6DOF
    Hi @Thanos jumping in here quick LOL so add my name to list of Potential Buyers for this PCB :) already have enough bits to Try this so Hell Yeah Count me in ..
    • Like Like x 1
    • Funny Funny x 1