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

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:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 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.
    • Like Like x 3
    • Informative Informative x 1
  2. BiT0

    BiT0 Member

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

    PeterW alias Wickie

    Joined:
    Oct 21, 2018
    Messages:
    199
    Occupation:
    Dipl. Ing. Mb (FH)
    Location:
    Germany
    Balance:
    1,608Coins
    Ratings:
    +360 / 3 / -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
    • Like Like x 1
  4. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 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.
  5. Will974

    Will974 Active Member

    Joined:
    Jan 11, 2020
    Messages:
    122
    Occupation:
    Industrial Ingeenering Teacher
    Location:
    Reunion Island
    Balance:
    875Coins
    Ratings:
    +112 / 1 / -0
    My Motion Simulator:
    6DOF
    • Like Like x 1
  6. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    Finally. Time for an update! This project has not been prioritized a lot so it has come together really slowly. I now have the basic upper and lower frame ready for initial tests and currently working on getting the second linear actuator built. Earlier in this project (late 2019 and early 2020) I had most of the work on the frame done and the first actuator built. Also I have put together the power supply for the motors, using three 12V 1200W HP server power supplies. I did some simple tests as posted in 2019 with the brushless motors, but that was with a different power supply. What happened when testing with the 36V supply (3 x 12V) was a ground loop via the USB cable of my computer. That put the project on hold for months and left me in need for replacing the computer. Going back to the project this year, I solved the ground loop issue using an USB-isolator. Turns out that the Odrive board was fried in the ground loop incident, so I had to order a new one (expensive!). So far putting together the actuators has proved to be the most difficult task in this project. Still some bits and pieces for the limit switches and possibly some rubber end-stop parts will be added but it is now all starting to come together. Enclosed some photos, enjoy, happy building and I can post some details when I have time
    . 20210717_204354.jpg Actuator 1 bottom end motor and mount.jpg Actuator 1 glider bearing top end.jpg Actuator 1 motor with sensor assy.jpg Actuator 1 top end joint.jpg Actuator 2 ball screw assy.jpg Actuator 2 ballscrew mount.jpg Actuator 2 bottom end in progress.jpg Actuator 2 top end.jpg Actuator 2 top internal with bushing.jpg Frame rear top view.jpg Frame top view.jpg
    • Like Like x 2
    Last edited: Jul 26, 2022
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,435
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,440Coins
    Ratings:
    +10,730 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Just checking how progress is going on the second actuator?
  8. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    Hello! After a long break (fried mainboard and Odrive due to ground loop, COVID, work and kids), finally some vacation and time off, so I am working with the project (with one of my sons as a helping hand). :)
    Actuators:
    I have just about completed both actuators (some pinching in the movement on one of them, so need to do some re-alignment). I recently made some brackets for the limit switches, so these are now mounted and ready for testing. I have also replaced the end plates on the actuator which was originally 3D-printed, with new aluminium ones.

    Wiring for the actuators will then be:
    1. Motor power cables to the Odrive control unit Output power section
    2. Encoder signal cable to the Odrive control unit encoder input I/Os
    3. Limit switch cables to the Odrive control unit GPIOs

    Odrive and motor control:
    I purchased a new Odrive board after I fried the first one with a ground loop (floating DC supplies and grounding via USB without isolator). I purchased an USB isolator(! Use between Odrive and PC!) so when I got a replacement board, I could connect without problems. I struggled a lot with the replacement card as this would just trip on motor current limit. After a lot of trial and error, and after flashing firmware, I did another mistake, forgetting to reconnect the USB isolator, and fried board count = 2 (!!). Thinking, "this is it, I will not finish this project", I contacted OdriveRobotics explaining the situation. Due to my effort and details shared with OdriveRobotics support with configuring the second board, an agreement was made to send a replacement board for the cost of shipping & taxes only :) I made also a backup plan this time and ordered a "MakerBase" Odrive 3.6 clone. I have tested now running motors on both original and clone board, works fine.

    Basic steps for configuring has already more or less been documented above. I could add a note on the limit switches, you will find the documentation here to set them up:
    https://docs.odriverobotics.com/v/latest/endstops.html

    Power supplies and control cabinet:
    I added relays for emergency stop button to cut 230V power. The relay coils are triggered with 24VDC via the stop button. Connecting this now. I did some clean-up on 230V supply to the PSUs. I was looking for a decent way to connect signal wires between equipment and at the same time easily disconnect. I chose RJ45 wall sockets and CAT5 cabling. Using the pairs I need and keeping other pairs as spare.

    Some pictures attached showing some of the work. More to come, soon I hope.

    2022-07-26_22-33-40 - Odrive with isolator.png 20220726_Actuator 2 assembled.jpg 20220726_Control box content 2.jpg 20220726_Control box front panel.jpg
    • Like Like x 1
  9. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,435
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,440Coins
    Ratings:
    +10,730 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Sad about the drive but at least you are moving forward.

    Any further progress in getting the rig assembled, ready for testing?
  10. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    Summer holidays and "busy" with vacation, but during holidays I managed to find a stronger joint for the coupling between lower frame and upper frame, so will do some welding shortly and use that instead of the old steering wheel coupling joint. I did the configuration on the Odrive for the limit switches and initial test, but I need to check why the logic is not reading the input correctly. I think it is correct in config and I measured the voltage across pull-up circuit when toggling the switches, so should be OK. On the side line I tested a full motion sim with the kids,https://newtonflightacademy.com/, More to come soon on the build.
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,435
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,440Coins
    Ratings:
    +10,730 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Just checking if your recent experience spurred you on to completing your rig?
  12. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    Hello, working as much as I can but I am quite busy these days. Progress made on the actuator. I fixed a wiring issue on the limit switches and using normally closed contacts with pull-up resistors on the Odrive GPIOs. Other than that the progress has been mainly in the configuration of the actuators. Finally I have started adjusting tuning parameters as a rough basis before I connect the actuators to the rig. The manual way using the iPython console in the Odrivetool is way too time consuming. I modified a Python script file that was based on configuration of hoverboard brushless motors and adapted to my 225kV brushless motors with the AMT102-V encoders (this process took hours..). See attachment for initial version. I encountered an issue with the motor wiring, as the ODrive control signals creates a lot of EMI/noise. Thus with 1M length on motor wires, even with making braided wires I need to add ferrite cores just before the motor to try to clean up the signal. The EMI causes issues with the calibration process which shall run during start-up. The Odrive gives motor phase estimate errors and the calibration fails. Sometimes it works, sometimes it does not. This slows down progress. I ordered ferrite ring cores (40x22x9mm) from a webshop in Denmark, Magnordic.com , and they will arrive soon. I hope to get some more work done on the rig also but the actuators have by far been the most complex issue so far and the main issue really. I did a check on the rig with static load (my son :) ) and I am modifying to move CG a bit as it was a bit off. I will continue with connecting the actuators to SimTools and set the initial actuator travel amount as per the Zennix setup which used 1605 ball screw as well + 19 bit output = 2^19 (524288) pulses of travel = 32cm travel. We will see if this is OK or not. I will download the FlyPT mover SW also but not 100% sure how this will be used. Another issue to sort out is the emergency stop button which was made with relays, but I need to swap the relays to 24VDC as the coils were for 250VAC.

    Attached Files:

    Last edited: Sep 6, 2022
  13. cliojohn

    cliojohn New Member

    Joined:
    Aug 14, 2019
    Messages:
    9
    Occupation:
    Automation engineer
    Location:
    Norway
    Balance:
    94Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Motion platform
    Quick update, I moved the Centre of Gravity on the rig 10cm forward (a bit of welding..) and now the rig balances much better. I am working on noise reduction (EMI) on the Odrive cabling, and added the ferrite core on the motor wires plus braided the motor wiring. Seems to work better. I now run the motor wires twice around the ferrite core which seems to be better. Still a bit of noise probably on the encoder wiring that causes the index search to fail sometimes on the encoder. To be investigated/improved. Moving further now with testing with the SimTools and FlyPTMover.
    • Like Like x 1
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,435
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,440Coins
    Ratings:
    +10,730 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    So can you show your completed rig, now that you are testing?

    When you get a spare moment a video of your rig in action would be great.