1 Introduction
At present, most of the rice cookers on the market adopt mechanical or fixed power heating methods, which have low energy utilization rate and single function, making it difficult to meet people's growing living needs. Therefore, it is very necessary to develop a fully functional, safe and reliable microcomputer rice cooker. Rice cookers have gone through many stages from the mechanical principle to the current smart rice cooker. The rice cooker takes advantage of high technology and focuses on delicious cooking, making the products more diversified and fashionable. Now it has three types and ten different styles: microcomputer, computer and machine. Although the mechanical rice cooker has its advantages in terms of price, it is difficult to meet people's high-quality needs for modern life in other aspects. Microcomputer or computer-controlled smart rice cookers meet the requirements of modern people. The humanized interface design allows people to see the current working status at a glance, making you feel more at ease. All cooking processes are automatically controlled by computers, and most smart rice cookers use space-based The "black crystal" liner is super hard, wear-resistant, and long-lasting in appearance. All these features are in line with modern people's concepts of time-saving, labor-saving, and durability.
This article mainly introduces the use of SPMC65P2404A chip to control the process of the rice cooker. SPMC65P2404A is an 8-bit microcontroller from Sungyang Company. The maximum operating frequency is 8MHz, the operating voltage is 2.5V~5V, and it has 192 bytes of RAM and 4K bytes of OTP. ROM, has 23 programmable IO ports, 8-channel 10-bit A/D converter, 2-channel 8-bit timer/counter, 2-channel 16-bit timer/counter, 1 12-bit PWM output port, low voltage, power on , watchdog, external signal, error address reset, and has a buzzer output port.
2 Overall Solution Introduction
The principle block diagram of the intelligent rice cooker control system designed using Sungyang 8-bit MCU is shown in Figure 2-1. The function mode is selected through buttons, and the display circuit completes the display of the current status and timing time; the temperature is measured through the temperature sensor. Sampling; through the control of MCU, the relay is finally controlled to control whether to heat the heating plate. The power supply part completes the supply of 5V power to the microcontroller system and peripheral circuits, and heats the heating plate.
Figure 2-1 Control system block diagram
3 System hardware design
1. The hardware schematic diagram of the rice cooker controlled by the microcontroller SPMC65P2404A is shown in Figure 3-1. It includes the key input part, temperature detection input circuit, reset and crystal oscillator circuit, PA6, PA7 completes the temperature detection of the top cover and chassis, PA5 completes the control of the relay, and SPMC65P2404A is the core part of the system.
Click to see the original image
Figure 3-1 Circuit schematic diagram of rice cooker.
Introduction to chip characteristics.
SPMC65P2404A is an 8-bit microcontroller from Sungyang Company. The maximum operating frequency is 8MHz, the operating voltage is 2.5V~5V, and it has 192 bytes of RAM and 4K bytes of OTP ROM. There are 23 programmable IO ports, 8-channel 10-bit A/D converter, 2-channel 8-bit timer/counter, 2-channel 16-bit timer/counter, 1 12-bit PWM output port, with low voltage, power on, and watch Watchdog, external signal, error address reset, and has a buzzer output port... Using these resources, the functions of the rice cooker can be realized.
2. Display circuit:
The display circuit consists of a common anode digital tube and 10 LEDs. The display status of the corresponding LED and digital tube is illuminated through the bit selection of the microcontroller and the data sent. The circuit schematic diagram is shown in Figure 3-2:
Click to see the original image
Figure 3-2 Display circuit
3. Power supply circuit:
The power supply part provides a +5V DC regulated source for the microcontroller, and supplies power to the relay through the +14V voltage after voltage reduction, rectification, and filtering, and controls the conduction of the transistor emitter. Whether to control the working status of the relay. The schematic diagram of the power circuit is shown in Figure 3-3
Click to see the original image
Figure 3-3 Power supply circuit
4. Temperature acquisition part circuit diagram:
J2 and J3 are the two interfaces of the temperature sensor. J2 and J3 are the interfaces of the top cover and chassis temperature sensors respectively. The signal detected by the microcontroller is actually separated from the temperature sensor. Because the resistance value of the temperature sensor will decrease as the temperature rises, the voltage value of the voltage dividing resistor indirectly reflects the temperature at a certain moment. The circuit schematic is shown in Figure 3-4:
Figure 3-4 Temperature sensor circuit
4 System software design
4.1 The main program flow
is to roughly design the entire system from prototype analysis. The input of the entire system includes 2 temperature sensors and 5 buttons; the output includes 2-digit seven-segment digital tubes, 10 light-emitting diodes, Relay control signals, etc. According to the control function, the program is designed into several main modules. The main flow of the program is shown in Figure 4-1: Click to see the original picture 4-1 Main flow chart of the program
4.2 Subroutine introduction
1. Diagnostic subroutine
The diagnostic program mainly collects temperature and determines whether the sensor is good. It mainly detects 2 temperature sensors continuously for 20 times. If the measured data is not within the range (temperature range: -10℃~160℃ ), it indicates that the sensor is short-circuited or open-circuit error, the digital display "E", and the key operation is prohibited.
2. Keyboard scanning subroutine:
The program scans the keyboard every cycle. If a key is pressed, the key value is temporarily stored. If the key value scanned five times in a row is the same, it is considered a stable key value.
3. The system has a total of 5 buttons. In different states, each button only needs to be pressed once to be effective. The five keys of the system are connected to PA1, PA3, PA2, PA0, and PA4. If the key value is valid, the corresponding bit of the return value is 0, otherwise the corresponding bit is 1.
4. Temperature acquisition subroutine
The thermistor has high sensitivity. In order to prevent interference and other reasons from causing the measured temperature value to change too fast and causing frequent actions of the control components, the temperature acquisition adopts the sliding average filter method. That is, continuously collect three data on the same channel and take the middle value.
5. Display subroutine
The system has a total of 2 seven-segment digital tube displays and 10 light-emitting diode displays. The digital tube mainly has 6 states that need to be displayed: standby state, error display, rice cooking, keeping warm, cooking and timer display. LEDs indicate selected function, start and keep-warm status. The function display needs to be in a round-robin manner. Before pressing the start button, the start light flashes. After entering the keep warm state, the keep warm indicator light turns on. The LED display program consists of a bit code scanning subroutine and a digital display status selection subroutine.
5 References
[1] Xiao Jianhua, Jing Shunlin. Application and prospects of fuzzy control in home appliances. Journal of Wuyi University (Natural Science Edition), 2001
[2] Gu Yong. Fuzzy control and its application. Modern Physics Knowledge, 1998.
Previous article:Intelligent temperature control meter with communication port based on microcontroller
Next article:Heat source automatic tester based on microcontroller control
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
- STEVAL-MKSBOX1V1 (SensorTile.box) firmware download via USB
- Gallium nitride is a key technology for realizing 5G
- STM32 output 4-20MA or 0-10V circuit sharing
- LIS2MDL array PCB engineering and code information for magnetic nail navigation AGV car
- Live Review: Rochester Electronics Semiconductor Full-Cycle Solutions (including videos, materials, Q&A)
- How to understand this parameter in the MOS tube specification?
- Why is it necessary to use a four-pin Kelvin connected resistor for current detection?
- Purgatory Legend-12864 LCD War
- Live Review: How to Design High-Performance Servo Drives Using Infineon IGBT7
- [Raspberry Pi 4B Review] + ARIA2 Remote Download Server Construction