# L6235 speed control using PWM

#### mickey123

Joined May 28, 2024
3
I am trying to control the speed of brushless DC motor by providing a PWM signal from a STM32 micro to the Vref pin of L6235 as shown below. My motor has a 1/156 gear ratio. When I apply the variable PWM to the VREF pin, it doesn't change the speed instead the motor keeps rotating and makes a huge noise. What I am missing here?

L6235 app note: https://www.st.com/resource/en/appl...shless-dc-motor-driver-stmicroelectronics.pdf

#### crutschow

Joined Mar 14, 2008
34,813
Your capacitor may not be large enough.

What is the switching frequency of you PWM signal?
With those values for RLP and RDIV, CLP should be a minimum of FPWM / 100kHz * 10nF where FPWM is your PWM switching frequency.

#### mickey123

Joined May 28, 2024
3
Your capacitor may not be large enough.

What is the switching frequency of you PWM signal?
With those values for RLP and RDIV, CLP should be a minimum of FPWM / 100kHz * 10nF where FPWM is your PWM switching frequency.
1KHZ

#### crutschow

Joined Mar 14, 2008
34,813
Then CLP should be a minimum of 100kHz / 1kHz * 10nF = 1000nF = 1µF with the given resistor values.

#### mickey123

Joined May 28, 2024
3
Then CLP should be a minimum of 100kHz / 1kHz * 10nF = 1000nF = 1µF with the given resistor values.
Thank you but may shouldn't it be 1KHz/100KHz according to what you mentioned above? or is the equation reversed?

#### crutschow

Joined Mar 14, 2008
34,813
Thank you but may shouldn't it be 1KHz/100KHz according to what you mentioned above? or is the equation reversed?
Yes, I incorrectly showed it reversed.
Should be 100kHz / FPWM.