Need Help Reducing Noise and Vibration in BLDC Motor

Hi all,

I’m using a custom board with an ATmega328, DRV8313, and AS5600 to drive a BLDC motor and facing two issues:

  1. Noise during rotation: The motor produces a high-pitched sound, especially at mid to high speeds.
  2. Vibration at velocity 0: The motor vibrates significantly when trying to hold position.

I’m using a ROB-20441 motor from sparkfun with 7.5 ohms winding resistance and an 8V power supply.

Here’s my code:

#include <SimpleFOC.h>

MagneticSensorI2C sensor = MagneticSensorI2C(0x36, 12, 0x0E, 4);

BLDCMotor motor = BLDCMotor(7);

BLDCDriver3PWM driver = BLDCDriver3PWM(3, 5, 6, 7);

float target_velocity = 10.0;

Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }
void doVelocity(char* cmd) { command.scalar(&motor.velocity_limit, cmd); }


void setup() {

  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);

  digitalWrite(8, HIGH);
  digitalWrite(9, HIGH);
  
  Serial.begin(115200);
  SimpleFOCDebug::enable(&Serial);

  sensor.init();

  motor.linkSensor(&sensor);

  driver.voltage_power_supply = 12;
//  driver.voltage_limit = 7.4; 

//  driver.pwm_frequency = 20000;
  
  driver.init();
  motor.linkDriver(&driver);
  
  motor.foc_modulation = FOCModulationType::SpaceVectorPWM;
//  motor.motion_downsample = 10;
  motor.controller = MotionControlType::velocity;

  motor.PID_velocity.P = 0.3f; //0.4f
  motor.PID_velocity.I = 10.0f; //1.0
//  motor.PID_velocity.D = 0.01f;

  motor.LPF_velocity.Tf = 0.001; //0.525f

  motor.voltage_limit = 2;
  motor.velocity_limit = 20;
//  motor.motion_downsample = 10;

  motor.PID_velocity.output_ramp = 10000;

  motor.useMonitoring(Serial);

  motor.init();
  motor.zero_electric_angle = 6.14;
  motor.sensor_direction = Direction::CW;
  motor.initFOC();

  command.add('T', doTarget, "target velocity");

  Serial.println(F("Motor ready."));
  Serial.println(F("Set the target velocity using serial terminal:"));

  Serial.print("Sensor angle: ");
  Serial.println(sensor.getAngle());

  _delay(1000);
}

void loop() {
  motor.loopFOC();

  motor.move(target_velocity);

  motor.monitor();

  command.run();
}

Thanks for your time and help!

3 Answers

3

This shouldn’t be above 0.58 * power supply voltage with svpwm modulation, if it’s commented it must be using a default value.

Also when you have a problem, start simple.
Do you have the same issue with only torque mode instead of velocity.

No, it's only motor.voltage_limit that needs to be <0.58x. Driver limit is the total DC range you have to work in, and should generally be equal to voltage_power_supply (which is what it defaults to).

My bad, I was reading it too fast.

Based on the motor datasheet you are using the wrong pole pair count also?

Thank you for your prompt response. I used the Arduino sketch to determine the motor’s pole pair number. I also tried using a different motor (iPower GBM2804H), but the issue persists - the motor still doesn’t stabilize at 0.

Below is a video demonstrating the behavior in torque mode.