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 Gold Contributor

    Joined:
    Mar 11, 2024
    Messages:
    36
    Balance:
    119Coins
    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:
    129Coins
    Ratings:
    +4 / 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 Gold Contributor

    Joined:
    Mar 11, 2024
    Messages:
    36
    Balance:
    119Coins
    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:
    129Coins
    Ratings:
    +4 / 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:
    129Coins
    Ratings:
    +4 / 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,340
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    149,705Coins
    Ratings:
    +10,954 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  7. Josh Latka

    Josh Latka New Member

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

    Pietbrok85 New Member

    Joined:
    Jan 16, 2025
    Messages:
    3
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    - 1Coins
    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 Gold Contributor

    Joined:
    Mar 11, 2024
    Messages:
    36
    Balance:
    119Coins
    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:
    3
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    - 1Coins
    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:
    3
    Occupation:
    Retired
    Location:
    Venlo
    Balance:
    - 1Coins
    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 Gold Contributor

    Joined:
    Mar 11, 2024
    Messages:
    36
    Balance:
    119Coins
    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,340
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    149,705Coins
    Ratings:
    +10,954 / 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.