0

I need help on phase angle controlling speed of single phase motor. My achieved speed control is not smooth, it appeared the motor has only 3 speed levels. I am sure my issue is on the firmware.

Circuit description. I am using STM32F103C and I have implemented a circuit using Zero crossing detector HAA11 and MOC3020 to trigger BTA41 SCR.

I am using PB12 and PB14(bridge for higher sinking current) to driver MOC3020.

and using PB8 (input button) for speed adjustment. Using PB13 for zero crossing.

Code description. Using TIM4 CHANNEL1 IRQ. Timer prescaler 36,000,000/36 =1us. TIM4-> CCR1=10000 //0.01s For 50Hz power line, the Interrupt occurs every 0.01s (180 degrees). that is twice in a full period.

I set PB13 to EXTI IRQ FALLING EDGE.

Whenever ZCD IRQ occurs, I will load new CNT and switch ON the gate.

TIM4-> CCR1=speed; where "speed" is updated value (set from button) and that is delay time before firing. Once an overflow occurs, I.e match between CNT and CCR1 value. then I switch OFF the MOC3020 and wait for another ZCD IRQ.

A higher value of "speed" cause earlier overflow and low value causes much waiting time, meaning short angle of conduction. a higher value cause earlier overflow and low value causes much waiting time, meaning short angle of conduction. This approach make the system to control the speed but I could not achieve smooth stepping. Sometimes the speed ramp up. I ONLY HAVE LOW SPEED AT 2500. MID SPEED AT 3500 AND HIGHEST AT 37250.

MY STEPPING IS 250 COUNT

I have tried using TIM4->CNT =speed;

I also tried TIM4->CNT=10000-speed;

the response is not improving

avong
  • 21
  • 4

0 Answers0