Application of HT46R47 in electric kettle

Publisher:JoyfulSunflowerLatest update time:2012-03-12 Source: 微计算机信息 Keywords:HT46R47 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Preface:

At present, single-chip microcomputers are widely used in home appliances, industrial production and other fields. In order to meet the different requirements of different products for single-chip microcomputers, semiconductor manufacturers have produced single-chip microcomputers of various specifications. HT46R47 is a streamlined single-chip microcomputer produced by Holtek. It has been widely used for its low price, wide operating voltage range, and strong anti-interference ability. This article introduces a method of controlling the operation of an electric kettle using HT46R47 as the control chip. The actual operation shows that the scheme is safe and reliable and can fully meet the actual needs.

1. Features of the HT46R47

The HT46R47 is an 8-bit high-performance RISC microcontroller produced by Holtek. It is available in two packages: DIP/SOP-18. It is specially designed for products that require A/D conversion, such as sensor signal input. Due to its low power consumption, flexible I/O port use, selectable oscillation type, and pause and wake-up functions, this microcontroller can be widely used in systems such as A/D conversion with sensors, motor control, industrial control, and consumer products. Specifically, the HT46R47 microcontroller has the following resources [1]:
● Up to 13 I/O ports, whose directions can be set by software;
● 2048×14 program memory ROM;
● 64×8 data memory RAM;
● Dedicated watchdog timer;
● 6-layer hardware stack;
● 4-channel 9-bit resolution (8-bit accuracy) A/D converter;
● 1 channel (6+2)-bit PWM (pulse width adjustable) output channel;
● Built-in crystal and RC oscillator circuit;
In terms of programming application, it has only 63 instructions, which is simple and easy to learn and master. Holtek provides the HT-IDE3000 development tool, which can be used for simulation debugging.

2 Working conditions of electric kettle

For conventional electric kettles, as long as the power is turned on, it will start heating until the water boils and then generate a sound alarm through steam. This design has the following shortcomings: 1. If there is no water in the kettle, it will continue to heat when the power is turned on by mistake, which is easy to cause accidents. 2. When it only needs to be heated to a certain temperature below the boiling point, the sound alarm signal cannot be given in time. 3. It cannot stop working automatically after the water is heated and boiled.
In view of the above shortcomings, in this design, the HT46R47 microcontroller is used as the control chip to manage the working status of the entire electric kettle, forming a closed-loop control system, and a button and a three-digit digital tube display are added. Compared with conventional kettles, its working status has the following characteristics: 1. There is a button that can be used to set the desired heating temperature. After power-on reset, the initial temperature is set to 20 degrees. Each time the button is pressed, the temperature setting value will increase by 1 degree, and the entire temperature setting value will cycle between 20-100 degrees. 2. This button also has the function of starting the electric kettle to work. Each time the power is turned on, the electric kettle will only start heating after the button is pressed. This can prevent the electric kettle from heating up when the power is turned on by mistake, causing an accident. 3. When the temperature reaches the set temperature, the HT46R47 microcontroller will control the heating to stop and give a sound prompt through the buzzer. 4. The three-digit digital tube displays the current set temperature when the temperature is set, and displays the actual temperature of the water in the electric kettle in real time at other times.

3 Hardware Circuit Design

The circuit diagram of the control system is shown in Figure 1 [2]. The display part is controlled by PA0-PA6 and PB1-PB3 of HT46R47. PA0-PA6 outputs the displayed segment code, and PB1-PB3 performs bit selection control. The buzzer is controlled by PA7. Since the heating part uses 220 volts of strong electricity, the switch uses a bidirectional thyristor BT136. Through the dedicated isolation and driver chip MOC3041, the PD0 of HT46R47 is used to control the on and off of BT136. Resistors R5, R10 and button S1 are connected to the analog-to-digital conversion input port AN0 of HT46R47 for temperature detection and button input. The following mainly introduces the working principle of this part of the circuit.


Figure 1 Hardware circuit diagram

In order to save I/O ports, the key input and temperature detection share the analog-to-digital conversion input port AN0. R5 is a common resistor with a fixed resistance value. R10 is a thermistor, whose resistance value changes with the ambient temperature. It is used to detect the temperature of the water. When the key is not pressed, when the temperature changes, the resistance value of resistor R10 changes accordingly. After the voltage division of R5 and R10, the voltage at the AN0 port also changes. The microcontroller samples the voltage at the AN0 port and obtains the current temperature of the water by looking up the table, thereby achieving the purpose of detecting the temperature. When the key is pressed, since the AN0 port is directly connected to the ground, when the microcontroller samples the voltage at the AN0 port, no matter what the temperature is, the sampled value will be 0, so that it can be confirmed that the key is pressed and the key processing can be performed. When selecting the parameters of R5 and R10, it should be noted that when the temperature changes within its working range, the voltage at the AN0 port also has a suitable range of change.

4. Software

The software implementation of this system does not require difficult techniques and algorithms, but as a practical system, it has high requirements for its reliability. In particular, in the hardware circuit design, in order to save I/O ports, the key input and temperature detection circuit share the analog-to-digital conversion input port AN0. In this way, the temperature detection will be seriously affected at the moment when the key is disconnected and closed. In order to eliminate this effect, the temperature sampling part in the program adopts the arithmetic mean filter of the elimination method to ensure the accuracy of the temperature detection value. The direction of the I/O port of HT46R47 is programmable. Its direction should be set correctly in the program to ensure the normal operation of the microcontroller. The detailed program list is omitted here. Figure 2 shows the main program flow chart, showing that part of the control is realized by timer interrupt.

Figure 2 Main program flow chart

5 Conclusion

The actual operation shows that this design is safe, reliable, small in size, easy to install, and can meet the various requirements proposed at the beginning of the design. For similar temperature control systems, such as air conditioners, refrigerators, etc., as long as the corresponding parameters of the thyristor are selected according to the power requirements, the software and hardware can be slightly modified.

References:
[1] Holtek Semiconductor Co., Ltd. HT46R47/HT46C47 8-bit A/D Microcontroller 2003-4
[2] He Limin Microcontroller Application System Design [M] Beijing University of Aeronautics and Astronautics Press 1990-1

Keywords:HT46R47 Reference address:Application of HT46R47 in electric kettle

Previous article:Design of data acquisition system based on USB bus and Aduc831 single chip microcomputer
Next article:Application of single chip microcomputer in serial communication and ICP programming

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号