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 Arduino: noisy motors while not moving? Check this out.

Discussion in 'Motor actuators and drivers' started by Pit, Mar 22, 2015.

  1. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,439Coins
    Ratings:
    +3,089 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Hi
    Again I want to help any members here by sharing the knowledge given to me, if you have similar issues: noisy motors while they are not moving. Although I am very familiar using the Arduino I was wondering all the last months why my motors are so noisy while they did not move. I had never the time to dig deeper into the source of that annoying "feature", until @RacingMat had coded and linked a new code for the Arduino "Utrasonic" which gave me the input to fiddle it out.
    While I am using SMC3 due to the nice utility and myself approved code I asked @RufusDufus about any details of his Arduino code, which sends 20kHz PWM and higher (instead of standard 490Hz PWM - thanks @RacingMat for that) to reduce the noise.
    He explained, that
    "two parameters in SMC3 that are most likely to cause noise in the motor windings (buzzing or humming type noise) are the Kd and PWMmin values. This type of noise is most noticeable when the motors are holding position and not moving. If the noise you are getting is mostly when moving (unless slow smooth movement) it is probably not from the PID".
    So far we know from where we expect the source of the noise. But what can we do?
    His response so far:
    "Kd values cause the PWM duty cycle to rapidly change positive to negative as the system tries to compensate for errors. This can create harmonics in the windings causing noise. There are two ways to minimise this
    1. use a very small Kd value (0 completely eliminates these effects - but results in no damping effect)
    2. Increase Fpid, this is a divider that reduces how often the Kd parameter will update the PWM calculation - specifically added to help combat motor noise.
    PWMmin values has a similar effect because when the PWM drive changes direction it is not a smooth transition as the PWM duty ramps down to zero then raps up in the other direction. It ramps down to the PWMmin and then jumps to PWMmin in the other direction. So you get a stronger drive but potentially with more motor noise.

    Thanks a lot @RufusDufus for detailed explanation, I hope adding this knowledge should reduce any further support in future if this issue will be discussed.
    BTW my SMC values are for the
    Seat (two 750W motors):
    Fpid / 2
    Kp = 500
    Ki = 0
    Kd = 0
    Ks = 1
    Fpwm = 20kHz
    PWMmin =0
    PWMmax = 200
    PWMrev = 190
    Max Limits = 110
    Clip Input = 180
    Deadzone = 0
    Traction loss (one 200W motor):
    Fpid / 2
    Kp = 500
    Ki = 0
    Kd = 0
    Ks = 1
    Fpwm = 20kHz
    PWMmin =0
    PWMmax = 205
    PWMrev = 200
    Max Limits = 20
    Clip Input = 150
    Deadzone = 0
    Settings shared by @RufusDufus
    Fpid / 4
    Kp = 700
    Ki = 0
    Kd = 80
    Ks = 10
    Fpwm = 20kHz
    PWMmin =0
    PWMmax = 220
    PWMrev = 210
    Max Limits = 20
    Clip Input = 150
    Deadzone = 0
    Many thanks to @RufusDufus again for the time he has taken.
    • Informative Informative x 11
    • Like Like x 1
    • Disagree Disagree x 1
    • Winner Winner x 1
  2. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    989Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    thanks for taking the time for sharing this information/explanation. :thumbs
  3. Cvetan Cvetanov

    Cvetan Cvetanov Member

    Joined:
    May 30, 2015
    Messages:
    41
    Location:
    Teteven Bulgaria
    Balance:
    1,462Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, 4DOF
    Is it sounds like knock from time to time?
  4. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,439Coins
    Ratings:
    +3,089 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    no, this is normal and usually happens.
  5. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,442Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    Hello,
    thanks for your explantation. I understand where the noise comes from, but can this damage the Motors? The reason I'm asking is, I have tuned my PID settings again at the weekend. Now they are very aggressive and I like this settings much. But sometimes there is the noise when motors are holding the position. As I'm happy with this settings and waering a headset while gaming I can't hear the noise. So I would let my settings as they are, but i don't know if this can damage the motors for time.
    • Agree Agree x 1
  6. Cvetan Cvetanov

    Cvetan Cvetanov Member

    Joined:
    May 30, 2015
    Messages:
    41
    Location:
    Teteven Bulgaria
    Balance:
    1,462Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, 4DOF
    Motors no, but reductor will wear
  7. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,439Coins
    Ratings:
    +3,089 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Pardon?
  8. Cvetan Cvetanov

    Cvetan Cvetanov Member

    Joined:
    May 30, 2015
    Messages:
    41
    Location:
    Teteven Bulgaria
    Balance:
    1,462Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, 4DOF
    gears will wear if they are overloaded.
    • Agree Agree x 1
  9. AlexinChina

    AlexinChina Member

    Joined:
    Sep 2, 2015
    Messages:
    71
    Location:
    China
    Balance:
    371Coins
    Ratings:
    +8 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
  10. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,439Coins
    Ratings:
    +3,089 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    • Funny Funny x 5
  11. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,963Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    137034961-woman-take-big-bite-out-of-her-husband-bald-gettyimages.jpg
    Are you hearing me????
    • Funny Funny x 2
    • Like Like x 1
  12. SeatTime

    SeatTime Well-Known Member

    Joined:
    Dec 27, 2013
    Messages:
    2,573
    Occupation:
    Retired
    Location:
    Brisbane Australia
    Balance:
    28,370Coins
    Ratings:
    +2,844 / 39 / -0
    My Motion Simulator:
    AC motor, Motion platform
    I've likely read this all wrong, but are you using a cap on your feedback line to earth to get rid of noise?
  13. jefesant

    jefesant Member

    Joined:
    Oct 22, 2015
    Messages:
    29
    Occupation:
    Mechanic
    Location:
    China
    Balance:
    16Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    I tested my project and I saw the same issue "noise"

    Can be use the induction motor with magnetic stop?

    maybe this noise caming from the brush motor, they can't hold the position well
    without spend a lot of power and the accuracy to stop I think that some motor like "wiper or other gearbox" on the shaft have gap between the contact to brush is to big than when the motor trying hold this position don't have a good contact.
  14. Schopfer

    Schopfer Member

    Joined:
    Jul 20, 2017
    Messages:
    48
    Location:
    Thailand
    Balance:
    86Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Thank for sharing.
    Now My 2dof project is louder noise and not smooth.
  15. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,439Coins
    Ratings:
    +3,089 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    So go back to former settings...
  16. Schopfer

    Schopfer Member

    Joined:
    Jul 20, 2017
    Messages:
    48
    Location:
    Thailand
    Balance:
    86Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Low noise give less power but hight power has lounder and not smooth graph
    Fpid / 1
    Kp = 660
    Ki = 0
    Kd = 0
    Ks = 60
    Fpwm = 20kHz
    PWMmin =0
    PWMmax = 245
    PWMrev = 240
    Max Limits = 20
    Clip Input = 150
    Deadzone = 0
  17. Peter_the _machinist

    Peter_the _machinist Member

    Joined:
    Nov 16, 2020
    Messages:
    45
    Occupation:
    Mechanical Engineer (CAD,CAE)
    Location:
    Poland, Gdańsk
    Balance:
    353Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hi,

    1.Does this @RacinMat code will work for BTN8982??? In theory I found in datasheet that BTN8982 supports up to 20kHz but I do not know anything about electronics so I rely on you guys.
    2. Is this code overwrite standard SMC.ide code? 3. Do I need to make changes in downloaded @RacingMat's note?
  18. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,963Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    hi :)
    I never used SMC sorry.
  19. Qui

    Qui New Member

    Joined:
    Sep 22, 2023
    Messages:
    4
    Balance:
    - 125Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF
    adjust Fpid / 1 ===> Fpid / 10
  20. Stefzouille

    Stefzouille Member

    Joined:
    Dec 25, 2023
    Messages:
    104
    Balance:
    595Coins
    Ratings:
    +20 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, 4DOF
    Hi,


    Hi, I was able to lower the noise a little by playing with the settings. only I loaded a 40kg weight on it, and the noises started again. the problem is that in the end it's more than 150kg me with who will have to lift... in diy actuator e30-150 motors 750w mode, the gear ratio is not very strong..

    here are my current settings my parameters for the smc3 utils:
    Fpid: 7
    Kp: 150
    Ki: 15
    Kd: 0
    Ks: 30
    Fpwm: 20kHz
    Pwmmin: 0
    pwmmax: 150
    pwmrev:140
    maxlimit: 215
    clip in: 255
    deadzone: 0