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

Help with RacingMat Code for 2DOF Hbridge

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by zylle, Oct 22, 2016.

  1. zylle

    zylle New Member

    Joined:
    Oct 15, 2016
    Messages:
    21
    Location:
    Denmark
    Balance:
    124Coins
    Ratings:
    +11 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi everyone! :)

    I've been building my 2DOF simulators frame this weekend and mounted my motors and such, as I'm currently waiting for my arduino and hbridge to arrive in the mail. I came across RacingMats code for arduino that can be used with a H bridge and looked into it, as i would like to have everything ready for when my electronics arrive, and couldnt figure out how i should wire my h bridge up to the arduino. As seen in the code here, it looks like that i should wire 2 directions up for each motor?

    upload_2016-10-22_22-53-22.png

    But my hbridge only supports on direction pin for each motor connectec ( as seen in this picture)

    upload_2016-10-22_22-53-42.png

    Sorry if its a bit of a noobish question, but i would hate to come home to my new h-bridge and arduino and be stuck on this for hours :p

    Thanks a lot in advance for the help, my build will have its own thread when i get some pictures of the frame :D
    upload_2016-10-22_22-53-22.png upload_2016-10-22_22-53-42.png
  2. zylle

    zylle New Member

    Joined:
    Oct 15, 2016
    Messages:
    21
    Location:
    Denmark
    Balance:
    124Coins
    Ratings:
    +11 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Alternatively, are there any useful arduino codes that i can use with my h-bridge that i bought?

    Thanks a lot in advance! :)
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,530
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,004Coins
    Ratings:
    +10,774 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    A model number and specification link would be far more helpful than a hbridge picture.
  4. zylle

    zylle New Member

    Joined:
    Oct 15, 2016
    Messages:
    21
    Location:
    Denmark
    Balance:
    124Coins
    Ratings:
    +11 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Agree Agree x 1
  5. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    Hello, have you managed to run that h-bridge with some arduino code and simtools? Looks very robust and with a good cooler I think it could be 30a and over 60a max
  6. Vladimir

    Vladimir New Member Gold Contributor

    Joined:
    Jul 25, 2015
    Messages:
    12
    Location:
    Russia
    Balance:
    283Coins
    Ratings:
    +31 / 0 / -0
    This H-bridge with firmware must be connected in this way:
    7 pin - DIR1; 4 pin - DIR2; 5 pin - PWM1; 6 pin - PWM2;
    8, 9 pin - not used.
  7. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    Smc3?
  8. Vladimir

    Vladimir New Member Gold Contributor

    Joined:
    Jul 25, 2015
    Messages:
    12
    Location:
    Russia
    Balance:
    283Coins
    Ratings:
    +31 / 0 / -0
    For Smc3 connection: 2 pin - DIR1; 4 pin - DIR2; 9 pin - PWM1; 10 pin - PWM2.
  9. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    Thank you very much for replying, those connections would be in mode 1 of smc3? No need to change anything
  10. Vladimir

    Vladimir New Member Gold Contributor

    Joined:
    Jul 25, 2015
    Messages:
    12
    Location:
    Russia
    Balance:
    283Coins
    Ratings:
    +31 / 0 / -0
    Yes, all connections for mode1, pin 3 and 5 are not used.
  11. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    Thank you very much, my friend, this bridge with a good heatsink could end up much more than the 10A (30A peak) that says in its characteristics?