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

Arduino: noisy motors while not moving? Why?

Discussion in 'Motor actuators and drivers' started by AlexinChina, Dec 16, 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
    Anyway your comment should refer to the header "noisy motors while not moving? Why?". De facto less amperage makes the motors less noisy but it is not the goal to reduce the amperage because of less power/torque at least. We have many non native speaking members like me and Google translate is a good thing, but you should not post one after another post writing senseless content...thank you.
  2. traveltrousers

    traveltrousers Active Member

    Joined:
    Jun 5, 2014
    Messages:
    115
    Location:
    Timbuktu, Tombouctou, Mali
    Balance:
    890Coins
    Ratings:
    +87 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    This isn't a high speed PWM problem is it?
  3. 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
    What do you mean, could you be more precise?
  4. traveltrousers

    traveltrousers Active Member

    Joined:
    Jun 5, 2014
    Messages:
    115
    Location:
    Timbuktu, Tombouctou, Mali
    Balance:
    890Coins
    Ratings:
    +87 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
  5. 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
    As expected, the vnh5019 is a whiny motor driver, and I'm not kidding. I did several tests, I couldn't eliminate any whining only if reducing the kp value or as you did the pwmmax value. Unfortunately there is no solution in sight.
  6. traveltrousers

    traveltrousers Active Member

    Joined:
    Jun 5, 2014
    Messages:
    115
    Location:
    Timbuktu, Tombouctou, Mali
    Balance:
    890Coins
    Ratings:
    +87 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    The VNH509 isn't noisy, its the PWM source. I didn't reduce the pwmmax, I switched my Arduino to fast PWM code and the whining is gone.

    I use firmata on my arduino and two lines fix it for my nano on pins 9,10 and 11

    void setup()
    {
    TCCR1B = TCCR1B & B11111000 | B00000001;
    TCCR2B = TCCR2B & B11111000 | B00000001;
    etc etc

    this is the best site to work it out:

    https://arduino-info.wikispaces.com/Arduino-PWM-Frequency
    • Informative Informative x 1
  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
    @BlazinH @RufusDufus @vthinsel @Wanegain @eaorobbie ...any comments about this?
  8. traveltrousers

    traveltrousers Active Member

    Joined:
    Jun 5, 2014
    Messages:
    115
    Location:
    Timbuktu, Tombouctou, Mali
    Balance:
    890Coins
    Ratings:
    +87 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform


    shows a short but useful demo.... my drivers would whine as soon as they powered up with a zero pwm input
  9. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,901Coins
    Ratings:
    +1,016 / 10 / -1
    Yes that is what gets changed when adjusting Fpwm using SMC3Utils. Check out InitialisePWMTimer1 and InitialisePWMTimer2 in SMC3

    Your values will be getting overwritten if you put that code at the top of the setup() function unless you have removed the call to initialise timers.

    Note also the value you have chosen is outside the spec for almost all H-Bridges, it might work OK but not guaranteed so I have not included it as an option in SMC3Utils otherwise I will get too many questions of fault finding.

    EDIT: this assumes you are using SMC3 code of course
    • Informative Informative x 1
  10. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,901Coins
    Ratings:
    +1,016 / 10 / -1
    Also try setting Fpid/8 or more to see if that helps.