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 Arduino code + SimTools

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Pedro Pablo, Nov 21, 2017.

  1. Pedro Pablo

    Pedro Pablo Active Member

    Joined:
    Dec 7, 2015
    Messages:
    119
    Occupation:
    Software Developer
    Location:
    Valparaiso, Chile
    Balance:
    599Coins
    Ratings:
    +47 / 0 / -0
    Hi

    I've got 2 DC motors like this and a circuit board of 4 MM connected like this, also 2 5K pots with bolts to hook it to the motor shaft. For now the motors are not mounted to any base so obviously the pots are not mounted to the motors. After I configure SimTools using this guide and using this Arduino Code by RacingMat i was expeting to manipulate the motors on SimTools to test the output with the games, but I couldn't.

    For example, I turn on the arduino and the Monster Moto and the motors starts to move because on the code they need to put the potentiometer at 512. The problem is when I start the
    output testing on the motors acts the same, even when I move the slide the motors keeps their position as before, it only moves then i handle the potentiometer

    So, i was wondering if there's another code, another tutorial or another way to keep trying the motors. For now I don't have an idea to make an structure for use the motors, I only want to make the motor work
    • Like Like x 1
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    It is a bit hard to tell from your description if you have successfully completed all the steps to set up @RacingMat's code.

    If you are looking for alternate code try the SMC3, as it has a handy graphical application to ease setup: http://www.xsimulator.net/community...3dof-motor-driver-and-windows-utilities.4957/

    You did not say which version of SimnTools you are using. The difference from SimTools 1.3 to SimTools 2 in setup is that in the Interface Settings instead of axis defined like this <Axis1> it now has designate grouping for a or b in SimTools 2 for each axis assignment, like this <Axis1a>

    You can ignore b settings, as you wont need them.
    • Like Like x 2
    • Agree Agree x 1
  3. Pedro Pablo

    Pedro Pablo Active Member

    Joined:
    Dec 7, 2015
    Messages:
    119
    Occupation:
    Software Developer
    Location:
    Valparaiso, Chile
    Balance:
    599Coins
    Ratings:
    +47 / 0 / -0
    Thanks for your answer. Yup, im using simTools 2, and I didn't know about that change. I'm going to read about SMC3 and if something happends i'll post here
  4. Pedro Pablo

    Pedro Pablo Active Member

    Joined:
    Dec 7, 2015
    Messages:
    119
    Occupation:
    Software Developer
    Location:
    Valparaiso, Chile
    Balance:
    599Coins
    Ratings:
    +47 / 0 / -0
    Hi

    Before continuing with SMC3 I wanna configure SimTools with the RacingMat's code. I've got everything connected and working, for example the code does a calibration setting the potentiometer at 512, so when I move them (assuming that are not mounted to the motors as i've said before) the motors starts to turn. Also in the post RacingMat offers some hex values to try at the Serial Monitor of Arduino, and using some values the motors starts to move until I move the potentiometer to a position where they stop (if its pitch i move both pot at the same direction, if its roll I move one clockwise and the other counter-clockwise)

    The problem is that i still don't get them work at SimTools. As i've said im using the version 2 and im following the tutorial posted on the documentation of this site, but even using L<Axis1a>R<Axis2a> and the other variables from the quickstart the motors didn't work

    And in besides, i've tested SMc3 but also it's kinda confused for me. I've flashed the arduino with the code and i started the SMC3Util but i cannot manage to move the motor
  5. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You will need to post pictures of all of your settings on the SMC3 side and SimTools side.
    • Agree Agree x 1
  6. Pedro Pablo

    Pedro Pablo Active Member

    Joined:
    Dec 7, 2015
    Messages:
    119
    Occupation:
    Software Developer
    Location:
    Valparaiso, Chile
    Balance:
    599Coins
    Ratings:
    +47 / 0 / -0
    Well, i was messing around with the guide made by RufusDufus about SMCUtil, at least the motor moves but it's kinda hard to measure correctly if the pots are not mounted to the motors.

    For now I can post the settings of Simtools, keep in mind that is configured based on RacingMat's guide, again, I can't do so much without the motors properly working with the potentiometers.

    I'll keep the tests, I have a friend who can make me the brackets to mount the motors with the pots but it will take his time, for now this is only that i can do :/

    Sin título1.png

    Attached Files:

  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,463
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,614Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    You need to mount your pots before fiddling with SimTools.

    SMC3 Interface Settings for Simtools 2:

    [A<Axis1a>][B<Axis2a>]

    Set for 10bit binary output

    Baud rate 500000 , N , 8 , 1 (10ms delay)
    • Agree Agree x 1