1. 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 Download Package Now!
  2. 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
  3. 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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum 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 - - - - - - - - - - - - - - - - Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Oct 2, 2013
    Messages:
    2,900
    Location:
    Switzerland
    Balance:
    27,957Coins
    Ratings:
    +2,878 / 28 / -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 10
    • Like Like x 1
    • Winner Winner x 1
  2. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    219
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    14Coins
    Ratings:
    +98 / 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,390Coins
    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 - - - - - - - - - - - - - - - - Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Oct 2, 2013
    Messages:
    2,900
    Location:
    Switzerland
    Balance:
    27,957Coins
    Ratings:
    +2,878 / 28 / -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,241Coins
    Ratings:
    +243 / 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.
  6. Cvetan Cvetanov

    Cvetan Cvetanov Member

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

    Pit - - - - - - - - - - - - - - - - Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Oct 2, 2013
    Messages:
    2,900
    Location:
    Switzerland
    Balance:
    27,957Coins
    Ratings:
    +2,878 / 28 / -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,390Coins
    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:
    272Coins
    Ratings:
    +6 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
  10. Pit

    Pit - - - - - - - - - - - - - - - - Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Oct 2, 2013
    Messages:
    2,900
    Location:
    Switzerland
    Balance:
    27,957Coins
    Ratings:
    +2,878 / 28 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    • Funny Funny x 4
  11. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    1,926
    Location:
    Marseille - FRANCE
    Balance:
    17,778Coins
    Ratings:
    +1,830 / 16 / -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 SimTools 2.0 Beta Tester

    Joined:
    Dec 27, 2013
    Messages:
    1,927
    Location:
    Newcastle Australia
    Balance:
    24,580Coins
    Ratings:
    +2,269 / 20 / -0
    My Motion Simulator:
    DC motor, Motion platform, 6DOF
    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 Gold Contributor

    Joined:
    Oct 22, 2015
    Messages:
    30
    Location:
    China
    Balance:
    - 82Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, 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:
    45
    Location:
    Thailand
    Balance:
    11Coins
    Ratings:
    +13 / 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 - - - - - - - - - - - - - - - - Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Oct 2, 2013
    Messages:
    2,900
    Location:
    Switzerland
    Balance:
    27,957Coins
    Ratings:
    +2,878 / 28 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    So go back to former settings...
  16. Schopfer

    Schopfer Member

    Joined:
    Jul 20, 2017
    Messages:
    45
    Location:
    Thailand
    Balance:
    11Coins
    Ratings:
    +13 / 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