Application of single chip microcomputer in DC frequency conversion washing machine

Publisher:静逸闲云Latest update time:2011-12-31 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction

Washing machines are an indispensable household appliance in the home, and they are developing very fast. Fully automatic washing machines are favored by everyone because of their convenience. Fully automatic means that a series of processes such as water filling, washing, rinsing, and wringing are completed automatically. The controller usually has several washing programs for users to choose from for different clothes. Frequency conversion control has been widely used in the control of washing machines due to its advantages such as high performance and energy saving. The following introduces the control system of a DC frequency conversion washing machine designed using the SPMC75F2413A and SPCE061A microcontrollers of Lingyang Technology.

2 Introduction to the overall system plan

The entire system mainly consists of two parts: the DMC control board controlled by SPMC75F2413A and the PANEL board controlled by SPCE061A. The connection system block diagram between the two is shown in Figure 2.1.

>Click to view original image

Figure 2.1 Components of the inverter washing machine system.

The PANEL controller uses a 16-bit SPCE061A controller, and its main functions include: key scanning, status display and communication. The washing machine is controlled by key input to select the operation mode, and the water volume, reservation time, and detailed parameters of washing, cleaning and dehydration can be set; the power button is the starting connection with the drive control circuit board, and the start or pause button is to run the washing machine or pause. The remaining time during operation is displayed through a 7-segment display.

The DMC controller uses a 16-bit SPMC75F2413A single-chip controller, and its main functions include: detecting the position signal of the motor rotor and driving the DC brushless motor in a 120-degree square wave PWM mode. 3

System hardware design

The system control includes two parts: the DMC control board and the PANEL control board. The following mainly introduces the hardware design of the DMC control board.

3.1 Power supply circuit

Figure 3.1 shows the EMI power supply filter and single-phase full-bridge rectifier circuit. The AC power input connector is CON1, and the voltage is 220VAC. The power input terminal passes through the surge absorber ZNR3 to prevent excessive voltage surges from damaging the device. The Y2 capacitors C8 and C12 are connected in series to the ground point, which can usually also be connected to the chassis. The output DC voltage can be obtained after rectification by the full-bridge rectifier DB1 and filtering by C13.

>Click to view original image

Figure 3.1 EMI power filter

Figure 3.2 is a DC/DC power supply circuit. The output power of the power supply is P+18V and +12V. After the P+18V power supply is output, it generates P+15V and P+5V through IC21 and IC22 respectively to supply the working voltage of the IPM power module. And +12V generates +5V power supply through linear regulator IC20 to supply the working voltage of digital circuits such as SPMC75F2413A.
>Click to view original image

>Click to view original image

Figure 3.2 DC/DC power supply circuit

3.2 MCU control circuit

Figure 3.3 is the MCU control circuit. This part of the circuit is mainly based on the u'nSP SPMC75F2413A microcontroller. CON5 is connected to the online debugging and emulator ICE.
>Click to see the original image >Click to see the original image Figure 3.3 MCU control circuit 3.3 IPM motor drive circuit Figure 3.4 is the IPM motor drive circuit. Because the driven motor is a three-phase variable frequency, the microcontroller generally needs to have the ability to output 6 PWM signals. SPMC75F2413A can complete this function in chip hardware by MCP and PDC timer modules. The IPM module integrates the dynamic circuit and overcurrent detection circuit. The PWM output signal of the MCU is sent to the IPM module through the optical coupler, but in actual application, it is necessary to consider the protection of the MCU and the rapid generation of high-impedance signals to the IPM module. Therefore, the buffer circuit of IC12 is added to the circuit; the overcurrent feedback signal is connected to the input pin of FTINx after the optical coupler, so as to be able to quickly protect the IPM module. D5, D6, D7, C37, C40 and C43 generate the bootstrap circuit to provide the drive signal of the IPM upper arm switch. >Click to see the original image







>Click to view original image

>Click to view original image

Figure 3.2 DC/DC power supply circuit

3.2 MCU control circuit

Figure 3.3 is the MCU control circuit. This part of the circuit is mainly based on the u'nSP SPMC75F2413A microcontroller. CON5 is connected to the online debugging and emulator ICE.

>Click to see the original image >Click to see the original image Figure 3.3 MCU control circuit 3.3 IPM motor drive circuit Figure 3.4 is the IPM motor drive circuit. Because the driven motor is a three-phase variable frequency, the microcontroller generally needs to have the ability to output 6 PWM signals. SPMC75F2413A can complete this function in chip hardware by MCP and PDC timer modules. The IPM module integrates the dynamic circuit and overcurrent detection circuit. The PWM output signal of the MCU is sent to the IPM module through the optical coupler, but in actual application, it is necessary to consider the protection of the MCU and the rapid generation of high-impedance signals to the IPM module. Therefore, the buffer circuit of IC12 is added to the circuit; the overcurrent feedback signal is connected to the input pin of FTINx after the optical coupler, so as to be able to quickly protect the IPM module. D5, D6, D7, C37, C40 and C43 generate the bootstrap circuit to provide the drive signal of the IPM upper arm switch. >Click to see the original image







>Click to view original image

>Click to view original image

Figure 3.2 DC/DC power supply circuit

3.2 MCU control circuit

Figure 3.3 is the MCU control circuit. This part of the circuit is mainly based on the u'nSP SPMC75F2413A microcontroller. CON5 is connected to the online debugging and emulator ICE.

>Click to see the original image >Click to see the original image Figure 3.3 MCU control circuit 3.3 IPM motor drive circuit Figure 3.4 is the IPM motor drive circuit. Because the driven motor is a three-phase variable frequency, the microcontroller generally needs to have the ability to output 6 PWM signals. SPMC75F2413A can complete this function in chip hardware by MCP and PDC timer modules. The IPM module integrates the dynamic circuit and overcurrent detection circuit. The PWM output signal of the MCU is sent to the IPM module through the optical coupler, but in actual application, it is necessary to consider the protection of the MCU and the rapid generation of high-impedance signals to the IPM module. Therefore, the buffer circuit of IC12 is added to the circuit; the overcurrent feedback signal is connected to the input pin of FTINx after the optical coupler, so as to be able to quickly protect the IPM module. D5, D6, D7, C37, C40 and C43 generate the bootstrap circuit to provide the drive signal of the IPM upper arm switch. >Click to see the original image







>Click to view original image

>Click to see the original image
Figure 3.4 IPM motor drive circuit

3.4 Water level detection circuit

Figure 3.5 is the water level detection circuit of the washing machine. CON4 is connected to the water level sensor. The water pressure generates LC oscillation. The smaller the pressure, the larger the frequency, and vice versa. When the water level is close to zero, the output frequency is about 27.8KHz. This frequency is converted into an analog voltage through the F/V conversion circuit and input to the ADC module in the chip to calculate the water level. The F/V conversion circuit

is generated by IC7. The circuit components R33 and C36 form an input high-pass filter to filter out the DC voltage. The output voltage is determined by R30, C33 and the input frequency. The voltage calculation formula is: Vo = R30 x C33 x Vcc x Fin; where Vcc is +5V and Fin is the input frequency.

>Click to view original image

Figure 3.5 Water level detection circuit

4 System software design

The variable frequency washing machine controller is mainly designed with dual MCU. The two controllers exchange information and system control through serial communication. The SPCE061A panel controller is set as the host and the SPMC75F2413A motor drive controller is set as the slave. The host is responsible for the entire transmission process; the slave is responsible for receiving and executing the commands sent by the host, and needs to respond to the corresponding ACK signal to the host. Relatively speaking. When the user issues the corresponding operation command on the panel controller, the slave is responsible for execution. When an abnormal situation occurs, the slave reports in real time or can be directly detected by the host and use the display circuit to notify the user.

Therefore, the software development of this system includes programs for motor drive, communication format and communication state machine switching, washing machine state machine switching, key scanning and status display; the following will explain the important programs of DMC controller and PANEL controller.

4.1 DC brushless motor driver

The DMC controller is mainly responsible for DC variable frequency motor drive, which can be divided into two parts: voltage control of the inner loop and speed control of the outer loop. The inner loop voltage control is based on the detected motor rotor position (obtained by the Hall element). Since the motor rotor is a permanent magnet structure, the voltage signal output by the microcontroller must correspond to the Hall element signal read. In the actual design example, the timer Timer3 generates a fixed period of 4000Hz interrupt time. In each interrupt program, the Hall element input interface is read and the corresponding voltage H/L and PWM signal are output. This program is implemented with a finite state machine, which distinguishes 3 states: PHSIDLE, PHSHOLD and PHSRUN. In PHSIDLE, the main work is to disable the DMC driver and initialize the control parameters. The PHSHOLD state ensures the generation of the bootstrap voltage, while PHSRUN actually generates a 120-degree square wave signal. The detailed program flow can be referred to as shown in Figure 4.1.

>
4.2 Motor speed calculation and control program

The DC brushless motor of the washing machine is a synchronous motor, that is, the mechanical speed of the motor is synchronized with the magnetic field rotation frequency. Therefore, the actual speed of the motor can be calculated by calculating the pulse width time according to the Hall position signal of the motor, achieving closed-loop speed control. The PDC0 interrupt of SPMC75F2413A is used for phase detection, and the TPM2 timer interrupt timing is used to complete position detection and speed calculation. Figure 4.2 shows the PDC0 and TPM2 interrupt flow.

>Click to view original image

Figure 4.2 PDC0 and TPM2 interrupt flow

PDC0_PDCINT_ISR() is responsible for detecting the pulse width of the Hall component, and TMR2_TPRINT_ISR() is responsible for updating the actual speed value and controlling it when the motor speed changes.

4.3 Serial communication program

The DMC controller and the PANEL controller exchange messages through UART, using the CRC check method. The start, stop and abnormal detection of all communication actions are dominated by the PANEL controller.

The DMC controller stores data in a circular queue, and the serial characters are received and stored in the buffer by interrupt. The DMC controller checks the received serial character command. If the received character group is correct, it responds to the corresponding command to the PANEL controller. If the received command is valid, the Decode_RxStream() program is executed to decode the control command and data, and send an ACK signal to the PANEL controller; on the contrary, if the received command is invalid, a NACK message is sent to the PANEL controller to facilitate the PANEL controller to control and retransmit the message. The program flow chart is shown in Figure 4.3.

>Click to view original image

Figure 4.3 Serial communication program flow

4.4 PANEL controller firmware description
When the "Power" button is pressed, the PANEL controller will start the communication action and try to shake hands with the DMC controller for specific message content. Only when the character group sent back is recognized by the PANEL controller, the user can operate the washing machine; otherwise, it will be judged as a communication abnormality. When the user has selected the washing mode and parameter content, pressing the "Start/Pause" button will start the motor. The system has 4 preset operation programs, and the corresponding washing parameters are shown in Table 4-1:
Table 4-1 Washing program content

>Click to view original image

In the above table, individual parameters can be adjusted separately in P1 program, but the system default values ​​cannot be changed in P0, P2 and P3 programs. For example, when the user only needs to dehydrate the clothes, he only needs to adjust the 7-segment display corresponding to the washing time and the number of washings to no display, and then adjust the required dehydration time, press the start button, and then enter the dehydration mode.

The setting of "pre-setting time" ranges from 3 hours to 9 hours, and the interval of each adjustment is 1 hour. The above functions are executed by timer interrupt in software design. The time setting uses Timer B timer (IRQ2 interrupt), which is set to 8000Hz frequency interrupt. In this program, it is divided into 2 time slices, namely Tick1Func and Tick2Func. The program is shown in Figure 4.4, so the execution frequency of Tick1Func and Tick2Func programs is 4000Hz.

> Figure 4.4 IRQ2 interrupt flow

In the Tick1Func program, in addition to scanning the key input, the contents of the SystemT and SystemF structures are changed according to the pressed key content. SystemT mainly stores the set washing parameter content and updates the SA7Wash structure (for state machine switching), and SystemF is a flag for recording the operation status. When the washing parameters are changed, the estimated washing completion time will be changed and displayed on the 7-segment display. The Tick2Func program is responsible for scanning the display circuit on the circuit, using high-speed sequential display to save IO interface resources. This program also includes prompting the user to add the amount of detergent based on the estimated water volume.

5 Conclusion

The system uses the SPMC75F2413A and SPCE061A microcontrollers of Lingyang Technology Company to complete the control system of the DC variable frequency washing machine. The SPMC75F2413A is an IC dedicated to variable frequency motor control. Its powerful PWM output function makes program development very convenient. In addition to the functions of ordinary single-chip microcomputers, SPCE061A also has functions such as voice recognition and voice recording and playback, which can broadcast some usage status and common sense of the washing machine.

References
[1] Lei Sixiao, Li Bocheng, Lei Xiangli, etc., Principles and Practical Technology of Single-chip Microcomputers - Lingyang 16-bit Single-chip Microcomputer Principles and Applications [M] Xi'an: Xi'an University of Electronic Science and Technology Press
[2] SPMC75F2413A Programming Guide V1.2 Lingyang Technology Co., Ltd.
Reference address:Application of single chip microcomputer in DC frequency conversion washing machine

Previous article:Application design of AC variable frequency air conditioner based on SPMC75F2413A single chip microcomputer
Next article:Application of SPMC65P2404A in smart rice cooker

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号