Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

home appliances

Automatic drying rack solution


Design of automatic drying rack system based on STC89C52 single chip computer


Although many domestic manufacturers are producing automatic drying racks, they are usually installed inside the balcony. The vertical lifting of the drying rack or the function of heating and drying are realized through the control of the circuit. It can be said that the automatic drying rack has not yet been achieved. Clothes or smart drying function. Based on this, this paper takes STC89C52 single-chip microcomputer as the control core, adopts photoresistor and new temperature and humidity sensor SHT11, and designs a design that can automatically detect darkness, high temperature weather, and rain. automatic drying rack. The designed automatic drying rack has the functions of timing and appointment, and can preset the light intensity and humidity value, which can meet the drying conditions of different climates and regions. All the user needs to do is put the clothes on the hanger, and then enjoy a very good drying experience by setting the button.


1. Structural design of automatic drying rack system


In order to install the automatic drying rack into the balcony and satisfy all the functions of the control system, the mechanical structure diagram of the drying rack is designed as shown in Figure 1. The whole structure is composed of 10 parts: 1: screw, 2: sensor, 3: fixed bracket, 4: bearing seat, 5: drying rack, 6: roof, 7: slider, 8: stepping motor, 9: wall , 10: Controller.


图 1 自动晾衣架的机械结构图


The automatic clothes hanger control system (controller) sets the corresponding working mode through the button, starts the sensor to collect the signal, and sends the collected signal to the single-chip microcomputer, and the single-chip microcomputer processes the received signal and displays it on the display screen in real time. Finally, it is sent to the motor driver to control the motor to realize the expansion and contraction of the hanger. The system consists of five functional modules, which are power supply module, signal acquisition module, button setting module, display module and motor operation module, as shown in Figure 2, where the signal acquisition module includes the collection of light intensity and temperature and humidity; the motor The transfer module includes a motor driver, a stepper motor, a transmission mechanism and a clothes hanger.

图 2 控制系统结构框图


2. Hardware circuit design of automatic drying rack


The minimum system of a single-chip microcomputer refers to a system that can work with a single-chip microcomputer composed of the fewest components. For 51 series microcontrollers, the minimum system should generally include: microcontrollers, power circuits, crystal oscillator circuits, and reset circuits. The CPU of the design control system adopts STC89C52 single-chip microcomputer, which is a low-voltage, high-performance single-chip microcomputer. The crystal oscillator circuit adopts 11.0592MHz, and two 10PF ceramic capacitors assist the start-up; the reset circuit adopts button reset. The schematic diagram is drawn by Proteus, and its default microcontroller power ground is connected.


The control system has a total of nine buttons with different functions, and each button is an elastic button. The functions of each button are addition, subtraction, setting, manual/automatic mode switching, recycling clothes hanger, timing mode on/off, clothes hanger extension, high temperature mode on/off, which are respectively related to P2.0, P2.1, P2.2, P2.3, P2.4, P1.5, P1.6, P1.7 are connected, and the other end is connected to the ground, thus forming a closed loop.


The display circuit uses LCD1602, and the data transmission ports D0 to D7 of LCD1602 are respectively connected to P0.0 to P0.7 of the single-chip microcomputer, and the RS terminal, RW terminal, and EN terminal of LCD1602 are respectively connected to P2.6, P2.5, and P2.7 of the single-chip microcomputer. mouth. LCD1602 adjusts the contrast of the display screen by connecting a 1kΩ potentiometer.


The temperature and humidity detection circuit uses the SHT11 sensor, and the communication with the microcontroller adopts the IIC bus protocol. The clock line SCK and the data line DATA are respectively connected to the P1.0 and P1.1 ports of the microcontroller, and a resistor R2 is pulled on the data line ( 4.7kΩ) clamp the potential at a high level. The commonly used photoresistor is selected for the light collection circuit, and the analog signal is converted into a digital signal acceptable to the single-chip microcomputer through the A/D conversion chip PCF8591. Connect the photoresistor to the AIN0 terminal of PCF8591, so that the power supply, ground and photoresistor form a voltage divider. The clock line SCL and data line SDA of PCF8591 are respectively connected to the P1.2 and P1.3 ports of the microcontroller. Changes in the resistance of the photoresistor are caused by changes in light intensity, thereby causing small changes in voltage to be sent to the analog input of PCF8591, and the relevant data is read by the IIC bus protocol microcontroller for processing.


In order to accurately realize the extension and retraction distance of the drying rack, this system uses a stepping motor, its model 42BYGH 1.8° two-phase stepping motor, which is driven by a special stepping motor driver. If you need to control the motor, in addition to powering the driver, you only need to connect the common terminal to +5V, the pulse terminal and the direction terminal to the I/O of the single-chip microcomputer, and the pulse terminal and the direction terminal are respectively connected to P3.2 and P3.3 of the single-chip microcomputer. . This design is not only convenient to connect but also easy to maintain. If the motor module fails, you only need to check whether the I/O connection, driver and stepping motor are normal.

自动晾衣架方案


3. Software design of automatic drying rack


The main program of the automatic drying rack control system is mainly composed of five parts. When the system is powered on, it first performs initialization operations, and then completes the five items of temperature, humidity and light collection, temperature, humidity and light processing, data and function display, button processing, and hanger expansion and contraction processing. Function. The temperature, humidity and light processing part, that is, the judgment of whether the drying conditions are met: compare the collected temperature, humidity and light with the user's preset value, and judge whether it exceeds the set upper and lower limits. If it exceeds and the hanger is extended, Take the hanger back. The data and function display part mainly realizes the display of humidity and light intensity and the display of some function modes. The button processing part mainly realizes the user's setting of system parameters and selection of function modes, and combines with the display part to achieve a friendly human-computer interaction effect.


The automatic drying rack control system considers five drying modes according to actual needs: manual mode, automatic mode, timing mode, appointment mode and sun protection mode. When the manual mode is turned on, the sensor will not participate in the control of the hanger. The retraction and extension of the clothes hanger are directly controlled by the control button. When the automatic mode is turned on, the return of the hanger is completely determined by the sensor, that is, the priority of the sensor is greater than that of the control button. When the external weather conditions do not meet the preset conditions, even if the clothes hanger is manually released, the single-chip microcomputer will immediately take it back. If the manual/automatic mode button is pressed again at this time, the manual flag position is 0, and the manual mode can be switched. When the timing mode is turned on, the MCU will start timing countdown, but when the automatic mode is turned on, the priority of the sensor control is higher than that of the timing mode, so before turning on the timing mode and the automatic mode at the same time, it is necessary to judge whether the drying conditions of course meet the preset values, if If you are not satisfied, the hanger will be retracted immediately even if the timing mode is turned on. In our life, we may encounter the situation that the time in the morning is very tight, so we need to use the appointment mode, that is, wash the clothes at night and hang them on the automatic drying rack and set the appointment time. When the appointment time is up, the hanger will automatically extend. out to dry clothes. The timing method adopted by the appointment mode is also a timer interrupt, and the appointment mode can be superimposed with the timing mode. To ensure safety, a protective measure is set here, that is, the hanger will only be extended when the hanger is not extended, the appointment countdown is zero, and the appointment mode is turned on. In order to prevent the clothes from being exposed to the sun, this design adds an anti-exposure mode, which is suitable for summer. This mode needs to collect light intensity and temperature. When the conditions meet a certain temperature (set 36°C) and light intensity (set 95), the microcontroller will make a judgment and retract the hanger.


Considering the possibility of human error in the actual application process, such as pressing the hanger release button twice in a row or pressing the hanger retract button again when the hanger is retracted, these misoperations may damage the hanger. Therefore, an anti-collision protection is designed in the program. When the hanger is out, it can only be retracted; when the hanger is retracted, it can only be out, which greatly increases the service life of the hanger.


Summarize


According to the designed mechanical structure of the automatic drying rack and the software and hardware of the control system. The collected signals, that is, temperature, humidity and light intensity are calibrated, and the sensor meets the requirements of the automatic drying rack system. At the same time, the display function, button function and various drying modes of the drying rack have been debugged one by one, which meets the design requirements.


The designed automatic drying rack based on STC single-chip microcomputer control realizes the motor control by judging the temperature, humidity and light intensity, so as to drive the mechanical structure to work to achieve the purpose of drying clothes. The designed automatic drying rack has five drying modes, which can meet the needs of different groups of people, different clothes materials, and different seasons. The whole control system adopts STC89C52 single-chip microcomputer with low cost and easy to use, which has certain reference value for the popularization of automatic drying rack.


The above are the design details of the automatic clothes hanger system based on the STC89C52 microcontroller introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing the MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions for Jieli, Ankai, Allwinner, Realtek, etc., and also develop BLE Bluetooth ICs, dual-mode Bluetooth modules, wifi modules, and IoT modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.

  • TOP