1. Hundreds of coffees, endless nights of debugging and coding, and countless feedback by our beta testers led to this new major release. SimTools 2.4 is probably the version with the most upgrades and improvements in a single release ever. Look at everything Dustin has included:
    SimTools 2.4 all features.
    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 Download Package Now!
  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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

2DOF DIY simulator - Brushless by cliojohn

Discussion in 'DIY Motion Simulator Projects' started by cliojohn, Aug 28, 2019.

  1. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    4
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    40Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    I have finally started my project which is based on @Zennix design with brushless actuators. The goal and motivation is to use the motion simulator for flightsim, although I can see that racing is fun also. I have been purchasing 70% of the parts on the actuators and currently I am doing initial testing using the Odrive motor controller (2 channels). ZennixFramedwg.png
    • Motors: Dualsky EC 225KV
    • Actuator screws: ordered, more details to come
    • Encoders: AMT102-V
    • Power supply: 36V, 3 x 12V HP server supplies (still waiting for them to arrive)
    • Control cabinet: Old gutted PC mini tower to fit the server supplies, Odrive, emergency stop relay etc.
    • Frame and seat: Trying to source a cheap Playseat to modify + I have 30x30 steel tube for welding/cutting.
    • Design is still in progress, using Fusion360 for CAD.
    I am using a small ProFab 3D mini 3D printer to print parts. Already I have received and preliminary configured the Odrive motor controller as well as printed a base for mounting this into the mini tower.

    Starting off a bit backwards with focus on the brushless motors and control setup:

    First motor wired up and added a dummy 3D printed mounting plate for the AMT102-V mounting screws.

    AMT102-V Odrive pinout.png
    AMT102-V pins.png
    • Python 3.7.1 installed and added to PATH
    • Python -m Pip install odrive (due to admin rights on windows 10 run cmd as admin)

      The ZADIG TOOL http://zadig.akeo.ie/needs to be installed to ensure the USB drivers in windows is using the correct one for Odrive (here we can replace the existing interface drivers and set something which actually works..):
    • Use the Zadig utility to set ODrive driver to libusb-win32 (INTERFACE 2) Zadig config1.png
    • Check ‘List All Devices’ from the options menu, and select ‘ODrive 3.x Native Interface (Interface 2)’. With that selected in the device list choose ‘libusb-win32’ from the target driver list and then press the large ‘install driver’ button.


    For INTERFACE 0 - To be able to communicate to the Odrive via USB COM3; replace the winusb driver on Interface 0 with the USB serial CDC driver Zadig config2.png


    Run "odrivetool" and make sure it connects (WAIT 2 minutes!)
    It will use Interface 2 to connect there. From CMD: odrivetool + enter
    odriveconfig1.png


    If verboseoutput is required for more info:
    Odrivetool -v
    odriveconfig2.png


    Number of Pole pairs = 7 from default, this is OK for 14 magnets/2 = 7 as for the Dualsky 225kv motor.
    odriveconfig3.png

    The motor encoder configuration can be changed if required:

    From datasheet AMT102-v:
    Resolution selected via adjustable DIP switch, pre-set to 2048 PPR. All resolutions are listed as pre-quadrature, meaning the final number of counts is PPR x 4, so in odrive:

    odriveconfig4.png

    Again; no change is required, the encoder max steps will be 8192 (PPR x 4) so it is OK!

    Let us try to check on the position control
    odriveconfig5.png
    Result: Motor spins in a calibration setup after a beeping sound.
    This procedure first measures your motor’s electrical properties (namely phase resistance and phase inductance) and then the offset between the motor’s electrical phase and the encoder position.


    odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL Enter. From now on the ODrive will try to hold the motor’s position. If you try to turn it by hand, it will fight you gently. That is unless you bump up odrv0.axis0.motor.config.current_lim, in which case it will fight you more fiercely. If the motor begins to vibrate either immediately or after being disturbed you will need to lower the controller gains.


    SimTools:
    - Installed Live For Speed
    - Ran GameManager, patched up LiveForSpeed
    - Connected to COM3 using Interface 0 and the USB Serial CDC.
    SimTools1.png
    Select game profile, patch the game.



    Game Engine1.png

    Assign some axis setup. Testing only motor for Roll movement first.

    GameEngine2.png
    Setup communication.

    More exiting news to come. The motor works at least! Running only 15V for test purposes, but working OK.
    • Informative Informative x 1
  2. BiT0

    BiT0 Member

    Joined:
    Mar 13, 2019
    Messages:
    31
    Balance:
    177Coins
    Ratings:
    +4 / 0 / -0
    Nice! ODrive is a very interesting platform for BLDC dev.
    Following...
  3. PeterW

    PeterW alias Wickie

    Joined:
    Oct 21, 2018
    Messages:
    18
    Occupation:
    Dipl. Ing. Mb (FH)
    Location:
    Germany
    Balance:
    184Coins
    Ratings:
    +49 / 0 / -0
    My Motion Simulator:
    6DOF
    Hi cliojohn!
    wellcome at xsimulator!
    I am also working on a simulator driven by Odrive. Maybe you have already seen my thread here on the board (https://www.xsimulator.net/community/threads/wickie´s-6dof-sim.13660/) or at the Odrive-community?
    You did a very good dokumentation of how to set up a Odrive-System!! I think it will be very helpful for people that will use Odrive in the future.
    I wish you all the best for you project and please keep us up to date - thanks.
    regards Wickie
  4. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    4
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    40Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    Thanks! I had not noticed the article before, but I have checked it out now. Great, and I will probably need some details on actuator design. I am also planning for a 1605 ball screw type actuator with BK12/BF12. I have ordered some parts but not all. I will need to post a topic here on the actuator build to summarize design vs. questions. All CAD file details on actuators are much appreciated.