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

Showroom Grigory's 6DOF #2 -- compact and no linear actuators, 220V servos

Discussion in 'DIY Motion Simulator Projects' started by Grigory, Mar 29, 2018.

  1. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    The servos are 4/12Nm and the planetary gearboxes have 20:1 reduction, so yes, 80 Nm nominal and 240 Nm peak.
  2. T R Para

    T R Para i make stuff up

    Joined:
    Oct 18, 2018
    Messages:
    385
    Occupation:
    Retired
    Location:
    Cincinnati, Oh
    Balance:
    2,436Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Do you have available any Arduino sketches that will work and can accept data from the game Engine? (I am not a programmer and always at the mercy of those that can:oops:)



    90st-m04025 Motor
    RS485, 4NM 1000W Servo Motor Drive
    LRF90(16-80-m6-100)-20, Ratio 20:1 Speed Reducer
    Last edited: Dec 19, 2018
  3. Krotar

    Krotar New Member

    Joined:
    Dec 15, 2018
    Messages:
    9
    Balance:
    150Coins
    Ratings:
    +21 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    Are you still using the same motors or have you looked at alternatives? They seem to have a really quick reaction

    600 dollar a motor is indeed a lot but if it is worth it ;)
  4. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF

    Yes, I’m using the same 220v servos. Everything works perfectly and I am absolutely satisfied with the current setup.
  5. Jürgen Schon

    Jürgen Schon Member

    Joined:
    Dec 6, 2018
    Messages:
    39
    Balance:
    57Coins
    Ratings:
    +25 / 0 / -0

    I am at the same Problem :)

    I love this setup. The Motors and the way to controll these Monsters.
    But I have no idea about the Arduino Sketch..

    It would be great if you share your Sketch tu use :)
    • Informative Informative x 1
  6. Xiansheng

    Xiansheng New Member

    Joined:
    Mar 5, 2017
    Messages:
    4
    Location:
    china
    Balance:
    - 355Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Hello, I like your project very much. Can you share your 220v servo? Thank you.
  7. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    What do you mean? I’ve provided the name of the servo in one of the posts above.
  8. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Hi! I have a VB.net app between simtools and Arduino, so Arduino sketch will not work by itself. I sure can share the sketch, but I’m now away from home on a business trip and only will be able to upload it upon my return.
    • Like Like x 1
    • Friendly Friendly x 1
  9. Xiansheng

    Xiansheng New Member

    Joined:
    Mar 5, 2017
    Messages:
    4
    Location:
    china
    Balance:
    - 355Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Can you share your arduino code and debugging software,Thank you
    • Informative Informative x 1
  10. Xiansheng

    Xiansheng New Member

    Joined:
    Mar 5, 2017
    Messages:
    4
    Location:
    china
    Balance:
    - 355Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Last edited by a moderator: Dec 24, 2018
  11. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Here is my Arduino sketch. It works for me, but there certainly may be bugs in it. Most probably there are bugs that may strike at a random moment. We are talking about powerful and potentially deadly machinery, so I do not recommend to use it if you do not know exactly what you are doing and take full responsibility.

    Attached Files:

    • Like Like x 3
    • Winner Winner x 1
  12. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    I can actually share the Vb.net code as well, but people wishing to do something with it will need to compile it themselves. I have a lot of parameters like names of COM ports or ranges of movement hard-coded for my setup.

    Please let me know if anyone needs that.
    • Like Like x 2
    • Useful Useful x 1
  13. T R Para

    T R Para i make stuff up

    Joined:
    Oct 18, 2018
    Messages:
    385
    Occupation:
    Retired
    Location:
    Cincinnati, Oh
    Balance:
    2,436Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Thank you very much.
    Yes I would like to see your Vb.net code also.
    I hope to learn a lot more about vb and the arduino mega board.
    I have the servo motor/controller/speed reducer from China that I have been experimenting with.
    I agree that these AC servo motors make a great platform
    And we all need to be cautious in building with them.
    Thank you again for sharing your work with us...
    • Like Like x 1
    Last edited: Dec 24, 2018
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Great contribution, I have added your handy work to the FAQs: https://www.xsimulator.net/community/faq/220v-servo-motor-code.320/
    • Like Like x 2
  15. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Here is the VB.net application.

    It expects that software and hardware connections are as follows:

    Simulated wind:

    Game Dash interface settings:
    upload_2018-12-25_9-43-26.png

    My fans are controlled by a Sabertooth 2x60 connected to COM15.

    Port name can be changed in the code (FMain.vb):
    upload_2018-12-25_9-45-27.png


    GSeat:

    upload_2018-12-25_9-46-58.png
    upload_2018-12-25_9-47-41.png

    My GSeat now only has two back flaps which are controlled by a single Kangaroo/Sabertooth at COM19.

    Software can control two more lower flaps:
    upload_2018-12-25_9-49-47.png

    6DOF:
    upload_2018-12-25_9-50-38.png

    upload_2018-12-25_9-51-7.png

    My Arduino Mega running the sketch is connected to COM12.

    This can be changed here:
    upload_2018-12-25_9-58-34.png


    My rig does not have limit switches and so I need to manually set lever origins when turning it on.

    upload_2018-12-25_10-2-37.png

    I use actuator control buttons to manually move the levers so that they are all horizontal and then click "Define origin all" button to record this position as origin. Then I click "Automatic 6DOF" to start listening for commands from SimTools.



    The app calculates correct lever angles using proper 6DOF model in M6DOF.vb file. For this to work, it is required to fill the geometrical parameters of the rig here:

    upload_2018-12-25_10-25-51.png

    (tl_dx is how far forward the traction loss rotation axis is shifted from the cockpit origin)

    and here:

    upload_2018-12-25_10-24-44.png

    The order in which parameters are listed is here:

    upload_2018-12-25_10-28-12.png

    X-Y-Z axes are defined like this:

    upload_2018-12-25_10-29-1.png

    Attached Files:

    • Like Like x 5
    • Winner Winner x 2
    Last edited: Dec 25, 2018
  16. prodigy

    prodigy Burning revs

    Joined:
    Oct 27, 2013
    Messages:
    459
    Location:
    Croatia
    Balance:
    6,698Coins
    Ratings:
    +399 / 4 / -0
    My Motion Simulator:
    2DOF, 3DOF, AC motor, SCN5, JRK
    This looks like rocket science to me :nerd
    • Funny Funny x 1
  17. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,619
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,396Coins
    Ratings:
    +3,480 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF

    Awesome work dude thanks for sharing :)
    • Agree Agree x 2
  18. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Here is some further information to explain how my Arduino is controlling the servos.

    I'm using QS7AA030M servo drivers that can be controlled by STEP and DIR signals.

    These drivers have a setting that allows adjusting by how much servos should move when a single STEP signal arrives. My setting is such that 180° arc corresponds to a total of 10000 STEP signals, or +/- 5000 STEP signals from horizontal lever position.

    CN1 port of the servo driver has four pins that are used for STEP/DIR communications:
    upload_2018-12-28_13-43-32.png

    PULSE- and SIGN- pins of all six servo drivers are either connected to Arduino GND pins or to the digital pins that are set to permanent LOW state. Here are such "low" pin numbers in my setup:

    upload_2018-12-28_13-45-45.png


    PULSE+ and SIGN+ pins of all servo drivers are connected to Arduino pin numbers like this:

    upload_2018-12-28_13-48-57.png

    I additionally have ESTOP switch connected between Arduino GND and this pin:

    upload_2018-12-28_13-51-3.png

    If switch is open, Arduino stops sending step signals to the drivers.

    Arduino stores lever positions as integers, with 5000 being the "neutral" position. I initially move all levers to make them horizontal and then tell Arduino that such pose is neutral.

    Arduino listens to its serial port for one of the following packet types:

    <tgt1,tgt2,tgt3,tgt4,tgt5,tgt6> -- where tgtN is the integer between 0 and 10000 specifying the target position for each of the six levers

    <S,0,0,0010> -- set delay between STEP signals to 10 microseconds. This delay determines the speed of movement

    <M,1,U,0025> - move motor 1 up by 25 STEP pulses

    <N,0,0,5000> - record that current position of all motors is 5000
    <N,2,0,5000> - record that current position of motor 2 is 5000

    <R,0,0,0000> - report back the motor positions
    <E,0,0,0000> - report back e-stop state

    Attached Files:

    • Informative Informative x 3
    • Like Like x 1
  19. Grigory

    Grigory Active Member Gold Contributor

    Joined:
    Jul 6, 2016
    Messages:
    202
    Location:
    Moscow
    Balance:
    212Coins
    Ratings:
    +304 / 1 / -0
    My Motion Simulator:
    3DOF, 6DOF

    Did you change anything in the code? If not and if your servo rotates +/- 45 deg without gearbox then, if you want to have +/- 90deg range with 20:1 gearbox, you just need to change your servo driver’s “electronic gear” settings so that it makes 2*20=40 servo steps per single pulse received from Arduino. This is determined by P12 setting on my servo driver, for example.

    Nothing needs to be changed in the code.
    • Informative Informative x 2
    • Like Like x 1
  20. T R Para

    T R Para i make stuff up

    Joined:
    Oct 18, 2018
    Messages:
    385
    Occupation:
    Retired
    Location:
    Cincinnati, Oh
    Balance:
    2,436Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    AC motor, 6DOF
    Thank you very much.
    That solved the problem.
    The servo is so fast !
    My plan is to buy a motor/drive/gearbox over several months until I acquire all 6.
    I will have the second one here in a week or two.
    Is there a proper way to set up just 2 servos for a 2DOF rig?
    That is what I have already built using wheelchair motors.
    I would like to replace those motors with the new servos.