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

Question motor movement problems with arduino and H bridges (code 2)

Discussion in 'DIY Motion Simulator Projects' started by Gigino83, Mar 21, 2023.

  1. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    I don't understand why I can't get everything to work well, I'm trying to do a miniature test by following all the instructions, for the moment I have connected 2 motors powered separately at 6v and joined them using 3D printed supports to potentiometers 10k, when I connect the arduino to the usb and power the motors, it starts immediately to make small quick movements, and if I open smc utility it stops for a moment and then starts again. does not make longer movements!

    upload_2023-3-21_7-29-57.jpeg
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Please post pictures of all of your SMC3 settings.
  3. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    At the moment I don't have a pc because during the tests I accidentally gave 10v to the usb and it doesn't work anymore.. but it's normal that even if I don't open any program but only connect the arduino and the power supply, the motors move without stopping making small movements fast?
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    It is impossible to guess what the motors may do without any idea of the settings controlling them, hence the request for pictures of all settings.
  5. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    upload_2023-3-21_8-27-43.jpeg
    I found a picture in my phone while doing tests, these are the settings but I had also tried changing the parameters.
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  7. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    yes, I followed all the instructions, I also watched the tutorials and tried to do the same but my fear is that there are current problems because I tried to use only one motor and one potentiometer and I noticed that it worked better, I managed to make it move even with the sim tool which, on the contrary, did not work with 2 engines. I don't know how to share a video otherwise I could show you better what it does.
  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  9. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
  10. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The settings in the video looked to be copied from here, rather than being dialed in to suit your particular hardware:

    [​IMG]
  12. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    so do you think it's just a settings problem? as soon as i get my pc back i'll try to change them. Thank you
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Likely so, follow the recommended setup steps and report at what PWMmax value the motors start to move:

    Initial Setup

    I strongly recommend you follow the steps below if this is the first time you are using SMC3 with your simulator to reduce the risk of damaging anything.

    1. Disconnect the motor power supply
    2. Make sure Simtools is not running – we’re not ready for that yet!
    3. Wire up the Arduino (with SMC3 installed) to your H-Bridges and connect to your computer via USB
    4. Run the Windows SMC3 Utility software and make sure it communicates with the Arduino (There is no need to set baud rates, they are not configurable)
    5. Set the Kp, Ki, Kd, PWMmin, PWMmax, PWMrev to 0 for ALL motors (This will make sure the motors don’t move)
    6. Set Clip to 255 (you need to do this first) and Limit to 255 (This will give you plenty of margin if something goes wrong while setting up)
    7. Turn on the power to your motors – nothing should move at this stage!
    8. Set Kp to about 400
    9. Now slowly, increase PWMmax… at some point the motor should start to move. When it does check the “Green” feedback line is moving toward the “Blue” target position.
      • If it is then that motor and feedback is wired correctly - proceed to test other motors.
      • If it is moving away turn off motor power immediately (or quickly reduce PWMmax again). In this case you need to either reverse the wires to the motor being tested –OR– reverse the +5V and GND wires to your feedback pot for the motor being tested (do not do both). Restart the test from the beginning.
    10. Do the above for each motor
  14. Gigino83

    Gigino83 Member

    Joined:
    Mar 16, 2023
    Messages:
    59
    Balance:
    203Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    ok thanks, I try to do so hoping to be able to make everything go. then once i get the miniature test to work i will start making the real one.