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

simulador 2dof arduino inicio

Discussion in 'SimTools compatible interfaces' started by Claudemir, Nov 22, 2013.

  1. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    how do I switch to IDE mode 2 in SMC3 setup?
    did istalaçao of fois alright! could not do more to move the engines yet! do not know if I chose the right way! Any tutorial for this, I do not know how to change the IDE!
  2. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    Edit the code at the top to say MODE2 (no space) as in picture below before you upload to the arduino.

    Mode2.JPG
    • Like Like x 1
  3. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    OK!
    Unable to move the cattle engines.
    And how should I proceed?
    trerei using SMC3Utils.exe along arduio as well as with SimTools_v1.0?
  4. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    Start 1 step at a time, and let me know where you get to.

    Step A: Shut down Simtools both Game Engine and Game Manager
    Step B: Program the Arduino (don't worry about wiring up H-Bridges and feedback pots yet)
    Step C: Run Windows SMC3 Utils on the same machine as you have programmed the Arduino. Check that it starts up and doesn't report any communications errors
    Step D: You should now see the chart being updated on screen, select square wave or triangle wave and the blue line should change
    Step E: Disconnect the Arduino from power/computer and connect the feedback pot if not already done
    Step F: Reconnect Arduino to computer and run Windows SMC3 Utils again - now you should be able to turn the pot and the green line will change on the chart
    Step G: Disconnect the Arduino from power/computer and connect the H-Bridge and motors and motor power (if you can find a toy motor and 9V battery that is a good safe test at this stage)
    Step H: Reconnect Arduino to computer and run Windows SMC3 Utils again.
    Step I: You now have to get some useful parameters setup, as a start try Kp=400, Ki=0, Kd=0, PWMmin=0, PWMmax=150
    Step J: Now when you turn the feedback pot from one extreme to the other the motor should slow down, stop/change direction, and speed up again.

    If you can get to this point then you are ready to put the motors and feedback pot on the sim and configure that... Follow the steps below:

    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

    Now you are ready to get Simtools setup. *** Make sure Windows SMC3 Utility is not running while you are trying to use Simtools ***
    • Like Like x 3
  5. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    Actually in Step J above if the pot (green line) moves outside the Limit Zones (Red Lines) the motors will be shut down so it will seem like nothing is working.... move the pot so it is in the center of the chart and then restart Windows SMC3 Utils which will reset the controller. Same for the numbered steps at the bottom.
    • Like Like x 2
  6. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Good day could make the engine move up and to Beixo now have to configure the tools pragrama yes?
    I tried to configure most do not know how to do it right!
    You could esplicar me an easier way intender sim tools?
  7. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    Hi Claudemir, That's great, sounds like you have the motors working?

    To get simtools setup with the SMC3 you need the following in the Interface Settings: (Typically the Interface 1 tab but any will do)

    The Interface output string is: [A<Axis1>][B<Axis2>]

    If you have three motors use: [A<Axis1>][B<Axis2>][C<Axis3>]

    No spaces anywhere.

    Simmtools Setup for SMC3.JPG
    • Like Like x 1
  8. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Hello all right? good today did the testing of engines with pots when turning the potentiometer can manually control the direction of them and also keep them stationary, this indicates that the motors are connected correctly right? al plugged the arduino simtools installed on your computer and applied the settings that u gave me the GAME ENGINE like this here in the photo, I will do more when output test nothing happens or an engine moves! what to do you have a complete setup sim tools that I can use? I do not know anything about programming thanks!
  9. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Hello could make the motors move with the sim tools
    My mistake was deichado Egine space on the Game setting. But now it's running to see the video!
  10. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    New Photos of mechanics is already ready.

    Attached Files:

  11. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    @Claudemir, great work, looks like you are moving along well. Glad you solved your problem driving the motors.
  12. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Thanks but owe it all to you!
    But now what do I do with the rest?
  13. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Adding a little Surge% to simulate the acceleration and braking or Heave to bumpiness road.?

    because the engines move with delay?
    • Agree Agree x 1
  14. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Your video show the motors and not moving at the same speeds or at the same time as is needed for a true pitch or roll movement which will lead to bad motion cues, be nice to see the whole rig move with you on it.
  15. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    yes but the question is, which of to realize that when I put the game to run with the controls are delayed exp: it accelerates the arms of the motors should move up and the brake should move up and down but it does not !
  16. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Because the game engine does not simulate the Heave, Yaw, Sway and Surge?

    The Roll and Pitch are working!
  17. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    Hi Claudemir, what game are you using? As far as I am aware all Simtools plugins have the 6 basic DOFs: yaw, pitch, roll, heave, surge, sway.

    As for the motors not responding too well, my guess is either the values in the Simtools tuning center are not right yet, or you haven't got the PID parameters in the Arduino motor controller right yet.

    Are you still using the Arduino SMC3 motor controller? If so use SMC3utils to setup the parameters for the motor so they run smoothly with that first - you can output test signals to try. Values of say Kp=500, Ki=0, Kd=0, PWMmin=50, PWMmax=200 are probably good starting points.

    If you post screenshots of the Simtools Interface Setup tab, Tuning Parameters, and SMC3utils parameters, etc we may be able to spot anything that doesn't look right.
  18. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    I'm using the game rfactor 1.
    I'm using the motor controller to the Arduino SMC3 that you stated!
    I did not SMC3 is a change in how you sent me.
    Then you have to configure parameters outside the game engine?
    I'm using a R3, 2 arduino ponteH IBT-2, 2 engines 5v, 2 potentiometer
  19. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,650Coins
    Ratings:
    +1,009 / 9 / -1
    Yes you need to use SMC3utils to setup the motor parameters for best performance.

    The setup steps I gave in post #46 are just cautious settings to make sure nothing gets broken while setting up. Once you are happy with the setup you then need to adjust the parameters for best operation. Looking at your video you are ready for this step.

    I would suggest stopping Simtools and running SMC3utils again and changing the controller parameters. Select the "Sine Wave" output and adjust the settings until the motors move well. Try the values in post #59.
  20. Claudemir

    Claudemir Member Gold Contributor

    Joined:
    Oct 22, 2012
    Messages:
    168
    Balance:
    49Coins
    Ratings:
    +33 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    OlaRufusDufus
    I'm posting this with the settings
    Because SMC3Utils does not respond?
    I edited the notepad but nothing happens.
    With the new 0.6-SMC3 will not communicate with the game engine!
    What did I do?

    Attached Files:

    • 1a.jpg
      1a.jpg
      File size:
      347.3 KB
      Views:
      808
    • 23.jpg
      23.jpg
      File size:
      193.3 KB
      Views:
      837
    • 20.jpg
      20.jpg
      File size:
      140.7 KB
      Views:
      860
    • 2a.jpg
      2a.jpg
      File size:
      1 MB
      Views:
      821
    • wewe.jpg
      wewe.jpg
      File size:
      256.5 KB
      Views:
      855
    • sdsdsd.jpg
      sdsdsd.jpg
      File size:
      324.4 KB
      Views:
      775
    Last edited: Jan 12, 2014