A method for speed control of a single-phase motor based on a microcontroller and its implementation.
2026-04-06 09:07:08··#1
0. Introduction Currently, the three-speed single-phase motor has a simple structure, low cost, and convenient control, enabling electric fans to have high, medium, and low speeds, thus improving the air supply quality. Therefore, this type of single-phase motor is widely used in household electric fans. However, when further improvements in the quality and performance of electric fans are needed, a single-phase motor with only three speeds cannot meet the requirements; the speed regulation capability of the single-phase motor must be enhanced. We use a contactless switch with time-sharing to enable the three-speed single-phase motor to have a speed regulation capability of twenty speeds, while keeping the hardware circuit essentially unchanged. 1. Principle of Speed Control for a Three-Speed Single-Phase Motor The speed control circuit for a three-speed single-phase motor is shown in Figure 1. L, M, and H are the low-speed, medium-speed, and high-speed taps of the single-phase motor, respectively. The single-phase motor operates using capacitor power. The connection of the three taps to the power supply is controlled by three bidirectional thyristors TL, TM, and TH. When TL is on, the low-speed tap is connected to the power supply, and the motor runs at low speed. Similarly, when TM is on, the motor runs at medium speed, and when TH is on, the motor runs at high speed. By using a time-sharing method of switching L, M, and H on, the motor speed can be adjusted, enabling the three-speed single-phase motor to achieve more than three speed ranges. Assuming the power supply frequency is 50Hz and its period is 0.02s, and the speed regulation period is TS=8T (T is the power supply period), during low-speed regulation, if no thyristor is turned on during the speed regulation period, the motor speed is 0. If all thyristors TL are turned on during the speed regulation period, the motor runs at low speed. However, if thyristor TL is turned on for N cycles out of 8 power supply cycles (0≤N≤8), and not turned on at other times, then an 8th speed lower can be obtained at low speed. Similarly, during medium-speed regulation, if thyristor TL is turned on during the speed regulation period, the motor runs at low speed. If thyristor TM is turned on during the period, the motor runs at medium speed. If thyristor TM is turned on for N cycles out of 8 power supply cycles, and TL is turned on for (8-N) cycles, then an 8th speed can be obtained between low and medium speed. Similarly, an 8th speed can be obtained between medium and high speed. Therefore, it can be seen that by using the time-sharing method, a three-speed single-phase motor with only three speed settings can have a speed regulation capability of twenty-four speed settings. 2. Hardware and Software Design of Three-Speed Single-Phase Motor Speed Regulation The speed regulation circuit of a three-speed single-phase motor is shown in Figure 1. The single-phase motor of a household electric fan is controlled by a microcontroller ATMEL89C2051. The output ports P1.5, P1.6, and P1.7 of the microcontroller are connected to the control terminals of thyristors TL, TM, and TH via inverters. When P1.5 = "0", the thyristor conducts, and the motor runs at low speed; conversely, when P1.5 = "1", the thyristor is cut off, and the motor stops. That is, the low-speed setting is controlled by the output potential of P1.5; similarly, the medium-speed setting is controlled by the output potential of P1.6, and the high-speed setting is controlled by P1.7. The synchronization circuit generates a pulse signal for each power supply cycle and generates a falling edge of the pulse when the power supply voltage changes from negative to positive. The synchronization signal is input to the microcontroller through the INT0 interrupt port. The control method for switching speed regulation of a three-speed single-phase motor is as follows: When the power supply voltage changes from negative to positive and crosses zero, the synchronous circuit generates a pulse signal to request an interrupt from the microcontroller. After responding to the interrupt, the microcontroller executes the speed regulation program and outputs a speed signal according to the given speed code to adjust the motor speed. The speed regulation period is set to Ts = 8T (T is the power supply cycle). The speed regulation program must go through 8 interrupts to output a speed code. No new speed codes can be accepted within the speed regulation period; otherwise, the motor speed will be uncontrolled. In the speed regulation program, one storage unit (34H) is used as the speed input unit, and another storage unit (37H) is used as a power supply cycle indicator to record the output power supply cycles. When the controller needs to change the fan speed, it can write the speed code to the (34H) unit at any time. However, the speed regulation program can only convert the data in the (34H) unit into an actual output signal when the value of the power supply cycle indicator is zero. The initial value of the power cycle indicator is 00H. The speed control cycle timer increments by 1 each time INT0 is interrupted, until the power cycle indicator reaches 08H, at which point it is reset to zero, and the data from the speed input unit (34H) is read. In the speed control program, we use 8 bits to record the fan speed code, where the lower 3 bits (b2b1b0) represent the on/off ratio N, the 4th and 5th bits (b4b3) represent the on/off level, and the higher 3 bits (b7b6b5) are not used. The engagement level indicates whether the speed regulation is low-speed, medium-speed, or high-speed. Its value is b4b3 = {00B, 01B, 10B, 11B}. When the engagement level is 00B, the thyristor TL is engaged within the engagement ratio set by the speed code, and not engaged outside the engagement ratio. When the engagement level is 01B, the thyristor TM is engaged within the engagement ratio set by the speed code, and TL is engaged outside the engagement ratio. When the engagement level is 10B, the thyristor TH is engaged within the engagement ratio set by the speed code, and TM is engaged outside the engagement ratio. When the engagement level is 11B, there is only one engagement ratio, 00H. In this case, the thyristor TH is engaged throughout the entire speed regulation cycle, and the motor runs at high speed. The on/off ratio ranges from 000B to 111B, thus the speed code ranges from 00H to 18H, totaling 25 codes. 00H represents zero speed, 01H-08H represent low speed, 09H-10H represent medium speed, and 11H-18H represent high speed. Therefore, the motor has twenty-four speed ranges excluding zero speed. The advantage of this speed code definition is that the codes for the three speed ranges are consecutive, and the code value is related to the speed. The control algorithm of the speed regulation program is shown in Figure 2. The power cycle indicator indicates the number of power cycles that have elapsed within one speed regulation cycle, with an initial value of 00H. N represents the on/off ratio in the speed code. The power cycle indicator increments by 1 each time INT0 is interrupted, until it is reset to zero at 08H. Therefore, the power cycle indicator can be used to control the number of power cycles that the thyristor is switched on, thus controlling the motor speed through the on/off ratio in the speed code. To facilitate programming, we introduce a control bit 'c'. Within the activation ratio range set by the speed code, control bit 'c' = 1; outside this range, control bit 'c' = 0. Based on the activation level of the speed code, the code for the thyristor to be activated can be calculated: thyristor code (t1t0) = (activation level bits b4b3) + control bit (c). Here, the thyristor code t1t0 = {00B, 01B, 10B, 11B}, where 00B represents no activation, 01B represents thyristor TL, 10B represents thyristor TM, and 11B represents thyristor TH. After calculating the thyristor code, the corresponding control signal can be obtained based on the logical relationship between the thyristor code and the control signal, and the corresponding signal can be output to control the motor speed. The logical relationship between the thyristor code and the output control signal is as follows: Based on the above control algorithm, we wrote a control program. Experiments have confirmed that the above method can adjust the speed of a three-speed single-phase motor, enabling a motor with only three speed settings to have a speed regulation capability of twenty-four speed settings. However, this method has some drawbacks, mainly: 1) The motor torque is pulsating, which increases the mechanical noise of the motor. Good lubrication and measures to prevent rotor axial movement must be taken to reduce noise. In order to make the motor torque smoother and reduce pulsation within the speed regulation cycle, an improved control bit waveform can be used, as shown in Figure 3. Under the premise of keeping the on-state ratio unchanged, the on-state control bits are evenly distributed to reduce the degree of motor torque pulsation, thereby reducing motor noise. 2) When the low-speed on-state ratio is low, the fan blades creep and cannot deliver air normally. The minimum speed code must be limited. The four codes with the lowest on-state ratio in the low-speed speed code can be removed, retaining the twenty higher speed settings. Experiments have confirmed that after adopting the improved control bit waveform and limiting the minimum speed code, the three-speed single-phase motor achieves better speed regulation and energy-saving effects in fan applications. The experimental test results of the three-speed single-phase motor speed regulation are as follows: The load of the motor in this experiment was a fan, and the relevant technical data are as follows: Rated voltage: 220V±10%, Rated frequency: 50Hz, Fan blade diameter: 300mm, Speed: High - 1150r/min, Medium - 900r/min, Low - 600r/min. 3. Conclusion In the control circuit of a household electric fan, the thyristor time-sharing method can enable a single-phase motor with only high, medium, and low speeds to have a speed regulation capability of twenty speeds. This method does not require adding much hardware; only a new speed regulation algorithm is needed in the control program to achieve the purpose of increasing the number of fan speed levels. At the same time, the power of the electric fan decreases as the speed decreases during speed regulation, giving the fan a good energy-saving effect. The main disadvantages of this method are: 1) The torque of the motor is pulsating, which increases the mechanical noise of the electric fan. 2) When the low speed ratio is low, the fan blades creep and cannot deliver air normally. For problem 1), improved control bit waveform data was used to evenly distribute the control bits while maintaining the same on/off ratio, reducing the pulsation of the motor torque. Simultaneously, good lubrication and measures to prevent rotor axial movement were implemented to reduce motor noise. For problem 2), limiting the minimum speed code prevents the fan blades from creeping and failing to deliver airflow at low speeds. Experiments have confirmed that after adopting the improved control bit waveform and limiting the minimum speed code, the three-speed single-phase motor achieves better speed regulation and energy-saving effects in fan applications.