- Home >> News >> Blog articles >> Internet of things
Intelligent curtain design and development
With the development of social economy and science and technology, along with the refinement of the Internet of Things industry chain, the corresponding market will be further subdivided. With a lot of convenience, the smart home industry is more and more popular with people. In some high-end residential areas, we can find that smart home systems provide users with safer and smarter services, such as smart lighting scene control, security alarms, etc. At present, the curtains on the market are mostly controlled by gesture control, voice control or APP remote control. Some scholars have also carried out research on the design of intelligent curtains, such as the remote control of curtain opening and closing through serial port multi-computer communication, and the remote control of curtains through infrared remote control. The system can realize automatic control of curtains. These curtains need human interference. The smart curtains designed in this paper are designed to meet the needs of lighting and darkening in the home environment. The autonomous control system replaces human control, making the home design more intelligent and more humane. Compared with other products, the smart curtain based on single-chip microcomputer has the advantages of simple structure, low price and good robustness, which is conducive to marketization.
1. Structure and performance index of intelligent curtain system
The front end of the system uses a photosensitive sensor, which completes the data collection of external light through the photosensitive sensor, and converts the collected light intensity data into electrical signals through A/D conversion; the back end uses a single-chip microcomputer as the system control platform. The information after D conversion acts on the motor drive and the motor, so as to achieve the effect of independent control according to the intensity of the external light, and adjust the indoor light intensity.
Combined with this mechanical structure and control algorithm, the system meets the following performance indicators: The timeliness of the system's autonomous control is maintained within 5s, which meets the requirements of today's industrial production. Data show that the human eyes feel very comfortable when the brightness is below 3500 lumens. Smart curtains can realize autonomous control by setting parameter values, and maintain the indoor light intensity within the range of 3400-3600 lumens, which meets the needs of people at 3500 lumens. Lumens of light intensity feel the most comfortable conditions, so that users can always maintain a comfortable experience.
2. Hardware design of intelligent curtain system
2.1 Analysis of photosensitive sensor
A photosensitive sensor is a sensor that uses a photosensitive element to convert a light signal into an electrical signal, and its sensitive wavelength is near the wavelength of visible light. Photoresistors, phototransistors, and ultraviolet sensors are the most common photosensitive sensors. For simple design and low cost, this system uses a photoresistive sensor. The photoresistive sensor provides the front-end data source for the system through the detection, control and conversion of light signals. The photosensitive sensor is to use the principle that the photoresistor is affected by the light intensity and the resistance value changes to send an analog signal of the light intensity. When the light changes from strong to weak, the resistance value changes from small to large. It can sense the light and dark changes of light, output a weak electrical signal, and process it through the amplifier circuit. When the light intensity is higher, the current of the photoelectric tube is also greater. When the current passes through a resistor, the voltage at both ends of the resistor is converted into a voltage of 0~5V that can be accepted by the digital-to-analog converter of the collector, thus providing a voltage for the single-chip A/D Transformation provides source data. Because the photosensitive sensor has the characteristics of simple structure, small size, high sensitivity and low price, it can effectively reduce the cost of smart curtains while ensuring the user experience effect, and has good social value.
2.2 SCM system analysis
The AVR single-chip computer has strong computing power, the instruction system is streamlined and efficient, and has the advantages of fast speed. However, the programming of the AVR single-chip computer has high requirements on the environment and requires a specific environment, and its first 16 registers cannot deal with immediate data. Poor sex.
The PIC single-chip microcomputer runs fast, can work under low voltage, and has low power consumption, but its special registers are scattered in four address ranges, and the programming is more complicated. STM single-chip microcomputer has the advantages of high operating frequency and fast operation speed, but the cost is very high, and the purchase cost exceeds one hundred yuan each.
The 51 single-chip microcomputer is also called a microprocessor. Compared with other single-chip microcomputers, one of the most significant advantages is that it can not only process a certain bit of some special function registers on the chip, such as transmitting, setting, clearing, and testing. etc. It can also carry out bit logic operations, complete functions and easy to use.
The system performance of the 51 single-chip microcomputer can meet the requirements of data acquisition and time precision, and the production conditions are mature and the product source is stable. The 8-bit 80C51 single-chip microcomputer has multi-channel A/D converters and high-speed input/output components on-chip, and has strong interrupt processing and real-time processing capabilities. Simple induction,
51 MCU has the following characteristics:
(1) Strong processing performance, fast running speed, low voltage, low power consumption; (2) Simple system structure, strong control performance; (3) Strong environmental adaptability and good robustness; (4) Low price.
Based on the comparison of the characteristics of the above several single-chip microcomputers, the 51 single-chip microcomputer is used as the core of the control platform of the intelligent curtain. The 51 single-chip microcomputer processes the data, sets the control function instructions, and acts on the single-chip microcomputer drive, so as to efficiently and accurately control the external input and output devices, meet the performance indicators of the intelligent curtain control system, and make the system self-adaptive in different natural environments capabilities, enhance the stability of product use, and enhance user experience. Low production costs can ensure the marketization of smart curtains.
3. Software Design of Intelligent Curtain System
The software programming is carried out on the built hardware platform, and the system adopts C language based on 51 single-chip microcomputer for programming. The biggest advantage of C language is "flexibility". Various calculation methods, rich data types, less restrictions in program design, relatively free play, and easy maintenance and modification. The disadvantage is that it is often error-prone because it is too free.
The C language initializes the system first, paving the way for the system to collect and process data later. The C language drives the photoresistor sensor to collect light data by calling functions, and converts the analog light data into digital electrical signals through A/D conversion, laying the foundation for later data processing. Convert the collected digital electrical signals into 01 signals that can be recognized by the single-chip microcomputer, and send them to the processor for data processing, so that the single-chip microcomputer can have an accurate cognition of the light intensity value in the room. Since the single-chip microcomputer has accurate data on the indoor light intensity, it compares the obtained data with the data corresponding to the comfortable light intensity of people. The motor turns in a direction that makes the person comfortable. If it meets the light intensity data that is comfortable for people, the system maintains this state at this time. The system software design realizes the autonomous control of the stepper motor through data collection, data processing, and motor drive.
4. Intelligent curtain system test
Choose a sunny day as the test environment to test the smart curtain system. The light signal is detected by the photosensitive sensor. When the light intensity is 5000 lumens, the sensor converts the collected data, and the stepper motor is controlled by the single-chip microcomputer. The motor rotates in the opposite direction, the curtain is closed, and the system restores the indoor light intensity to within 4s. 3500 lumens; when the light intensity is 2000 lumens, the sensor converts the collected data, and the stepper motor is controlled by the single-chip microcomputer, the motor rotates forward, the curtains are opened, and the system restores the indoor light to 3400 lumens within 4s. The test shows that this system has a good adjustment effect on the indoor light intensity, the system has good robustness, strong control performance, low power consumption, and can achieve the control effect within 5s, which can meet the user's needs for lighting comfort.
The "Outline of the Twelfth Five-Year Plan for National Economic and Social Development" clearly stated that "promoting the research and development of key technologies of the Internet of Things and the application demonstration in key areas" is the main task of the development of the Internet of Things in the next five years. Therefore, the "Plan" clearly proposes to promote application demonstration projects in nine key areas of smart industry, smart agriculture, smart logistics, smart transportation, smart grid, smart environmental protection, smart security, smart medical care, and smart home, and strive to achieve large-scale applications . According to conservative estimates, during the planning period, the Internet of Things industry has a market capacity of more than 500 billion yuan to be developed. With the development of Internet of Things technology, users' demand for smart home is increasing. As one of the nine key areas, smart home is closely related to people's growing yearning for a better life. Therefore, the production and promotion of smart curtains have broad potential. market expectation. The test shows that this system has simple structure, strong control performance, fast running speed, low energy consumption, low cost, good practicability, and wide application value in the field of mid-to-high-end home furnishing.
5. Design of intelligent curtain with environmental detection function
With the acceleration of the pace of society, all aspects of people's lives have become closer. While the pace of life is gradually accelerating, people also put forward higher requirements for traditional houses. Nowadays, people not only require a simple physical space, but also pay more attention to the safety, convenience and comfort of the home environment. At present, in life, the curtains are mainly opened and closed manually, and this method is bound to bring inconvenience to users, especially people with limited mobility. Indoor temperature and humidity also affect people's lives due to the presence of curtains. At the same time, with the destruction and pollution of the atmosphere in recent years, some big cities continue to have hazy weather, and people begin to pay attention to the PM2.5 value. A large number of toxic and harmful substances in the environment stay in the atmosphere for a long time and enter the room through windows and curtains. , seriously affecting our quality of life.
Research an automatic curtain control system with environment detection function. The curtain can detect the indoor and outdoor environment, automatically control the opening and closing of the curtain through the judgment of the environment, and present the current indoor environmental parameters to the user through the display device, making the curtain more humanized and intelligent. The system is equipped with environmental temperature and humidity detection, ambient air quality detection, outdoor ultraviolet light, PM2.5 and other functions, and uses touch screen technology to replace traditional buttons, making it more suitable for people's operating habits. The purpose of adding environmental detection sensors to automatic curtains is to remind users, especially sensitive people, to avoid high-intensity outdoor exercise when the outdoor environment is poor, and to take protective measures when going out, so as to improve the quality of life of users.
5.1 Environmental parameters involved
(1) Indoor temperature and humidity: According to the research of physiologists, when the indoor temperature is too high, it will affect the human body temperature regulation function, causing body temperature to rise, blood pressure, pulse speed, and heart rate to speed up. In winter, if the indoor temperature is often kept above 25°C, people will suffer from fatigue, dizziness, brain swelling, slow thinking, and poor memory. If the indoor temperature is too low, it will reduce the metabolic function of the human body, slow down the pulse and respiration, weaken the resistance of the respiratory mucosa, and easily induce respiratory diseases. Therefore, scientists believe that the best room temperature is set at 11°C and 30°C respectively.
While paying attention to indoor temperature regulation, you should also pay attention to indoor humidity. When the indoor humidity is too low, due to the loss of a large amount of moisture in the mucous membrane of the upper respiratory tract, people will feel dry mouth, dry tongue, and even sore throat, hoarseness, nose bleeding, etc., and are prone to colds. Therefore, experts believe that the appropriate indoor humidity is between 40% and 60%.
(2) Outdoor air quality: Air quality is judged based on the concentration of pollutants in the air. Pollutant discharge is one of the most important factors affecting air quality, including vehicle and ship exhaust, industrial production emissions, garbage incineration, etc. According to the national "Ambient Air Quality Standard (GB3095-1996)", the air pollution index is defined. The air pollution index (API) currently used in my country is divided into five levels, and the API value is less than or equal to 50, indicating that the air quality is excellent, equivalent to reaching the national level The first-class air quality standard meets the air quality requirements of nature reserves and scenic spots. The API value is in the range of 50 to 100, indicating that the air quality is good, which is equivalent to reaching the national air quality secondary standard. The API value is in the range of 100 to 200, indicating that the air quality is lightly polluted, and children, the elderly, patients with diseases such as the respiratory system, and the general population should stop or reduce outdoor sports. The API value is greater than 200, indicating that the air quality is poor, and after a certain period of exposure, it will be more harmful to the human body.
(3) Outdoor illuminance (ultraviolet rays): The adequacy of indoor sunlight is very important. In winter, enough sunlight is needed for indoor sterilization and heating. In summer, it is not suitable to be exposed to the sun for a long time, especially in the hot noon. After being exposed to the summer sun, the indoor temperature rises rapidly, and furniture, floors and other items are deformed and faded. If you don’t pay attention to the intensity of ultraviolet rays when you go out in summer, your arms, shoulders, back, and face will often feel hot. The skin in these areas will first turn red, then turn black, and finally peel off a little. After a few days, the unbearable symptoms of the skin will slow down Slow recovery, people turned black. These are the harms of ultraviolet rays in the sun to the human body.
(4) Project research objectives and main content: This control system proposes that curtains can be controlled according to light intensity, temperature and humidity, air quality level, etc., and mainly complete the following major functions:
(a) Semi-automatic control: Semi-automatic manual control means that when the curtain needs to be closed or opened, it only needs to manually press the "forward rotation" or "reverse rotation" button, and the curtain will stop automatically when it is in place.
(b) Automatic control of opening and closing in the morning and evening: the opening and closing of the curtains can be controlled by setting the timing time to control the closing and opening of the curtains. It is generally set to automatically open the curtains at 6:30 in the morning and automatically close the curtains at 8:00 in the evening. Of course, the user can set the timing time according to different seasons and different living habits. Realize the intelligent management of "close at dark, open at dawn", without malfunction.
(c) Automatic sunshade control: The DS1302 timing chip judges the four seasons of spring, summer, autumn and winter, and implements different control schemes according to different seasons. In summer, when the light intensity reaches a certain value, the curtains are automatically closed, and in winter, sufficient sunlight is ensured. The ambient light intensity is collected through photoresistors and operational amplifier circuits, and the forward and reverse rotation of the motor is controlled by the output level of the single-chip microcomputer.
(d) Pollution detection intelligent control: When it detects high humidity, dust, heavy air pollution or hazy weather (high PM2.5), the curtains will be closed unconditionally, and the owner will be reminded to close the windows and reduce going out. Wear a mask when you go out.
5.2 Development Process of Environmental Monitoring Smart Curtains
(1) Mechanical structure design scheme: The development and design of the entire system should consider factors such as wear resistance, low noise, stable operation, and maintenance-free. The structural design is shown in Figure 1. Using AC synchronous motor as power, it has the advantages of stable operation and suitable for low-speed large-scale equipment. A planetary transmission mechanism is installed in the transmission box to reduce the speed of the motor. Two micro switches are used to disconnect and control the rotation and stop of the motor. The double-winding capacitor operation mode is used to realize the forward and reverse rotation of the synchronous motor to achieve the control of curtains. Effect. Connectors are used between the motor and the power supply, the locking piece is used to connect the motor and the transmission box, and the buckle is used to connect the transmission box and the curtain.
(2) Transmission box structure: Taking the existing household transmission box as the research object, considering the structure optimization technology, the structure of the transmission box is designed with the goal of reducing the mass and improving the rigidity and strength of the box, as shown in Figure 2 Show. Synchronous toothed belt transmission is adopted to meet the requirements of high control precision and high stability. Two pulleys are installed on the toothed belt, and when the motor drives the toothed belt to rotate, the two pulleys will move in opposite directions to realize the double-opening or double-closing requirement of the curtain.
(3) The overall design of the curtain: the motor is controlled by the control box, which is generally installed next to the window, and the display interface is installed on the control box to display various environmental parameters to the user in time. At the same time, the temperature and humidity sensors are installed indoors, and the illuminance and air quality sensors are installed outdoors.
5.3 Design of Intelligent Curtain Control System
(1) The overall structure planning of the system: the automatic control system has the function of detecting the environment and presenting it to the user through the display device. When the system detects that the environmental parameters meet the curtain opening and closing parameters, it sends a control signal to the relay, and the relay drives the curtain to make corresponding opening and closing actions. In order to meet the friendly human-computer interaction performance of the system, TFT liquid crystal display and touch screen technology are adopted. At the same time, the system is also equipped with outdoor light brightness detection, air quality detection, temperature and humidity detection and other functions, which can realize the dynamic measurement of the surrounding air. The block diagram of its hardware structure is shown in Figure 4. At the same time, the DS1302 external clock circuit is used, which can time the year, month, day, week, day, hour, minute, and second, and has various functions such as leap year compensation to provide an accurate time for the system.
(2) Display output circuit design: The display circuit is the key part of the application system and the basic way of man-machine dialogue. The system uses a 3.5-inch LCD TFT color liquid crystal screen. TFT is called thin film field effect transistor. Each liquid crystal pixel on the liquid crystal display is driven by a thin film transistor integrated on the substrate. The display output involves touch technology and SD card fast storage technology. The screen touch technology is used to realize the intelligent and humanized control of the electric curtain under the coordination of the system software program to meet the user's usage habits. SD card storage is used to provide more storage space, enrich the display images, and satisfy the user's vision.
(3) Curtain motor control circuit design: the relay control circuit is an output module, and the single-chip microcomputer controls the relay action after processing the environmental parameters. The relay module is connected to the external control interface of the electric curtain, so as to realize the control of the curtain. controller.
5.4 Software Design of Environmental Monitoring Curtain System
The whole system is controlled by the single-chip microcomputer STC12LE5A60S2, and multi-sensor information is fused to form a detection unit, which improves the ability of the system to describe the environment. The relay module and the motor form the execution unit, and according to the obtained environmental information, the curtain switching action is completed effectively, completely and reliably. Use single-chip C language programming and Keil uVision2 compiler software, adopt modular design ideas, that is, sub-module design, which is conducive to program debugging and subsequent maintenance and upgrading. The program design idea is shown in Figure 7. Set the opening and closing time of the curtains in the morning and evening through the touch TFT LCD screen, and display the environmental parameters. The curtains will be opened and closed according to the set time. As long as one of the four parameters of daytime air quality, PM2.5 value, temperature and humidity, and illuminance exceeds the standard, the curtains will be unconditionally closed (and related), and the curtains will be opened only when they do not exceed the standard.
Summarize
This design researches the automatic curtain control system with the function of environmental detection, with single-chip microcomputer as the core, through the I/O port to control the relay, realizes the connection with the external interface of the electric curtain, and is equipped with a TFT LCD touch screen and a series of environmental parameter detection devices. Under the coordination of the system software program, the intelligent and humanized control of the electric curtain is realized.
The overall structure of the smart curtain is simple, low in cost, safe and reliable. The circuit has high reliability and stability, and has the advantages of simple structure, convenient operation, high humanity, high intelligence and low power consumption. Can be closer to ordinary users. This project further researches on the basis of general curtains, integrates environmental parameters into the design concept, adopts flexible design thinking, users can easily adjust various parameters, and improves the humanization of the system. At the same time, this controller can also be connected with the external control port of electric curtains on the existing market, so that the original manual electric curtains can be changed to automatic control. Enterprises and institutions. In the future, on the basis of the existing research results, the processing capacity of the microprocessor will be upgraded, the friendliness of the man-machine interface will be improved, and the operation will be further optimized.
The above are the details of the smart curtain solution introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have the development and design needs of automatic curtains, you can trust us. We have rich experience in custom development of electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. Our development capabilities cover PCB design, single-chip microcomputer development, Bluetooth technology development, software customization development, APP customization development, WeChat official account development and other hardware and software design. 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.
Proposal recommendation
- TOP