Close
0%
0%

DIY MMOS ffb STM32 and servo drive servo motor

DIY MMOS ffb STM32 and servo drive servo motor force feedback wheel

Similar projects worth following
ASDD 30A or AASD 15A servo driver from China and MiGE servo motor 130ST-M10010 and STM32
I am using an ASDD 30A drive

My Facebook https://www.facebook.com/DIYRacingSimul/

Message on my Discord server:https://discord.gg/JHTkFwJ

TDD Micro-Direct drive wheel controller and STM32F407G-DISC1 choose one

Discovery kit STM32F407G-DISC1 for STM32F407VG MCUSTM32F4DISCOVERY)

STM32F4DISCOVERY(Buy connection)https://www.st.com/en/evaluation-tools/stm32f4discovery.html

STM32F4DISCOVERY All settings of the servo drive are as follows

Before plugging in anything, turn on the power and install the driver settings.
MiGE servo motor 130ST-M10010 set the motor model to 21
Each servo motor model is different according to the servo motor provider's instructions to set the number

PN001 = 21 (motor code, requires restart)5-10 seconds
PN002 = 0 (control mode - voltage mode, requires restart) 5-10 seconds
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) - 58? "command reverse" function
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 = 120 (Torque control speed limit - 0-4500rpm)

Restart according to the settings. If there is no automatic saving, the settings will be saved manually
Save settings manually FN001 Save all settings manually

Connect STM32, motor and encoder to the drive
Use setting 16.8khz, 10000CPR to run MMOS, use encoder index, simulate axis -3
Use the App to see if the wheels are spinning in the correct way.
PN191 = 0-1 to change the direction as needed; and
Switch encoder wiring (encoder A + <-> PA0) (encoder B + <-> PA12)
You cannot reverse the encoder in MMOS
PN188 = 120-150 (analog torque command smoothing filter time-0-500ms)

TDD Micro-Direct drive wheel controller is suitable for novice DIY to reduce wiring. Contains LTC2645CMS-L12#PBF chip
TDD Micro-Direct drive wheel controller designed by friend Thanos

TDD Micro-Direct Drive Wheel Controller Purchase Linkhttps://www.tindie.com/products/tronicgr/tdd-micro-direct-drive-wheel-controller/

TDD Micro-direct drive wheel controller servo driver all settings are as follows

PN002 = 0 (control mode-voltage mode, need to restart) 5-10 seconds
PN003 = 0 (enable servo function?-external)
PN018 = 0 (using encoder output pulse AB phase logic -0-1)
PN051 = 1500 (maximum RPM of the motor-see motor specifications)参见电动机规格)

PN053 = 18 (SigIn 2 port function assignment-27-27)-27-27 )

PN188 = 10 (analog torque command smoothing filter time-1-500ms)
PN189 = 100 (analog torque command gain 1-300%/V)
PN190 = -100 (analog torque command offset adjustment -1.5v-1.5v)
PN191 = 0 (analog torque command direction-first try 0)
PN198 = 500 (torque control limit-0-4500rpm)

AMC-AASD15A servo motion controller 6DOF seat running dynamic simulation purchase linkhttps://www.tindie.com/products/tronicgr/amc-aasd15a-servo-motion-controller/

YouTube video test
rfactor 2 and Assetto Corsa testing

FFB WheeMMOS software complete compressed packagel.zip

MMOS software complete compressed package

x-zip-compressed - 30.08 MB - 10/25/2020 at 18:37

Download

Adobe Portable Document Format - 4.22 MB - 12/06/2019 at 20:40

Preview
Download

x-zip-compressed - 6.11 MB - 12/06/2019 at 20:22

Download

View all 16 components

View project log

  • 1
    Detailed description of settings

    If you have any questions, please consult my email: huangjin169@gmail.com

    YouTube video test drive:https://www.youtube.com/channel/UCKOHWlPf_8TIHPGB0uo6Nrg/featured

    Motor and drive connection 1 First set up the servo drive. Do not connect MST32 to CN2. //////// First set the servo drive to 220V driver model is different from motor model

    I am using MiGE motor 130ST-M10010 set to 21 MiGE motor manual description or view ASD drive manual V6.0 description http://www.mege.cn/products_info.aspx?css=1&&id = 31

    After connecting the Stm32 cable, do not connect the servo drive. First set up the servo drive. After setting the MiGE motor 130ST-M10010 to 21 on Pn001, Turn off the power switch or unplug the power saving power for 2 seconds to restart the servo drive If you do not automatically save all settings, you need to manually save Servo starter code Fn001 needs to be held for 2-3 seconds to release, the next code will appear Continue to long press it to complete the code to save all settings After the drive restarts Pn02 is set to 0 voltage mode) Pn03 is set to 0 (external) to enable) Pn53 is set to 18 (Pn53) stands for Sigln2 port function), 18) is the "command reverse" function Value range name Pn190 -1500 ~ 1500mv is set to 0 Analog pointer instruction adjustment adjustment Pn191 manual 0-1 I set to 1 Analog scale direction Pn188 1-500ms I also set it to 159 Plasma simulation command

    The following notes

    Motor limit speed Pn198. Motor limit speed Pn198 0 ~ 4500 default value 2500 torque setting control function When the limit speed 120 is connected to the encoder and motor, the drive will be enabled internally. At this time, the motor rotates. Adjust the positive and negative offset according to the direction of motor rotation. In this case, please turn off the drive first. 2. MMOS MST32 has been connected to the CN2 control terminal of the driver, and then start the driver again

    About STM32 flash firmware Download tool brush firmware FFB2014-0.99.2.hex: https://www.st.com/en/development-tools/stsw-link004.html

    .MMOS enters the history download adverbial:https://forum.virtualracing.org/showthread.php/92420

    https://forum.virtualracing.org/showthread.php/92420

    Download MMOS unzip Open MMosForceFeedback2014.exe and set to MMOS directory Set the encoder to 10000 Please refer to the picture for more settings

    Edit firmware video

    Observe the rotation direction of the motor, and then adjust the command replacement again. In this step, it is best to enable it externally to prevent wiring errors and make the motor rotate randomly . Pn191: When receiving positive and negative command signals, please adjust the rotation direction of the motor. "0: positive (CCW), negative (CW) "1: Forward and backward (CCW), forward and backward (CW) If the servo motor rotates to the right or left, please switch PA0 and PA1 on the STM32 board Or change the code to 1 or 0 in the servo drive PN191 The two methods are the same The normally connected encoder A + is connected to PA0, and the encoder B + is connected to PA1. If the rotation direction of the steering wheel in the game matches the actual adjustment at this time, the wiring can be adjusted. At the same time, adjust the Pn191 settings. The reverse encoder cannot be set on MMOS. You can set replacements in the game. ..Pn188: High frequency adjustment setting noise The larger the value, the slower the input analog response speed and the better the effect of reducing high-frequency noise interference. The smaller the setting, the faster the response speed, but the interference noise will become larger. Variable value, the faster the speed. It is more appropriate to set the speed to 120 ~ 150. Then, when the game is controlled by the vehicle, the speed of the motor can be accelerated in 0.1 seconds. Adverbial clause: The electric motor will fly to the ground

    Message on my Discord server https://discord.gg/JHTkFwJ

    Z1 1 type expansion sleeve TLK100 expansion sleeve KTR250 expansion sleeve RCK80 expansion sleeve STK110 expansion coupling sleeve

    Servo motor 130ST-M10010 buy  Z1 1 22X32

    Complete package of software and instructions

    https://drive.google.com/open?id=1szklvVdJ3R_UgiG6nuSoo5OjDvgcZej2

    English manual

    https://docplayer.net/62361148-Technical-manual-for-aasd-series-servo-drive.html

  • 2
    New generation simulator

    下一个DIY直接驾驶模拟器
    关于赛车模拟爱好者请
    关注我的YouTube频道
    https://www.youtube.com/channel/UCKOHWlPf_8TIHPGB0uo6Nrg/videos?view_as=subscriber

View all instructions

Enjoy this project?

Share

Discussions

hotdog295 wrote 09/21/2020 at 06:02 point

Can I use another servomotor drive?

  Are you sure? yes | no

paytufo wrote 06/18/2020 at 21:54 point

Can I use the AASD 20A? I found a bundle.

  Are you sure? yes | no

Chris Murray wrote 04/12/2020 at 06:05 point

Hi there! My motor and driver should be here this week hopefully and i have a couple questions for you as the google translate isn't 100% :)

is PN053 = 18? correct?

Also PN198 = 120, after testing direction do you turn this speed up a bit? i see people usually talk about 220-330rpm when discussing Small and Big mige capabilities at max torque.

Thankyou for your time and i will let you know if i get it working :)

  Are you sure? yes | no

Jack wrote 04/13/2020 at 01:39 point

Hi Chris, ive been going over this build a few times. Lets just say the chinese to english conversion leaves room to interpration but i think i got it figured out. Ive been slowly making a list of parts i plan to order to get going on building this, as well as downloading all the necessary files. The german website he links to seems like it requires registration, but i found the 2 important MMos zip files just by searching the net for the file names. Someone uploaded them to a google drive on a xsimulator.net post. If you cant find them, i can upload them for you.

For the build im planning on ordering a 130ST-M15015 motor with AASD-30A controller. This motor will put out a max of 15nm.. should give me a good workout lol

Also Google AASD-30A manual, and you should be able to find an english/ish translated manual. its not the best, but it gets the parameter settings more context.

Please keep myself and others updated on your success. Ive been doing a fair bit of research on these "STM32F407G-DISC1" powered sim board, and most of the info online relates to folks just using the servo motor with a universal standalone servo drive (simucube)/Ioni setups.. but i think tying the motor with a proper servo drive designed for its peak power outputs would be most beneficial..

Im a automation engineer and spend alot of my time working with Mitsubishi Mr-J2,Mr-J3 drives and setups. I really wanted to use one of them as i know the settings and setup software, but a 1.5+KW setup will cost me more then 4x this AASD-30A setup.. Plus it would be a waste to use such a good servo for this application, most "automation high end" drive/motor combos have significantly higher performance parameters then these AASD setups.. The mitsubishi's for example are rated for max RPM/s of 4000-6000... which is never needed in these operating parameters for a sim motor. lol

When i dig in, im tempted to do a detailed video overview so folks will have a better ideal of how this all comes together and "works"

Also regarding the "PN053 = 18?" yes he must of made a typo.. it should be 18 and not 58.. In the manual, "PN053" has multiple parameter options, option 18 is described as "CINV - Instrucitons in reverse... "The speed or torque control mode, take the speed or torque of the instruction"

Basically its reading the DIR output from the STM32 and telling it to invert the torque..  Kinda crude description, but thats how im interpreting it.

  Are you sure? yes | no

Chris Murray wrote 04/13/2020 at 10:01 point

Cheers for the reply mate! i have ordered the 130st-10015 (Not genuine Mige) with AASD-30A too ;) Cheaper and more RPM and torque! It's a no brainer. I have also been going through the manual, hence why i asked as 58 was out of range for that parameter. I'm just structuring all the info in a different document so its easier for me to understand and for when i put it up on Xsimulator etc.

I am also going to be doing a tutorial video of the whole process as this is an excellent entry price for a Mige FFB setup. I just got a 2500PPR (10000CPR) encoder for now and will try source a second hand 10000PPR encoder off someone in the forums as most of them have gone Biss-c or SinCos so they would just have them laying around doing nothing.. Worst case i can order from Mige for $89us delivered. But i want to get it up and running first and see how it feels. Over the span of the next year i will save up for a Simucube setup to run the better encoders and use their software as its meant to be a step above MMOS these days in terms of compatibility and tweaking options. Either way it will be a fun project and it will kick my G920's butt for the time being haha. 

If i have some troubles, I might be able to ask Thanos for some help as hes had a lot to do the the AASD drives since making his new 6dof controller for them and he seems interested but doesn't have the time to try it out. See how i get on but.

I will definitely keep yous posted on how it goes and post videos when its done. Hoping all my bits are here by the end of the week, maybe early next week for the motor.

  Are you sure? yes | no

karl wrote 04/27/2020 at 04:58 point

Hi Chris. Did you receive your motor and driver yet?

What did you pay and who are the suppliers? Some of the links posted here don't take you anywhere relevant.

Thanks,

Karl

  Are you sure? yes | no

Chris Murray wrote 04/27/2020 at 05:13 point

Hi mate, Motor was held up in Singapore for 10 days by DHL due to Covid19 madness i guess. It left this morning finally! So hopefully a couple days more to wait. Ordered from here: https://www.aliexpress.com/item/32868662195.html ($360US delivered to Australia) I have bought 6 motors from them before, good seller and products, might be cheaper from different seller depending where you're located...

As for the STM32 i used RS Components: https://au.rs-online.com/web/p/processor-microcontroller-development-kits/9107951/ its also couple days away as they said they had stock but ordered it in from overseas.. arrgh i hate waiting! lol. 

I'll be getting an upgraded encoder from Mige: https://hzmgdj.en.alibaba.com/company_profile.html?spm=a2700.galleryofferlist.0.0.1c0be93132Nive#top-nav-bar ($89US delivered) If all goes to plan, that is..

Cheers, Chris

  Are you sure? yes | no

karl wrote 04/27/2020 at 08:33 point

Thanks for your reply, Chris. From my research, the parts you've mentioned are the main parts, but you still need a power supply, case, adaptors, etc., right?

I'm referring to something like this as a reference: 

https://docs.google.com/document/u/1/d/e/2PACX-1vTQy16ufGB-Z_NdL0iEF7sJSbKFNdaM32F0TgrpiNuMok7VcSE8OHXncI_AoJOjg_rjSA6EBWzJ9FXk/pub

  Are you sure? yes | no

Chris Murray wrote 04/27/2020 at 08:47 point

The AASD Driver takes mains power 220v (can be used with 110v search thanos AASD on youtube and look through his channel) So you wire up a plug from mains power, connect it to the driver. the motor plugs into the driver. The driver comes with a db25 connector, you wire up those pins from the stm32 board to the correct pins on the db25 connector and plug it into the AASD driver. then usb to the computer from the stm32 and you're done! Run MMOS and set it up. 

You are referring to a Simucube setup which uses DC power so needs external power supplies and expensive ioni drivers etc. As for a case i have 6 AASD already mounted into a server cabinet so adding one more is easy for me.. you could mount it to anything really.. the wall.. piece of wood.. or make your own enclosure..

  Are you sure? yes | no

karl wrote 04/27/2020 at 09:04 point

Thanks Chris. So what you're talking about is less than US$500 for a setup that works similarly to a Simucube setup? That sounds amazing. Looking forward to your review.

  Are you sure? yes | no

karl wrote 05/04/2020 at 19:00 point

Hi Chris. Did you receive your motor yet? Are you up and running?

  Are you sure? yes | no

paytufo wrote 04/03/2020 at 11:01 point

Could be used another shifters and pedals? Any code is benn used or "simple" connect and used it as the diagram?

  Are you sure? yes | no

Ken Yap wrote 12/06/2019 at 20:31 point

Your description would be much more readable if you formatted it better, for example used tables and lists.

  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