With the continuous development of network technology and communication technology, as well as the continuous improvement of people’s living requirements, the realization of home intelligent remote control has become an inevitable trend. People are gradually pursuing the intellectualization and modernization of family life. People want to know the use of household electrical appliances at any time, and complete the intelligent control operation of household terminal through remote intelligent controller.
With the rapid development of science and technology and communication technology, it has become a reality. This paper chooses a way based on remote control and using AT89S51 microprocessor, and introduces the hardware design of household appliances control system. With the rapid development of modern science and technology and the continuous improvement of family living standards, people are gradually pursuing the intellectualization, modernization and digitalization of family life. People want to know the use of household electrical appliances at any time, and complete the intelligent control operation of household terminal through remote intelligent controller, such as the control of lighting equipment switch or the regulation of intelligent household appliances, and when.
When an emergency occurs at home, we can get information feedback at the first time and have been responded to in time. These people’s hopes have become reality with the rapid development of science and technology and communication technology. As a result, people’s life has become more and more comfortable and convenient. The smart home system has used many modern frontier technologies to make it intelligent, networked, modernized, and realize information sharing. It has openness and compatibility.
Home intelligent controller is an important part of home network. It can centralize the control of various household appliances in the home and obtain feedback on the operation of household appliances. AT89S51 single chip computer is a kind of low-power single chip computer with Flash program memory.
The so-called on-line programming (ISP) means that it allows the single chip chip chip to implement fixed-line and erase operations without leaving the circuit board or equipment. The on-line program brings great convenience to the research and development and use of single chip computer users. The clock oscillator circuit is the necessary control signal for AT89S51 single chip computer to work. The internal circuit of AT89S51 single chip computer works strictly in dark time sequence under the control of the clock signal. Therefore, the frequency of the clock directly affects the speed of MCU, and the quality of the clock circuit directly affects the stability of the MCU system. There are two kinds of clock circuits in common use, one is internal clock mode, the other is external clock mode. This design adopts internal clock mode. AT89S51 has a high gain inverted-phase amplifier for the oscillator. Its input terminal is the chip pin XTAL1 and the output pin is XTAL2. The two pins are spanned by quartz crystal and fine-tuning capacitor to form a stable self-excited oscillation circuit. The internal clock mode circuit of AT89S51 is shown in Figure 1. The typical values of capacitance C1 and C2 in the circuit are usually chosen as 30pF. The size of the capacitor affects the frequency, stability and starting speed of the oscillator. The frequency range of crystal oscillation is usually 1.2~12MHZ. The higher the frequency of crystal, the higher the clock frequency of the system, the faster the speed of the single chip computer. But in turn, the faster the speed of the memory is, the higher the technical requirement of the printed circuit board is, and the less parasitic capacitance between the lines is required. Crystals and capacitors should be installed as close as possible to the microcontroller chip to reduce parasitic capacitance and better ensure the stable and reliable operation of the oscillator. In order to improve the temperature stability, a capacitor with good temperature stability should be adopted. AT89S51 usually chooses quartz crystal whose oscillation frequency is 6 MHZ or 12 MHZ. The highest frequency of AT89S51 chip can reach 33 MHZ. The reset pin RST is connected to the reset circuit through a flip flop. The flip-flop is used to suppress the noise in the S5P2 of each machine cycle; the output level of the flip-flop is sampled once by the reset circuit before obtaining the signal needed for the internal reset operation. The reset circuit usually adopts two ways: power-on automatic reset and button reset. This paper adopts power-on automatic reset.
The simplest power-on automatic reset circuit is shown in Figure 2-5. For CMOS MCU, because there is a pull-down resistance inside the RST pin, the resistance R can be removed, and the capacitance C can be selected as 10 muF. Power-on automatic reset is a short high-level signal that charges capacitor C to RST pin through external reset circuit. This signal gradually falls back with the charging process of VCC to capacitor C.
That is to say, the high-level duration on RST pin depends on the charging time of capacitor C. Therefore, in order to ensure the reliable reset of the system, the high level of RST pin must be maintained for a long enough time. When we use the serial port of MCU and PC for serial communication, we usually need to convert two different levels. As we all know, the practical level of TTL ( 5V is high level, low level is 0V) is used by MCU, while the serial port of computer is RS-232C level, in which the high level is – 12V and the low level is 12V. It should be emphasized here that the RS-232C level is negative logic level.
The level conversion chip we usually use is MAX232 chip produced by American Credit Corporation, which can directly complete the conversion of the above two levels. In order to enrich your knowledge, we can also use discrete components in the absence of MAX232 to complete the TTL to RS-232 level conversion. MAX232 converts TTL level from 0V and 5V to 3V-15V or-3V-15V.
Analysis of figure 3-6 circuit can help us to analyze and understand the principle of MAX232. First, when TTL level TXD sends data, if the low level 0 is sent, Q1 will be turned on at this time, and the second leg of J1 will turn to high level from idle low level (if PC interrupts if it receives, then interruption) will be satisfied. When sending high level 1, TXD is high level, Q1 is cut off, because the internal resistance of the PCR XD is high, thermostatic element while PCTXD is – 3V to – 15V at ordinary times.
By D 1 and R1, the PCR XD is lowered to – 3V to – 15V. At this time, the computer receives 1. Conversely, when the PC transmits data, the MCU receives the signal. When PCTXD is low-level-3V to-15V and Q2 is cut off, the RXD end of MCU is raised to about 5V by R4, which is high level; when PCTXD is high, Q2 is turned on and RXD is pulled down by Q2 to low level, which completes the conversion between levels. The communication circuit between MCU and PC made up of MAX232.