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

Tutorial SMC3 Arduino 3DOF Motor Driver and Windows Utilities

Discussion in 'SimTools compatible interfaces' started by RufusDufus, Dec 1, 2013.

  1. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    This is very interesting. Would you be willing to share the update code, please?
  2. Josh Latka

    Josh Latka New Member

    Joined:
    Jan 31, 2025
    Messages:
    21
    Balance:
    112Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF
    it wont allow me to upload the file. this is how the code looks with the modification
    open your code editor and find the lines for deadzone1 and paste in between to look like this

    const int FeedbackPin3 = A2; // Motor 3 feedback pin
    const int PotInputPin = A5; // User adjustable POT used to scale the motion (if enabled)

    //Pot Filter added by J Latka
    int PotData = 0;
    int filteredValue = 0; // Initialize filtered value
    float alpha = 0.05; // Filter coefficient (0 < alpha < 1)
    //Pot Filter added by J Latka
    int DeadZone1 = 0; // feedback deadzone
    int DeadZone2 = 0; // feedback deadzone
    int DeadZone3 = 0; // feedback deadzone

    the lines that are between //Pot Filter added by J Latka are the code values

    i am no code expert and would like to see some one who actually knows what they are doing implement this filter into the code properly
    And to correct my self I used a 10nF cap
    Must mention the cap made huge difference but needed some help,of the filter
    The url link I posted explains the best
  3. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Awesome. But I believe you missed a few line of code, for the 'Feedback1' and 'Feedback2'
    Perhaps, you can copy paste the whole code instead?
  4. Josh Latka

    Josh Latka New Member

    Joined:
    Jan 31, 2025
    Messages:
    21
    Balance:
    112Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF
    That part of the code remains the same and in altered
    I put that on the post for a reference as to where the additional code is located and inserted
    Below is the only additional lines added.
    //Pot Filter added by J Latka
    int PotData = 0;
    int filteredValue = 0; // Initialize filtered value
    float alpha = 0.05; // Filter coefficient (0 < alpha < 1)
    //Pot Filter added by J Latka

    In my above posted comment the lines above and below this is for reference to where I inserted the filter code
  5. Josh Latka

    Josh Latka New Member

    Joined:
    Jan 31, 2025
    Messages:
    21
    Balance:
    112Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF
    i apologize. there was some parts missing and i realized i needed to zip the sketch in order to upload it.
    i have attached a copy of the smc code with the filter code in place for those who want to use it
    sorry i havent used forums in over a decade

    Attached Files:

    • Informative Informative x 1
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,395
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,025Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  7. Josh Latka

    Josh Latka New Member

    Joined:
    Jan 31, 2025
    Messages:
    21
    Balance:
    112Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    2DOF
  8. Pietbrok85

    Pietbrok85 New Member

    Joined:
    Jan 16, 2025
    Messages:
    6
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    17Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Hello all, maybe someone can help me please? I am in the process of building 6DOF flight simulator and have already set up a lot using 2 x Arduino Uno R3 and SimTools latest version. I managed to connect 3 motors to each Arduino and can control the first 3 motors by e.g. Microsoft Flight Simulator 2024. The other 3 motors i want connect on the 2nd arduino. My questions are:
    1) Can i connect both Arduino's via a small separate usb-hub and
    2) How do i adress them in SimTools (I can only select one com port at a time).
    Appreciate your help and advices very much! Kind regards, Piet
  9. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF

    #1 Yes, use USB hub
    # Go to Interface Setup, and set the 2nd arduino board in the Interface2.
  10. Pietbrok85

    Pietbrok85 New Member

    Joined:
    Jan 16, 2025
    Messages:
    6
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    17Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Thank you! Just ordered a small usb hub. Kind regards, Piet
  11. Pietbrok85

    Pietbrok85 New Member

    Joined:
    Jan 16, 2025
    Messages:
    6
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    17Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Hello "prophet", following your advises i have connect the first arduino on com3 and the second arduino on com 4 now (both via a small hub). Arduino 1 on interface 1 and arduino 2 on interface 2.
    How do i assign the 6 axis in SimTools? Thanks for advice!

    Attached Files:

  12. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    I am new on SimTools 3. I read the manual and this is what I got from the reading

    [​IMG]

    [​IMG]

    The rest still default, as I am still learning... :D
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,395
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,025Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Normally, unless there is a specific axis dedicated to a single/sole axis, allocations will be split vertically among the range of available axis.
  14. Pietbrok85

    Pietbrok85 New Member

    Joined:
    Jan 16, 2025
    Messages:
    6
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    17Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    upload_2025-2-19_12-38-47.png

    Thank you! its exactly the layout of this picture that i have build (not finished yet)
    Last edited: Mar 9, 2025 at 19:24
  15. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    I was actually confused when I read the manual, here is the screenshot of page 95.

    [​IMG]

    I am expecting tipical axis and dof assignment just like you said, at least that what I read a lot on the Simtools V2.

    So for the V3 should I do the 'split vertically' like on the V2?
  16. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,395
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,025Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    That dedicates 20% 0f the available range to be dedicated to a particular axis, but each motor has to serve multiple such axis, each a further allocation from the available range.
  17. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Noorbest,
    My build is 6 DOF stewart with Rotating arm.
    So I am on 'Generic 3D Rotating' plugin.

    Here is my Simtools v3, and it is a live and make motion that makes sense. But I am curious of your comment above. Now I wonder if my axis assignment is not optimal.

    How should I set my Axis assignment? would you mind shedding some light for me please? I hope you can show me an example of the axis assignment I can try and then adjust, more like learning by doing.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
  18. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,395
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,025Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    What I mean is if you take, for example Axis 1A, and consider what it needs to serve, in what axis allocations can be allocated to it, is not dedicated, but instead contributes to a range of designated partial axis allocations, for example, as a partial list, it needs to serve concurrently roll, pitch, surge, sway and heave.
  19. prophet.id

    prophet.id Member

    Joined:
    Mar 11, 2024
    Messages:
    45
    Balance:
    153Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    I suppose you mean Axis 1a and 6a should be assigned for Pitch, Surge, Roll, and Heave.
    But then I'm confused with the "Roll total" on the bottom of the Axis 1a and "Surge total" on the Axis 6a.
  20. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,395
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,025Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The 'total' % is, as I understand it, a partial percentage of what particular and partial axis assignment can be allocated to that particular motor/actuator.