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 From AtoZ : 2DOF arduino wiper playseat

Discussion in 'DIY Motion Simulator Projects' started by RacingMat, Aug 8, 2013.

  1. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,951
    Location:
    Marseille - FRANCE
    Balance:
    18,377Coins
    Ratings:
    +1,862 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    You have to follow these steps and tell me how it goes for you


    from the ressource post http://www.xsimulator.net/community/threads/arduino-code-for-4dof-and-1-dirpin-hbridge-board.4614/
  2. Lars

    Lars New Member SimAxe Beta Tester Gold Contributor

    Joined:
    Jul 28, 2015
    Messages:
    10
    Location:
    Germany
    Balance:
    281Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    ..want only say THX for your build and the very good description it makes the world much easier for a newcomer to learn the first steps walking.
    See ya

    Cheers
    Lars
    • Friendly Friendly x 1
  3. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,951
    Location:
    Marseille - FRANCE
    Balance:
    18,377Coins
    Ratings:
    +1,862 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    You're very welcome @Lars ;)

    I'm glad my tutorial helped you and I hope to see what you achieved :)
  4. kingh3

    kingh3 Member

    Joined:
    Sep 26, 2013
    Messages:
    42
    Balance:
    197Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, JRK, Motion platform
    Hi all, I saw this wiring and have a problem, I think pin A0,A1 on Arduino board are connect with pots for feedback position of 2 motor but in this picture (RacingMat's wiring), him connect them to A0,A1 of monster board, and I don't understand the function of pin A2, A3 here. Who know, Please hepl me. Thank you.

    Attached Files:

  5. Alexandre Kostik

    Alexandre Kostik Member

    Joined:
    Jul 2, 2014
    Messages:
    42
    Occupation:
    realtor
    Location:
    Brasil
    Balance:
    370Coins
    Ratings:
    +17 / 1 / -0
    My Motion Simulator:
    2DOF
    @kingh3
    see inside the Arduino code which port are attached pots ;);)
    • Like Like x 1
    • Agree Agree x 1
    • Useful Useful x 1
  6. kingh3

    kingh3 Member

    Joined:
    Sep 26, 2013
    Messages:
    42
    Balance:
    197Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, JRK, Motion platform
    int cspin[2] = {2, 3}; // CS: Current sense ANALOG input
    int enpin[2] = {0, 1}; // EN: Status of switches output (Analog pin)
    I saw, but I don't really understand. do you know why A0,A1 on arduino board connect to A0,A1 pin on monster board ?
  7. Alexandre Kostik

    Alexandre Kostik Member

    Joined:
    Jul 2, 2014
    Messages:
    42
    Occupation:
    realtor
    Location:
    Brasil
    Balance:
    370Coins
    Ratings:
    +17 / 1 / -0
    My Motion Simulator:
    2DOF
    you are using this code ? follows part of it.

    racing mat code 2 dof

    ////////////////////////////////////////////////////////////////////////////////
    #define motLeft 0
    #define motRight 1
    #define potL A5 "here is connected pot 1"
    "
    #define potR A4
    "here is connected pot 2"

    ////////////////////////////////////////////////////////////////////////////////
    // DECLARATIONS
    ////////////////////////////////////////////////////////////////////////////////
    /* VNH2SP30 pin definitions*/
    int inApin[2] = {
    7, 4}; // INA: Clockwise input
    int inBpin[2] = {
    8, 9}; // INB: Counter-clockwise input
    int pwmpin[2] = {
    5, 6}; // PWM input
    int cspin[2] = {
    2, 3}; // CS: Current sense ANALOG input
    int enpin[2] = {
    0, 1}; // EN: Status of switches output (Analog pin)
    int statpin = 13; //not explained by Sparkfun
    /* init position value*/
    int DataValueL=512; //middle position 0-1024
    int DataValueR=512; //middle position 0-1024

    ///////////////////////////////////////////////////////////////////////////////////////
    • Like Like x 1
    • Useful Useful x 1
  8. kingh3

    kingh3 Member

    Joined:
    Sep 26, 2013
    Messages:
    42
    Balance:
    197Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, JRK, Motion platform
    Yes, I use this code. I understand. thank you. ;)
    • Like Like x 1
  9. Alexandre Kostik

    Alexandre Kostik Member

    Joined:
    Jul 2, 2014
    Messages:
    42
    Occupation:
    realtor
    Location:
    Brasil
    Balance:
    370Coins
    Ratings:
    +17 / 1 / -0
    My Motion Simulator:
    2DOF
    OK!!! always look for the code .... I burned a ard and a bridge h , for not having attention in the code !!!!:grin:grin
    • Like Like x 2
  10. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    270Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello everyone, I'm starting to make 2dof simulator and now I'm at the stage of buying motors. Is this a good choice of motors?
    SWF VALEO NIDEC ITT 401.821 wiper motor, windscreen wiper motor, gear motor 24V DC, for MAN, NEOPLAN, type SWMG

    Thank you in advance
  11. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    270Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Here are the specifications of the motors
    SWF 401.821 wiper motor, windscreen wiper motor, gear motor 24V DC
    Torque: 16 Nm
    Speed: 30/40
    Power Consumption: A = 2.0, = 8.0 Nm
    Shaft: W142
    Series: SWMG
  12. noorbeast

    noorbeast VR - The Next Generation Staff Member Moderator

    Joined:
    Jul 13, 2014
    Messages:
    13,587
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    102,484Coins
    Ratings:
    +8,518 / 42 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    @mimakez please start your own project thread here: http://www.xsimulator.net/community/forums/diy-motion-simulator-projects.22/

    Post your questions there, the members here give freely of both their time and expertise.

    What you need to do first is post a brief description and preferably a picture of what you would like to build, as the design of a 2DOF can vary significantly and what motors best suit depends on what you have in mind to build.
  13. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,951
    Location:
    Marseille - FRANCE
    Balance:
    18,377Coins
    Ratings:
    +1,862 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    this is another reference than VALEO NIDEC ITT 404.458
    Several years ago, the 404.458 were cheap 35€ but their price increased and now they are discontinued...

    Could you please tell us what is the price?
    do you a have an URL to share?
  14. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    270Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I do not have enough posts to be able to put a link, the price is 258euro but I found used for 40euro each. Can I use Monster Moto Shield VNH2SP30 stepper motor driver module for high current 30A Arduino for this motors or I have to look for some of the 12v motors?
  15. kingh3

    kingh3 Member

    Joined:
    Sep 26, 2013
    Messages:
    42
    Balance:
    197Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, JRK, Motion platform
  16. Alexandre Kostik

    Alexandre Kostik Member

    Joined:
    Jul 2, 2014
    Messages:
    42
    Occupation:
    realtor
    Location:
    Brasil
    Balance:
    370Coins
    Ratings:
    +17 / 1 / -0
    My Motion Simulator:
    2DOF
    Hello. I used a plate with logic circuit with the 74HC08 Thanos . I made a pcb and connected between the ard and h bridge.

    follows electric scheme

    sorry my english (google translator)

    Attached Files:

  17. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,951
    Location:
    Marseille - FRANCE
    Balance:
    18,377Coins
    Ratings:
    +1,862 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Informative Informative x 3
    • Like Like x 1
  18. kingh3

    kingh3 Member

    Joined:
    Sep 26, 2013
    Messages:
    42
    Balance:
    197Coins
    Ratings:
    +10 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, JRK, Motion platform
  19. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,951
    Location:
    Marseille - FRANCE
    Balance:
    18,377Coins
    Ratings:
    +1,862 / 16 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello @mimakez!

    Glad to hear these good news! :)
    congrats!

    Setup is up to you: so if your motors don't get too hot, it should be fine!

    About the 10ms, sometimes the better is the worst (kind of traffic jam!)
    but if you experiment it fine, go for it!!
  20. mimakez

    mimakez Member

    Joined:
    Jun 18, 2015
    Messages:
    34
    Balance:
    270Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    To @RacingMat
    Thanks to the quick response, my motors are cold as ice :), after 1 hour of gameplay to be slightly warm.
    :thumbs
    • Like Like x 1