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

DIY swing gate motor 12v arduino uno LN298N

Discussion in 'DIY Motion Simulator Projects' started by Takumivs, Feb 12, 2019.

  1. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Hi All

    I've registered with Xsim to learn the art of Sim motion, as Im a fabricator , mechanical, electronics and software / coding engineer as these are my trade work and talent.

    My current project and goal to the sim world is to produce a class brand product in my country. my sim racing career has driven me more to create my concept of a sim system that affordable and to involve more participates to the sim world.

    looking forward to learning from all great minds and talented work.

    Lets dive down the rabbit hole.
    • Like Like x 1
  2. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    This was my first design I made, this will be a static rig that will be upgraded to the 2dof gate motor system. The seat base will be interchangeable with regards building another base with the motors integrated under the seat.

    Attached Files:

  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,056
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,034Coins
    Ratings:
    +10,885 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Can I just clarify, are you planning on building a prototype that you then hope to market and sell?
  4. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
  5. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Fully setup, with a pc system spec i5 4560k 16gig ram with R9 390x

    The feel of positioning feels perfect just need to relocate my shifter and make a cup holder. :thumbs

    Attached Files:

  6. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Arduino and motor driver testing, before starting that gave motor .manage to pick up this e36 cluster for next to nothing. Will get a basic understanding of arduino before motor setup

    Attached Files:

    • Like Like x 1
  7. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    The gate motors tear down to the motor heads and bracket.

    Finally managed to get the bmw cluster and arduino board to sync with pcars2

    Attached Files:

    • Like Like x 1
  8. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Recently setup the arduino with monster motor driver, with the two motors.

    I couldn't get any voltage higher than 2.6-3.3v on this unit.

    Then I went back to the drawing board, to find another motor driver unit instead of this monster motor unit. Thinking it can carry 30A operation

    Attached Files:

  9. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Some mods done to the gate motor brackets, by welding supports for the pots. Door hedge plates welded on to a nut.

    Working with what I have laying around at home.

    Attached Files:

  10. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Link to the Bmw E36 cluster that linked to arduino and synced with project cars 2 using simhub


  11. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    I recently pop the caps on the monster motor driver, me a idiot wired the power wrong causing the caps to pop.

    I went to purchase AZL Dual motor shield 8a 22v, got its setup and worked right away. The problem Im having is the one motor changes direction, but the obtain the motor doesn't it's just turns in one direction

    In Smc utili motor 1 changes direction, motor 2 run one direction. clueless to what could be the problem

    Attached Files:

  12. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    HI everyone

    Here is the link of the setup



    I've managed to get the SMC3utils software to run the motors, I see the one motor turns in different directions but the other motor continues in the same direction.

    Could anyone tell me what could be wrong or is it right the way it's setup.

    Kind regards to all.
  13. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Dual Channel H-Bridge Motor Shield

    https://www.elecrow.com/wiki/index....ld_But_Not_Driver_IC_Solution_Such_As_L298.3F

    I noticed the pin config of smc3 and XPID code differs.

    SMC3

    Arduino UNO Pinouts Used
    //
    // 9 - Motor 1 PWM
    // 10 - Motor 2 PWM
    // 11 - Motor 3 PWM
    // 2 - Motor 1 H-Bridge ENA
    // 3 - Motor 1 H-Bridge ENB
    // 4 - Motor 2 H-Bridge ENA
    // 5 - Motor 2 H-Bridge ENB
    // 6 - Motor 3 H-Bridge ENA
    // 7 - Motor 3 H-Bridge ENB
    // A0 - Motor 1 Feedback
    // A1 - Motor 2 Feedback
    // A2 - Motor 3 Feedback
    // A5 - Motion scaler pot input


    XPID

    Pin out of arduino for H-Bridge

    Pin 10 - PWM1 - Speed for Motor 1.
    Pin 9 - PWM2 - Speed for Motor 2.
    Pin 2 - INA1 - motor 1 turn
    Pin 3 - INB1 - motor 1 turn
    Pin 4 - INB1 - motor 2 turn
    Pin 5 - INB2 - motor 2 turn

    Analog Pins

    Pin A0 - input of feedback positioning from motor 1
    Pin A1 - input of feedback positioning from motor 2

    I havent tested the XPID code yet, as im sticking to Simtools but browsing thru the different codes i noticed pin6 on SMC3 is different on XPID being pin8.

    Attached Files:

    Last edited: May 19, 2019
  14. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    Has Anyone a link to understand the grounding of the motor as i figure why the one motor surges during calibration.

    Thank you in advance
  15. Takumivs

    Takumivs Project CPT

    Joined:
    Nov 6, 2018
    Messages:
    80
    Occupation:
    Mechatronics / Mechano Engineer
    Location:
    South Africa
    Balance:
    38Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    @noorbeast Evens Grounded the motor i still get the same response the surge in the slave motor
    Last edited: Apr 28, 2020