Skip to main content
Vijay Ganisetti
Associate
November 3, 2021
Question

How to develop a random PWM for motor control using Nucleo F446RE MCU??

  • November 3, 2021
  • 2 replies
  • 1351 views

When motor is running at fixed frequency (30kHz), there is a slight noise. Hence, I want to see the varying PWM in runtime in order to minimize the noise

This topic has been closed for replies.

2 replies

Javier1
Principal
November 3, 2021

What type of motor is it, brushed DC?

>fixed frequency (30kHz)

i suppose thats the PWM frequency?

>there is a slight noise.

What type: electromagnetic noise... instrumentation noise, actual sound?

If you want to introduce jitter in order to flatten the freq profile peak, you just need to change the ARR of your timer at runtime, i have never done this.

And in order to archieve this the "noise" doesnt need to be random, just needs to be evenly distributed around your main freq.

0693W00000GWIHIQA5.png 

Noise comes from poor choices at the designing stage of your electronics(PCB), i would start looking there.

hit me up in https://www.linkedin.com/in/javiermuñoz/
Vijay Ganisetti
Associate
November 3, 2021

hi @Javier Muñoz​ ,

Yes, it is brushed DC motor. According to the motor parameters, motor control workbench suggests best operating conditions at 30kHz. i want to use random PWM rather than fixed PWM frequency in order to spread the frequency spectrum of the generated PWM.

Yeah i tried to update ARR of the timer using a function but its not working. Can you suggest any idea to update ARR in runtime?0693W00000GWIt7QAH.jpg

Javier1
Principal
November 3, 2021
TIM1->ARR=89;

 Maybe have some DMA loading the TIM ARR register constantly? from a lookuptable of values.

hit me up in https://www.linkedin.com/in/javiermuñoz/
cedric H
Technical Moderator
November 12, 2021

Hello @Community member​ ,

Could you describe your setup, Power board, motor and Software ?

If I understand correctly you use a Brushed DC motor, and the motor control workbench ??

The motor control workbench provides FOC algorithm for brush less PMSM motor (three phases Brush less DC Motor can work too).

Regards

Cedric