DC motor speed control with Pololu Max 14870

I have a project for a musician where I need to control the speed of a DC motor.
A small wire is attached to the axle and hitting a string instrument.
The speed range is about 1000 to a 5000 rpm.
I am using a Pololu Max 14870 to control my motor, an Arduino Pro Micro and a 200k Poti.
Motor is a EsportsMJJ 775 Motor DC 12V-36V 3500-9000Rpm Motor
As far as function it all works.
My problem is that it has a high pitch noise at lower speed.
I need it to be very very silent as a microphone is going to be next to it.
Could someone point me the right direction?

Is my driver at fault?
my motor at fault?

here is my very simple code:

#include <DualMAX14870MotorShield.h>
DualMAX14870MotorShield motors;
#include <arduino.h>



void setup() {
 Serial.begin(9600);
}

void loop() {
delay (10);

 int potValue = analogRead(A0); // Read potentiometer value
 int MaxSpeed = map(potValue, 0, 1023, 0 , 350); // Map the potentiometer value from 0 to 255

   motors.enableDrivers();
    motors.setM2Speed(MaxSpeed);

}

thank you for your help

Try increasing the frequency of PWM to outside the range of human hearing.

If you don't have an Uno* (information that should be in first post) do a search for "change frequency of pwm arduino" and your board.

*Or any ATMega328 based board.

If the duty cycle gets too low the motor will stop and make the screaming
noise. Limit the lower value of PWM so that after the motor stops you turn off PWM. I have a motor that will not move till the PWM value is over 40 so I only feed it values 40 and up. That also helps with the noise.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.