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

Question SMC3 - PWMmax value etc. for PGSaw geared motors

Discussion in 'SimTools compatible interfaces' started by Ronan Design, Sep 18, 2021.

  1. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    257
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,652Coins
    Ratings:
    +130 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi, I've building my first 2DOF rig. Motors are working, but I'm not sure what should be PWMmax value for my PGSaw geared motors? Tutorial doesn't mention that. Should it be a maximum value (is it 256?) to use all of the motor's torque?

    Tutorial says PWMrev should be same as PWMmax - would it be too hard on the motor? What should I set it to?

    I tested and tuned motors without load first, and they work, but I;m not sure of the values I shoudl use. I set Kp to 400, Ki = 0 (I get oscillations if it's higher), Kp = 0. Anything i should do with those values?

    PWMmin is set to 30 right now and I get a whilte on motors without load. I guess this should be set so the seat does't sag or move with full load at idle...

    I'd appreciate if anyone shared their settings - maybe a screenshot.
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,398
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,043Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    See the second post of the SMC3 thread, as it explains all the settings: https://www.xsimulator.net/communit...driver-and-windows-utilities.4957/#post-48121

    PWMmax This is the maximum duty cycle that is used to drive the motors to their target position. As the target position gets further away from the actual position the control loop attempts to increase the motor drive (PWM) to get it to the target position. It will increase the PWM until it reaches PWMmax.

    With respect to PID while this gentle layman's introductory guide was done with JRKs in mind the fundamentals are the same: https://www.xsimulator.net/community/faq/a-laymans-analogy-guide-to-pids-pid-tuning.219/
  3. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    257
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,652Coins
    Ratings:
    +130 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I read it many times, and followed the tutorial when testing. However while ir explains what PMWmax is it doesn't explain how to tune it and what to aim for, nor does it say what's the max value. Does it just affect the max speed of the motor when trying to reach set point, or does it limit the torque? I want to use all available torque when needed, so should I set it to the max, unless it's too fast? And what's the max value then? Or does it only affect the speed and I just should set it to whatever max speed I want? In that case what is a sensible setting?