The principle and method of developing DC variable frequency washing machine using SPMC75F2413A single chip microcomputer

Publisher:灵感驿站Latest update time:2014-10-27 Source: 21icKeywords:SPMC75F2413A 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 drying are completed automatically. The controller usually has several washing programs for users to choose from for different clothes. Frequency conversion control is 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 Company.

2 Chip Features
    SPMC75F2413A is an embedded 16-bit microcontroller for variable frequency drive developed by Sunplus Technology Co., Ltd. It is suitable for variable frequency motor drive, power supply, home appliances and in-vehicle fan control systems.
Features include:
◆ Sunplus 16-bit u'nSP processor (ISA 1.2)
◆ Operating voltage: 4.5V ~ 5.5V
◆ Maximum operating speed: 24MHz
◆ Operating temperature: -40 ℃ ~ 85 ℃
◆ On-chip memory:
   32KW (32K×16) Flash
   2KW (2K×16) SRAM
◆ Phase-locked loop circuit based on clock generation module
◆ Watchdog timer
◆ 10-bit analog/digital converter
   8-channel input
   10us (100kHz) conversion time
◆ Serial communication interface
   Universal Asynchronous Serial Communication Interface (UART)
   Standard Peripheral Interface (SPI)
◆ 64 (QFP80) / 53 (QFP64, SDIP64) general-purpose input and output pins
◆ Power management
   2 low-power modes: Wait/Standby
   Each peripheral can be powered independently
◆ Two compare match timers
◆ 5 16-bit general purpose timers
   2 PWM outputs for driving motors (complementary 3-phase 6-way PWM outputs) 
   2 for speed capture
   1 for speed feedback loop
◆ Center or edge PWM output
◆ PWM output protection through external error protection pin
◆ Programmable dead time control ◆
PWM service and error interrupt generation
◆ Ability to drive AC induction motors and DC brushless motors
◆ Embedded online simulation function (ICE)

3 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 3-1.

Figure 3-1 Components of a variable frequency 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 the 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 drive mode.

4 System Hardware Design
    The system control includes two parts: DMC control board and PANEL control board. The following mainly introduces the hardware design of DMC control board.
4.1 Power supply
    circuit Figure 4-1 shows the EMI power filter and single-phase full-bridge rectifier circuit. The AC power input connector is CON1, and the voltage is 220VAC. The power input end passes through the surge absorber ZNR3 to avoid excessive voltage surges from damaging the device. C8 and C12 are connected in series to the ground point, which can usually also be connected to the housing. The output DC voltage can be obtained after rectification by the full-bridge rectifier DB1 and filtering by C13.


Figure 4-1 EMI power filter

    Figure 4-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 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 through linear regulator IC20 to supply the working voltage of digital circuits such as SPMC75F2413A.

 
Figure 4-2 DC/DC power supply circuit

4.2 MCU control
    circuit Figure 4-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.


Figure 4-3 MCU control circuit

4.3 IPM motor drive
    circuit Figure 4-4 is an IPM motor drive circuit. Because the driven motor is a three-phase variable frequency, the microcontroller generally needs to be able to output 6 PWM signals. SPMC75F2413A can complete this function in chip hardware through MCP and PDC timer modules. The IPM module integrates the drive circuit and overcurrent detection circuit. The PWM output signal of the MCU is sent to the IPM module through the optocoupler. However, 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 and the normal drive of the optocoupler. 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 optocoupler, 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. [page]


Figure 4-4 IPM motor drive circuit

4.4 Water level detection
    circuit Figure 4-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.


Figure 4-5 Water level detection circuit

5 System Software Design
    The inverter 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.
5.1 DC brushless motor driver
    The DMC controller is mainly responsible for DC inverter 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 reading 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, and PHSRUN actually generates a 120-degree square wave signal. The detailed program flow can be referred to as shown in Figure 5-1.


Figure 5-1 State switching process

5.2 Motor Speed ​​Calculation and Control Procedure
    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 5-2 shows the PDC0 and TPM2 interrupt flow.


Figure 5.2 PDC0 and TPM2 interrupt flow

    PDC0_PDCINT_ISR() is responsible for detecting the pulse width of the Hall element, and TMR2_TPRINT_ISR() is responsible for updating the actual speed value and controlling it when the motor speed changes.
5.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 by interrupts and stored in the buffer. The DMC controller checks the received serial character commands. 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; otherwise, 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 5-3.


Figure 5-3 Serial communication program flow

5.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 5-1:


Table 5-1 Laundry program contents

    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 spin 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 spin time, press the start button, and then enter the spin mode.
    The setting of "preset 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 5-4, so the execution frequency of Tick1Func and Tick2Func programs is 4000Hz.


Figure 5-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 content of the pressed keys. SystemT mainly stores the contents of the set washing parameters and updates the structure of SA7Wash (for state machine switching), and SystemF is a flag for recording the state of the operation. 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 required based on the estimated amount of water.

6 Conclusion
    This system uses the SPMC75F2413A and SPCE061A microcontrollers from Lingyang Technology Company to complete the control system of the DC variable frequency washing machine. 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 microcontrollers, 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.

Keywords:SPMC75F2413A Reference address:The principle and method of developing DC variable frequency washing machine using SPMC75F2413A single chip microcomputer

Previous article:Design solution for smart rice cooker
Next article:Media Processor Design for Internet TV Applications

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号