cancel
Showing results for 
Search instead for 
Did you mean: 

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

Vijay Ganisetti
Associate II

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

5 REPLIES 5
Javier1
Principal

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.

we dont need to firmware by ourselves, lets talk

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

TIM1->ARR=89;

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

we dont need to firmware by ourselves, lets talk

Ok thank you for your suggestion

cedric H
ST Employee

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