1. 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!
  2. 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
  3. 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.

Tutorial 2DOF ( in future + Yaw ), based on Arduino Motoshield Windshield, 3d printed elements

Discussion in 'DIY Motion Simulator Projects' started by Andrew M, May 23, 2017.

  1. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Hi,
    My name is Andrew. I work in a web programming industry, but privately I am a huge enthusiastic of all racing and flight simulators [ from 2 years in a VR ], and R/C hobby [ Traxxas, Trex, fuselages, etc ].

    My current RIG is as follows:
    - Flightseat [ Playseat ],
    - Logitech G29 wheel + shifter,
    - Thrustmaster HOTAS Warthog,
    - Thrustmaster 2 MFD
    - VR - Oculus Rift CV1

    IMG_1380.JPG

    Great for all sims [ preferred PC games: Project Cars, Assetto Corsa, DCS ],
    and from about 3 years I`m constantly thinking about having a motion platform, but can never afford a 3-4k$. Hopefully I found a XSimulator, and after many weeks of searching and reading informations, tutorials and posts - in this great forum - I am now planning to build ( or at least try ) my own RIG,

    The plan is to create a 2 DOF solution and if/when succeded, to add additional Yaw option.
    [ not expensive project - after calculations and first orders, should fit in a total of around 150$ - also trying to proof that it is possible and not as expensive as people may thought + a lot of own work ]

    Electronical parts:
    - Arduino Uno R3 clone ( 1 * 10$ )
    - MotoShield VNH2SP30 ( 2 * 15$ )
    - 10k Arduino potentiometer 300 ( 3 * 2$ )
    - used Bosch Windsheld motor 12V ( from VW Golf 3, 40W ) ( 3 * 7$ )
    - LED Power 350W 12V ( 2 * 10$ )

    Frame:
    - Based on a metal profiles, [ 20x20 / 30x20 / 60x30 ]
    - used Mercedes W203 kardan holder ( 7$ ),

    S/W:
    - 4DOF arduino code from the XS forum, Sim S/W + 3 plugins

    [ Later will add other pictures ]

    Till now I have some basic 3d projects [ mostly in Win10 3D builder ] of the RIG + couple of ABS elements ( 3D printed potentiometer holder for windshield ) + metal and electronical parts in house.

    Attached Files:

    • Like Like x 1
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,565
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    102,339Coins
    Ratings:
    +8,505 / 42 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Agree Agree x 2
  4. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Noorbeast - thank you for the tips ! I will definitelly look at the motors to check it`s ground [ didn`t know about this and would probably make a mess if + reversed - to motor shield ],
    also I made a little progress on the frame part - basically changed a 40mm profile instead of 60 mm for a driver wheel and pedals holder - to make less weighted,
    and till late yesterday evening I cut most of the profiles.
    Sharing my conception of potentiometer mount to motor [ already 3D printed from ABS - for a 19 pin on potentiometer - with 13MM nut of the motor, around 50mm long ],
    Will try to weld some things next couple of days... :)

    Attached Files:

    • Like Like x 1
  5. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    The Frame [ after melting / before polish and painting ] - looks promises and can`t wait to test this...
    I still can use a FlightSeat Left/Right/Wheel - holders, so all measurements made to fit the chair and peripherals, thats why I didn`t finally melted the front profile holder to the mainframe ( still need to reconsider which better to use, if FlightSeat then nothing to do, but has central profil for a wheel which makes impossible to mount the HOTAS in front... ),
    + 3D printed TT Hotas extension ( 10 cm ), but needs a DIN5 plugs / cable, or customised DIN 6 ( like PS2 ) cable to work ;)
    At the weekend hope to make some progress in electronical parts.

    Attached Files:

  6. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
  7. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    @RacingMat - can you please help me ? I don`t understand the order of motors in inAPin[] - since I`m planning to do a 3-4DOF and to use 2 x MotoMonster shield, which has 2 pins Dir HBridge, and according to tutorial I cannot use nor 2DOF, or 4DOF Arduino source code ( since 4 DOF is working on 1 pin solution only... ),

    "if you have a 2 pins Dir HBridge (like Sparkfun Motomonster),
    INA1 INB1 PWM1 -> motor #1 OUTA1, OUTB1
    INA2 INB2 PWM2 -> motor #2 OUTA2, OUTB2
    use the original code
    here in resources section"
    [ but works for a 2 DOF ]

    Logically I planned to take the original 2DOF for 2 pin Dir Hbridge code, and add additional 3(Yaw) and 4(Wind) motors - like shown on configuration from tutorial picture,
    [​IMG]
    but all 4 MOTORS in inAPin[] and PWN[] + are in ASC order [ so first variable in table is motor 0, second variable is motor 1, etc - so OK, but:

    /* VNH2SP30 pin definitions*/
    int inBpin[4] = {
    8, 9, 12, 13 }; // INB: Counter-clockwise input [ motor, 0,1,2,3 ]
    int pwmpin[4] = {
    5, 6, 3, 10}; // PWM input [ motor, 0,1,2,3 ]

    Q1: Cannot understand why inA[] has DESC order, [ like inA[0] is MOTOR 2 with pin 7, and inA[1] is MOTOR 1 with 4 pin... ( instead of ASC order like elsewhere: 4,7 ) ??
    int inApin[4] = {
    7, 4, 11, 2}; // INA: Clockwise input

    Q2: those are not used anywhere - so assume that are left just to be aligned to MM documentation ?
    int cspin[2] = {
    2, 3}; // CS: Current sense ANALOG input
    int enpin[2] = {
    0, 1}; // EN: Status of switches output (Analog pin)

    My 4DOF for 2 pin Dir Hbridge code [ most should work as is, but not really sure about this inA def... ] please check the attachement, due to limits to ino ext. I also changed to .txt to upload. arduino et 2 motomonster.png

    Attached Files:

  8. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    [​IMG][​IMG][​IMG]
    - Wipers motors had ground (-) in case ( like @Noorbeast said ) - need to cut the plate, solder new cable and seems to work ( tested on 12V LED bulb to frame ),
    Arduino ( changed to Uno - finally arrived, first S/W tests were done on Nano - also working ),
    - Cut plates for mounting the motors and drilled holes [ used M6 screws, but another mistake: I took M6 for push rod and is seems too soft, had tendency to flex and now need to upgrade to M10 ( new pull rods should arrive in couple of days, but also ordered a pipe 6-8mm to cover ),
    [​IMG][​IMG]
    - The motors [ BOSCH 40W from wipers - G3 / A3 ] do not have really huge power, but still manages to hold / move construction with me on it - if this won`t finally work, then probably will need an upgrade to 12V 200W motors 180 RPM - [ 50$ ] - http://www.magma.sklep.pl/product-pol-4521--Silnik-elektryczny-z-przekladnia-12V-200W-7716.html
    but [ 24A will definitelly destroy my clone of MM 16A... so requires something like Sabertooth x 30A - and motors are 3 * 50$ + 2 * 100$ and will be more cost than I expected ]
    - Another issue doing hardware configuration [ of potentiometer alignment ] it moved in circle and destroyed my 3d printed holders - now I made another from metal plate...
    Tried to print the base for electronics, but had a problem with extruder / filament ( another difficultie and now need time to fix my printer... ehhh ),
    I connected DOF via USB ( COM / serial ) and installed demo of SimTools 2 [ configured like in tutorial ].
    Now need to go throught all tutorial: https://www.xsimulator.net/simtools-quickstart/
    Last edited: May 29, 2017
  9. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino

    Attached Files:

    • Like Like x 1
    Last edited: Jun 6, 2017
  10. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,565
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    102,339Coins
    Ratings:
    +8,505 / 42 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Great to see you are making pretty rapid progress.

    I also have a compact rig and it does take a fair bit of power to drive it, so you likely will need the motor upgrade you have in mind.

    The rods do not need to be threaded all the way, you can weld a nut either end of a square or round steel tube to screw a threaded rod held by a lock nut, which is much stronger than threaded rod alone.

    The Quick Guide describes the settings for SimTools 1.3, but a critical difference for SimTools is that instead of axis defined like this <Axis1> it is now like this to designate grouping for a or b <Axis1a>

    With a 2DOF you won't need the b group, so ignore that.
  11. ferslash

    ferslash Active Member

    Joined:
    Feb 8, 2011
    Messages:
    481
    Balance:
    4,640Coins
    Ratings:
    +174 / 2 / -0
    man, i see that you are connecting your motors to your seat using a threaded rod, i use that for a sim and they got bended during the first ride... consider use something stronger

    fer
    • Like Like x 1
  12. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Yes, it was my mistake at the planning stage, so plans were changed and upgrade is pending.
    First option to check: 6-8mm pipe around this 6mm, and second: upgrade to M10 threaded rod with push ending M10 - now just waiting for a packages just to exchange the elements and try with bigger load - that I am not as concerned.
    Bigger problem is still with ground of the motor [ factory is from metal case like most of them, but different hardware and method than in tutorial - I looked at this BOSCH and found 2 thread - so cut the connection and solder new wire for them, but still after mounting and tests with different directions seems to block - and can see a short circuit... also hard to work without taking it completely apart - maybe something else inside the plate I didn`t found... I had enough of this mass situation, so even thinking about upgrading to a better motors, also with more power than 40W, now considering 200W 180RPM 12V with BTS7960 IBT-2 43A ]
    Some first test of movement [ not Serial movement, but using potentiometer - S/W seems to work with Arduino and MM ]
    Last edited: May 30, 2017
  13. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Another hard week of work on DOF project [ till late hours, there is always not enough time... ]
    What was made / accomplished:
    - New 2 Motors 200W ( 24A ), 15nM 180RPM upgraded [ some work with mounting, need to cut new plates for them - CHRL ],
    [​IMG]
    Need to build a 12MM shaft - I used a 12 x 20mm big screw, but after welding, drilling and mounting I noticed a small leeway... they were actually 11,95 so in next couple of days need to buy good one, and build another shaft.
    - New Potentiometer HALL BI 6127V1A180L.5FS 180 5V [ bought in USA, an wow - were delivered in 2 days to PL ! After some reading - they really have many advantages
    1) not risking that will break in rotation over 180 - those are magnetic 2) should be OK after a long time - due to no mechanical part,
    [​IMG]
    - New 2 * BTS7960 IBT-2 43A [ CHRL - if are really 43A then it is worth to try / also radiator is installed - I had seen them on @Saftari project and got inspired ]
    [​IMG]
    - New electrical cables/pin installation [ lost couple hours working with pins for arduino Uno R3, having strange behavior like all starts and is working for 5m when suddenly stops for no reason. I checked the cables many times without success, but also noticed it was problem in some pins inserted directly to arduino, some connection issue - so in the end the ultimate solution was migration of the main board to Arduino Nano with fast mounting plate - which finally solved my issue ! [ really good solution an more reliable ].
    [​IMG]
    Software: finally changed program to: SMC3 - Arduino 3DOF [ and is great ! ] https://www.xsimulator.net/communit...3dof-motor-driver-and-windows-utilities.4957/
    [ #define MODE2 - important ! ]
    installation accordingly to diagram:
    Wiring-2-Motors (2).jpg

    - M6 thread push rods with 6-8mm pipe around were OK - even on fast movements with sit, me and SimTools in "motion test" is holding very good ], so finally didn`t need to change to M10 solution [ but already bought all it needs and will have them just in case ],
    - Mounted RIG to FlightSeat [ PlaySeat uses 8mm screws, but fitting and drilling those holes was a disaster, actually high precision measurements was not as easy as I thought, but now are really tight ] ,
    - Successfully connected to PC and SimTools 2.1 [ wired to PC with some basing settings accordingly to tutorial, like KP, PWN, limits, etc ] - great tool ! to set and test in motion [ live ].
    - New paint job of the RIG [ actually completed with primer, and is in black mate = good looking in home, or at least I thinks so :) my fiancee didn`t completely agree, but what to say -for me is more like beautiful ]

    Attached Files:

    • Like Like x 3
    Last edited: Jun 9, 2017
  14. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    IMG_2536.JPG

    Attached Files:

    • Like Like x 2
  15. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    IMG_2537.JPG
    IMG_2535.JPG
    • Like Like x 1
  16. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    IMG_2539.JPG
    • Like Like x 2
    Last edited: Jun 6, 2017
  17. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    IMG_2540.JPG
    IMG_2541.JPG
    IMG_2542.JPG
    • Like Like x 2
    Last edited: Jun 6, 2017
  18. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    • Like Like x 1
  19. Andrew M

    Andrew M P_H_O_3_N_I_X

    Joined:
    May 11, 2017
    Messages:
    105
    Occupation:
    IT Chief Programmer / CTO
    Location:
    Warsaw, Poland
    Balance:
    543Coins
    Ratings:
    +95 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    potent_holder_BI.png
    +5% for my printer [ 6,35 -> 6,66 / 12 -> 12,25 ] project in Windows 3D builder -> can use as is, or work with it.

    Attached Files:

  20. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,565
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    102,339Coins
    Ratings:
    +8,505 / 42 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Great to see your rig in actin, well done :thumbs

    I would encourage you to get a race harness for your sim. It stops you from leaning forward and missing some of the motion effects.
    • Agree Agree x 2
  21. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,565
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    102,339Coins
    Ratings:
    +8,505 / 42 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Like Like x 1