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. Thick8

    Thick8 Just some random guy

    Joined:
    Jan 1, 2025
    Messages:
    29
    Location:
    South Carolina USA
    Balance:
    158Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor
    I have not yet started to play with SMC3. After my first MSFS helicopter ride on my DR-P3, I realized that the backlash and cogging was totally unacceptable. So of course I began modding it. I hope to be done within the next couple of weeks. I read that there is a manual for SCM3 but haven't looked for it yet. I may find some time to play with it this week to get an idea of what all the settings are. I get the right hand column controls the elements of the movement graph but have no idea what the other settings are. I just fly helicopters, ultralights, and small GA aircraft. So it's critical that it be smooth, but also sensitive to small nuanced movements. Is it possible that this isn't the right software to meet my needs?
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,439
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,279Coins
    Ratings:
    +11,001 / 55 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    SMC3 has many modded varieties and forks, and for all that control software is part of a complex intersect with design and hardware, both of which have their own direct impacts.

    I guess what I am saying is to consider SMC3 as one of the many related DIY choices, and understand that as part of and related to other design/hardware choices and impacts.
  3. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    90
    Balance:
    345Coins
    Ratings:
    +53 / 1 / -0
    @Joe Cortexian
    Thank you for your work.Does your post refer to the PID implementation of the original SMC3 or to my implementation?
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,439
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,279Coins
    Ratings:
    +11,001 / 55 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  5. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    90
    Balance:
    345Coins
    Ratings:
    +53 / 1 / -0
    @noorbeast

    Yes, also thank you for your suggestions. Also, sorry for not answering.

    You are correct in that the square wave response of my PI regulator setup shows overshoot. On the other hand, with the "motion" waveform there is no overshoot.
    I've tried various combinations of Kp and Ki and, while I found combinations with less or no overshoot with the square wave, they also followed the "motion" waveform with much more lag.

    I use my rig playing flight simulator games in VR, so the "motion" waveform is pretty close to my real application, while a square wave is way different. Also, I consider low lag as quite important, especially in VR. For those two reasons I stick to a regulator configuration that overshoots a little when facing a square wave.

    After all, having a fast regulator without overshoot is something like the holy grail of regulators. From my experience, in order to even hope to achieve something like this, a full fledged PID regulator, with well adjusted D component, and good, low lag filtering of the input, would be required. The filtering part is currently missing. Maybe something like a gliding, weighted average kind of thing. But honestly, I don't see myself implementing that. There's other stuff I'd like to do that promises more fun or improvement.

    About the Max Limits: Yes, I set a bad example setting max limits to 0 here. I have non-zero values for my other 2 motors, but for some reason the motor I used for those screenshots irregularly, but repeatedly, crossed the max limit and was then shut off by SMC3 mid game. Quite immersion breaking and quite a hassle to resolve each time. The clipping limits are the same for all my motors and I didn't want to let them clip sooner. So I reduced Max Limits for the motor that kept turning off. It "solved" the issue without creating new ones, so I run with it. I know it's kind of risky and nothing to recommend. I know I should have looked for the real reasons the motor crossed the max limits. But meanwhile, this "solution" has reached the "if it works, don't touch it" stage.
  6. Joe Cortexian

    Joe Cortexian Active Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    138
    Balance:
    827Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    3DOF
    Regarding your recent implementation:
    For tracking sharp, rapid movements—such as those in boxing games or rally racing—it should offer noticeable improvements. For smoother, more gradual movements, like those in a flight simulator, the difference may not be significant.

    Mechanical ringing could definitely contribute to the roughness I’m seeing in the flight simulator. If the rig is oscillating or overshooting due to resonance (especially with those gradual inputs), it might amplify the issue beyond what the PID control and 10ms updates can handle smoothly. Since sharp movements in boxing or racing likely demand quick damping, the ringing might not be as noticeable there, but the slower, sustained adjustments in a flight sim could let it show through.

    Do you have experience with a flight simulator?
  7. Sebastian2

    Sebastian2 Member Gold Contributor

    Joined:
    Dec 17, 2023
    Messages:
    90
    Balance:
    345Coins
    Ratings:
    +53 / 1 / -0
    @Joe Cortexian
    I have only experience with flight simulators and have not yet tried racing games with my rig.

    I'm sorry for asking again but I am still not 100% sure if the pictures in your post from 31st of March show the result of the original SMC3 PID implementation or my fixed regulator code.

    You are very unspecific when you talk about how the regulator code will affect certain games. The original SMC3 code for the I and D regulators behave very differently from my textbook-like approach. Thats my sugar-coated way of saying "the orignal SMC3 regulator code is broken, regarding the I and D component". Also, I and D regulator components behave very differently from each other. When you talk about what makes sense for what kind of games, I think it is essential to differntiate between those 4 things.


    I can see how a working D component of a regulator can improve the regulator's response to sharp, rapid movements. However, I demonstrated that the orignal D regulator code is not working in the sense how a D regulator is traditionally defined. Like I've written, the orignal SMC3 implementation is based on the difference between the current position and the position that was measured in the cycle before.
    If you take a look at how D regulator normally works, you'll find that it's based on the difference between the current positional error and the positional error that was measured in the cycle before.
    That small difference in wording makes a huge difference in how the regulator acts.
    A D regulator is sending strong command signals if the positional error (where the motor should be vs. where it actually is) suddenly gets larger or smaller. So a working D component helps the rig keep up with sharp, rapid movements. On flight simulators, with smooth slow movements, the D component shouldn't do much. In fact, as the input signal has noise, even a working D regulator component might do more harm than good.

    It's a different story with the I component. Again, I have shown that the orignal SMC3 regulator code is broken with regard to the I component. Only the P component works. My working I component provides torque that doesn't fluctuate as wildly as the P component. This could provide a smoother experience in flight simulators than the pure P regulator, that most SMC3 users seem to use, can offer. On the flip side, a I regulator component won't do much for a rally simulator with its harsh, sudden movements.

    To summarize: the fixed D component helps make car sims harsher while the fixed I component helps make flight sims smoother.