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
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.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
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 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 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 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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Design single- and multi-position switches using TI Hall-effect sensors
- DRQFN and MQFN welding quality is comprehensively improved
- 【i.MX6ULL】Driver Development 9——Linux IO Model Analysis
- What is the selection method and calculation process of ESD tube? Which forum friend can write out the calculation steps?
- Five Experiences in RF Circuit Design
- What is a combined hydraulic cylinder?
- [MYX-1028X] (V) Serial communication Demo
- EEWORLD University Hall ---- Fundamentals of Circuit Theory by Zhao Jinquan, Xi'an Jiaotong University
- Anxinke NB-IoT module review - some speculation about the failure of CH340
- A low-cost differential audio signal transmission solution for automotive applications