03-18
2021
Design of Remote Irrigation Water Saving Control System Based on SCMMy country is a typical large agricultural country, and most of the crops are irrigated by ground irrigation. This method is less efficient, and the duration and degree of irrigation are judged based on manual experience. Traditional bottom irrigation wastes a lot of manpower and material resources, and the water resources for irrigation cannot be absorbed by crops in time. In addition, my country's water resources are relatively scarce, so water-saving irrigation technology is more suitable for the needs of development.Water-saving irrigation technology has matured abroad, mainly because they started early and used relatively advanced electronic and computer technology. If all the irrigation systems from abroad are imported, not only the technology will be controlled by foreign countries, but also the cost will be higher. In addition, my country's natural climate and land conditions are not the same. Based on this, this paper designs a control system based on the single-chip microcomputer STC89C52, and describes the hardware circuit of the control system, mainly including power supply circuit, display circuit, data acquisition circuit and drive circuit, etc., and uses the development software Keil to design the program, mainly including monitoring program, clock program, etc. After final debugging, the control system can well achieve the expected requirements, achieve the purpose of rational irrigation of crops, and is easy to popularize.1. Working principle and structure of remote irrigation water saving control systemThe remote irrigation system is based on the single-chip microcomputer, and controls, processes and monitors other equipment at the same time. The overall structure diagram is shown in Figure 1. The overall irrigation system mainly includes the control system of the single chip microcomputer, the pipeline water transportation system, the humidity sensor and the power supply circuit, etc. According to the introduction in Figure 1, its working principle is as follows.(1) The irrigation device is mainly composed of a water pump, a pressure gauge, a flow meter, etc. Under a certain pressure, water and fertilizer can be fused together. At this time, the impurities are first filtered out, and then the useful liquid formed enters the inside of the pipeline.(2) The pipeline system for water transportation is mainly composed of trunk pipelines, branch pipelines, and capillary pipes. In general, the diameter of the main pipe and the straight pipe is about 37.5-100mm, and the diameter of the capillary is about 10mm. In order to better realize the smooth circulation of water inside the pipeline, different pipelines are connected with two-way or three-way valves.(3) The function of the dripper is mainly to change the shape of the water flow into tiny water droplets, and then fully soak the soil.(4) The humidity sensor mainly measures the humidity inside the soil, which can collect a large amount of data from the control system, and then evaluate the degree and demand of irrigation in a timely manner.(5) The single-chip microcomputer is a key part of the irrigation system, which is mainly composed of a central processing unit, a memory, and a timer. The upper computer and the single chip computer in the irrigation system are connected by serial communication RS232, the humidity sensor realizes data transmission and conversion according to the A/D interface, the control system processes the received signal, and uses the driving circuit to realize the control of the solenoid valve system. Control and further complete the irrigation of crops.2. Hardware circuit design of remote irrigation water saving control systemThe hardware circuit of the whole system is composed of single-chip microcomputer control circuit, clock and reset circuit, man-machine dialogue circuit, data acquisition circuit, solenoid valve drive circuit and power supply module.2.1 Single-chip circuit designThe single-chip microcomputer STC89C52 is a low-voltage, high-performance 8-bit control machine produced by ATMEL Company, which contains 8K read-only memory and 256K data memory. It has 40 pins, 32 bidirectional input ports, 2 interrupt interfaces, 3 16-bit counters and 2 serial communication interfaces, etc., and is compatible with the MCS-51 instruction system. The clock frequency is 0~24MHz, and the access terminal of the power supply is -5~+5V.2.2 Clock and reset circuit designThe single-chip microcomputer is composed of an internal oscillator, which is a high-gain reverse amplifier. XTAL1 and XTAL2 are input and output respectively. When the system is working, if it encounters a fault or a complex state, it needs to reset the system. The automatic reset function of this microcontroller is mainly realized by charging and discharging the capacitor. The manual button reset is mainly connected with the power supply through a resistor.2.3 Man-machine interface circuit designThe man-machine interface circuit mainly realizes the exchange of information and data between man and computer. Currently the most commonly used output and input devices include monitors and keyboards, and the lower display interface is designed to face the LED display interface circuit and keyboard circuit. In order to simplify the system, the control system uses a four-in-one digital tube. It is composed of 8-bit common anode pipeline, and it is displayed dynamically.In order to better realize the control of the system, 4 independent keyboards are adopted, the number of keys is less and the operation speed is faster. The overall structure is simple and the cost is low.2.4 Data Acquisition Circuit DesignIn order to accurately realize the irrigation of crops, accurate sensors must be selected. The current soil moisture sensor is the FDR type. This type of sensor makes simple, safe, automatic measurements. According to the actual situation, select SWR-2 sensor.After the sensor is collected, digital-to-analog conversion is required, so the TLC549 converter is selected accordingly. It is an 8-bit gradually approaching serial A/D chip.When converted into data, the data needs to be stored. Due to the large amount of measured data, AT24C16 memory is selected according to requirements. It has 2048 8-bit bytes, has 16K serial memory, and operates through the bus.2.5 Output drive circuit designThe relay is an important part of the output circuit, its function is mainly to drive and control the solenoid valve, and then complete the action of the nozzle. In addition, in order to improve the anti-interference performance of the whole system, optocoupler isolation is used between the relay and the single-chip microcomputer. This power supply system is powered by dual power supplies.3. Software program design of remote irrigation water saving control systemModular structure design is one of the main methods used in the software program design of the irrigation system. Its structure has corresponding module programs to complete, mainly including different signal acquisition modules, signal initialization modules, system control modules, and time-limited display modules. . The modules of the above-mentioned parts cooperate with each other to complete the irrigation of crops within a limited time. The control system has the advantages of strong versatility, high safety, and convenient debugging.When the single-chip microcomputer STC89C52 is powered on, the first thing to do is to initialize the system program. The main content of the initialization includes the initialization of the required chip interface and the initialization of different flags and variables. After completing these, the entire system program will enter the main program. The single-chip microcomputer will convert the collected soil moisture information through a digital-to-analog converter, and then compare it with the value set in the program. After a certain comparison, the LED display will be Displays the moisture content of the soil in real time. If the obtained value is larger than the standard value, the software program will continuously collect the program and display the value, otherwise the program will proceed according to the steps, start the designed subroutine, and further limit the solenoid valve control and nozzle time until The soil moisture value is not much different from the set value. The entire system also has a time limit. If the time limit is exceeded, it will be re-initialized and the irrigation of crops will be restarted.The clock program of the software system mainly completes the timing and timing of the single-chip microcomputer STC89C52. The interface T0 of the single-chip microcomputer can adjust the time display of the whole system and the determination of the object through programming.The keyboard scanning program of the software is mainly aimed at testing the vibration and key state of the software during system operation. The entire scanning procedure is to scan every 50ms. In order to better prevent key conflicts during operation, the system only executes the key once.The design of the LED display program is mainly carried out according to the common anode digital tube adopted. When the anode of the entire diode is at a high level, the digital tube will light up at this time. Therefore, parallel common anode digital tubes can clearly display the change of time. When performing dynamic system reality, the numbers in the digital tube are stored in the ROM in a certain format, and the stored content is called through the translated different numbers to further display the change of time.When performing digital-to-analog conversion, the TLC549 converter is based on mode input, A/D conversion, and data output. The data storage is mainly AT24C16, and the data bus used at this time is I2C. Write different bytes in time according to the addressing and response content of different situations of the chip. The transmission of the bus does not affect the change of the clock line level, and the signal for data transmission will start when the idle condition is satisfied.4. Debugging of remote irrigation water saving control systemThe software program design of the control system is developed based on KeilC51. Its simulation debugging can also be completed by Keil software. The final generated object code is burned into the required STC89C52 microcontroller through the programmer JDT-2008.After verification, the value of the sensor detection number is not much different from the actual value, which basically meets the requirements.SummarizeWith the development of the times, my country's water resources are increasingly scarce, so the selection of crop irrigation methods is particularly important. According to actual needs, this paper designs a remote water-saving irrigation system based on the single-chip microcomputer STC89C52.Firstly, the research status of irrigation system at home and abroad is introduced, and on this basis, the structure and working principle of irrigation system are expounded. Then, the hardware of the system is designed, mainly including single-chip circuit design, clock and reset circuit design, drive circuit design, man-machine interface circuit design and data acquisition circuit design. After completing the hardware design, it is necessary to program the software. The software program design mainly includes the design of the main monitoring program, the system clock program design, the key recognition and processing program design, and the dynamic display program design. Finally, debug and verify the designed irrigation system. After testing, it is found that the whole system meets the design requirements, with low design cost, reliable operation, high safety and relatively simple operation. It not only overcomes the difficulty of designing transmission, but also provides a reference for the design of similar systems.The above is the design and implementation of the remote irrigation and water-saving control system based on single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-17
2021
Design of Temperature and Humidity Recorder Based on SCMTemperature and humidity have always been the two most basic and important parameters in the field of environmental monitoring, and there are various devices for measuring, monitoring and recording these two parameters. This paper designs a temperature and humidity recorder based on AVR microcontroller. The recorder uses an infrared remote controller to set and control the parameters of the recorder, and can measure the ambient temperature and humidity in real time, and store and display locally. The measured historical data can also be transmitted to the host computer through the serial port of the single chip microcomputer. machine for monitoring.1. System composition and basic principle of temperature and humidity recorderThe recorder realizes the following functions: collect, record and display temperature and humidity data; use the remote control to set the initial time of the system; self-select the time interval of temperature and humidity data collection; transmit the historical data recorded locally to the PC terminal of the host computer ; Use the remote control to control and display the current real-time temperature and humidity data or view historical data on multiple screens. The temperature and humidity recorder designed in this paper uses a single-chip microcomputer as the control core, and is composed of a temperature and humidity acquisition module, a clock module, a display module, an infrared sending and receiving module, a serial communication module, and a power module. Its structure diagram is shown in Figure 1. The temperature and humidity acquisition module collects the temperature and humidity data of the environment, converts them into digital quantities, and provides them to the single-chip microcomputer for processing. The clock module provides accurate and detailed time information such as year, month, day, hour, minute and second for the entire recorder, and can automatically enable the backup power supply to supply power to this module when the system is powered off. The display module displays local real-time temperature and humidity data, historical record data, etc. The infrared receiving module cooperates with the infrared remote control to set and modify the parameters of the recorder, and to change the displayed content of the display during the operation of the recorder. The serial communication module is responsible for transmitting the historical data recorded on the recorder to the upper PC. The power module supplies power to the entire recorder.2. Hardware design of temperature and humidity recording systemThe system hardware mainly adopts high-performance AVR microcontroller ATmega16, digital temperature and humidity sensor SHT10, clock chip PCF8563, dot matrix LCD display module 12864 and infrared receiver VS1838 and other devices.2.1 Introduction of MCU ATmega16High reliability, powerful functions, high speed, low power consumption, and low price have always been important indicators for measuring single-chip microcomputers, and they are also necessary conditions for single-chip microcomputers to occupy the market and survive. In this system, 8-bit microcontroller ATmega16 with high performance and low power consumption is used.ATmega16 has complete functions and rich peripheral interfaces, with 2 8-bit, 1 16-bit timer/counter, 8-way 10-bit AD converter, 4-channel PWM, 2 programmable serial USARTs, and a total of 32 programmable I /O interface. On-chip has 16KB of in-system programmable Flash, 1KB of on-chip SRAM, and 512 bytes of EEPROM. There are up to 6 sleep modes such as idle, ADC noise suppression, power saving, power down, and standby. Because ATmega16 uses Haval structure, fully static work, word as instruction length unit, and simplifies instruction set, most of its instructions are completed within one clock cycle, so its data throughput rate is very high, and its performance is as high as 16MIPS when working at 16MHz, so that it can Slow down the contradiction between power consumption and processing speed of the system. ATmega16 has a total of 131 instructions and 32 8-bit general-purpose registers, all registers are directly connected to the ALU, so that one instruction can access two registers at the same time in one clock cycle, which greatly improves code efficiency and can perform data transmission and temperature collection.2.2 Temperature and humidity acquisition moduleThe measurement of temperature and humidity uses the integrated digital temperature and humidity sensor SHT10. SHT10 integrates temperature and humidity sensing, signal conversion, AD converter and other functions into one chip, provides two-wire digital serial interface SCK and DATA, supports CRC transmission verification, programmable adjustment of measurement accuracy, and provides temperature compensation with temperature After the measurement value, the measurement and communication are completed, it will automatically switch to the low power consumption mode, and the sensor head can be completely immersed in water during measurement. The temperature of this recorder is designed with 14b resolution, and the range is:-400C~990C, measurement accuracy: ±0.50C, resolution 0.01 0C; humidity uses 12b resolution, range: 0~99%RH, measurement accuracy: ±4.5%RH, resolution 0.03%RH. When designing the circuit, connect SCK and DATA pins of SHT10 to PC7 and PC6 pins of ATmega16 respectively, ATmega16 provides clock signal to SHT10, and DATA pin is used for data exchange between the two.2.3 Clock moduleWhen recording temperature and humidity data, accurate time information is required, which is provided by the clock module. The clock module takes Philips' programmable clock/calendar chip PCF8563 as the core, supplemented by corresponding peripheral circuits. PCF8563 has 16 8-bit registers, built-in 32.768KHz oscillator, frequency divider, timer, alarm, power-down check, I2C bus interface and other components for providing source clock for real-time clock RTC. Among the 16 registers, 2 are used for control registers and status registers, 7 are used for clock (second, minute, hour, day, week, month, year) counters, and 4 are used for alarm registers (defining minutes, hours, days, alarm condition of the week), and the remaining three are CLKOUT frequency register, timer control register and countdown timing register. These registers are read and written by the microcontroller through the two-wire I2C bus (clock SCL, data SDA). Because PCF8563 adopts I2C bus line, its peripheral circuit design is simple. PCF8563 has a total of 8 pins. In this design, OSCI and OSCO are connected to a 32.768KHz crystal oscillator. The SCL pin is connected to the PC0 port of the single-chip microcomputer to provide a clock signal for the I2C bus, and the SDA pin is connected to the PC1 port of the single-chip microcomputer to realize reading and writing of time and date. In addition to connecting the system power supply, the power supply pin Vdd is also connected to a 3.3V button battery as a backup power supply. When the system is powered down, the backup power supply of 3.3V is used as the power supply of PCF8563.2.4 Infrared receiving moduleWhen the temperature and humidity recorder is used, there will be some special occasions, such as the height of the recorder, the recorder is placed in a confined space, etc., making the recorder inconvenient to control, and short-distance non-contact control is required. The system uses infrared communication technology for short-distance communication. Infrared communication technology has the characteristics of large information capacity, simple structure, good directionality, low power consumption, low price, and strong confidentiality. The system uses the integrated infrared receiving head VS1838 and the integrated infrared remote control to transmit the recorder's time setting, display format and other control information. When different buttons on the remote control are pressed, different serial binary remote control codes are generated. After the code is secondarily modulated by the 38KHz carrier signal, it is sent out in the form of infrared signals through the infrared emitting diode. The VS1838 receiver integrates infrared receiving diodes, signal amplifiers, limiters, frequency-selective bandpass filters, integrating circuits, and comparators. The infrared receiving diode transmits the received signal to the amplifier for amplification, the signal is limited to a suitable voltage range through the limiter, and only the 30~60KHz signal is retained after passing through the band-pass filter. After demodulation and integration circuit, the signal is transmitted to the comparator to output high and low levels, converted into binary code sent by the transmitter, and sent to the PC2 pin of the single-chip microcomputer through the pin DQ for use by the single-chip microcomputer.2.5 Display moduleThe display module displays the current time, temperature and humidity locally, displays the initial setting time when the system is initialized, the time interval of temperature and humidity recording, and displays the recorded historical data and other information. Due to the large amount of displayed data, this system uses a dot-matrix graphic liquid crystal display module LCD12864. The display resolution of LCD12864 is 128*64, and it can display Chinese characters in 8*4 lines and 16*16 dot matrix. 12864 hardware circuit structure and software programming are much simpler and cheaper than the same type of graphics dot-matrix liquid crystal module, and have been widely used. The system uses an 8-bit parallel 12864 display module, which has 20 pins in total with the external interface. The module is simple to connect with the external circuit. During the design, 8 parallel tri-state data lines DB0~DB7 of 12864 are connected to the PB0~PB7 ports of the single-chip microcomputer for data transmission with the single-chip microcomputer. The contrast (brightness) adjustment pin V0 of 12864 is connected to an adjustable resistor, and the brightness is changed by adjusting the resistor value. 12864's parallel instruction/data display selection pin RS, read-write control pin R/W, and parallel enable pin E are respectively connected to PD7~PD4 of the single-chip microcomputer, and the control signal is given by the single-chip microcomputer. Because the parallel interface is used, the parallel/serial interface selection pin PSB is connected to high level. The reset terminal RESET, the positive terminal of the backlight source and the PSB terminal are jointly connected to the power supply terminal VCC. The LCD drive voltage output terminal Vout is connected to the power supply terminal VCC through a 10K current limiting resistor.2.6 Communication ModuleThe communication module completes the communication between the single-chip microcomputer and the PC. The recorder can store up to 50 recent temperature and humidity data continuously. In some usage occasions, it is necessary to permanently retain the data for a longer period of time. Using the communication module, the data in the recorder can be sent to the PC for permanent storage. Serial communication is adopted between the single-chip microcomputer and the PC. Since the serial port level of the PC machine is inconsistent with the electrical specification of the serial port of the single-chip microcomputer, the MAX232 chip is used for level conversion. Use the PD0 port (RXD) of the ATmega16 microcontroller to connect to the 9-pin R2OUT of the MAX232, and connect the PD1 port (TXD) to the 10-pin T2INT of the MAX232. Pins 7 and 8 of MAX232 are connected to the full-duplex serial port of the PC. With the development of the Internet of Things technology, the device can also be used as a terminal node of the Internet of Things. When designing the system, the PA port is reserved for the Zigbee network.2.7 Power moduleThe power module supplies power to the entire recorder. The recorder uses AC 220V mains as the power supply, and the chip power supply on the recorder requires DC 5V. Therefore, the power module needs to complete the conversion from AC220V to DC5V. The principle is that the 220V AC is rectified by a full-bridge rectifier circuit, filtered and stabilized, and then sent to a 7805 three-terminal voltage regulator to obtain a stable DC voltage of 5V.3. Software design of temperature and humidity recorderAfter the system hardware architecture is completed, the functions realized by the system software are mainly the initialization settings after power-on, and the real-time collection, recording, display and transmission of temperature and humidity data. After the microcontroller is powered on or reset, the system is initialized, and the initial settings of the IO port, internal register, and serial communication baud rate of the microcontroller are completed, and then the infrared receiver is scanned to see if there is a remote control signal sent by the remote controller. If yes, analyze whether the signal is the setting signal of the recorder or the data transmission signal, the setting signal is transferred to the setting of the recorder time, recording interval, and display mode, and the transmission signal controls the historical data recorded in the recorder to be transmitted to the PC. If no remote control signal is sent to the single-chip microcomputer, check whether the recording interval time is up, if the temperature and humidity data is collected, recorded and displayed, otherwise check again whether there is a remote control signal sent. The software design adopts the C language programming language, and adopts the modular design method. According to the flow chart, the program is divided into initialization module, infrared remote control signal acquisition module, infrared remote control signal processing module, temperature and humidity data acquisition module, acquisition data conversion into storage data, display code conversion module, PCF8563 setting, time information reading, Display code conversion module, temperature and humidity data recording module and record historical data transmission and other modules.SummarizeThis paper studies and designs a temperature and humidity recorder based on AVR single-chip microcomputer. The recorder has the characteristics of high data acquisition accuracy, small size, convenient portability, low cost, low power consumption, simple structure, and simple and convenient control. This recorder also has certain deficiencies. Because the storage of historical data uses the EEPROM area inside the single-chip microcomputer, and the capacity of the EEPROM area of the single-chip microcomputer is limited, the recorder can only store 500 pieces of historical data at most. If it is set to record a piece of data every 15 minutes, the recorder can only store 3 days of historical data. The expansion of large-capacity memory chips by single-chip microcomputers can increase the recorded historical data.The above is the design technology of temperature and humidity recorder based on AVR 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-16
2021
Design of intelligent curtain control system based on single chip computerAfter entering the 21st century, with the continuous development of various technologies, the combination of theoretical knowledge and real life has become closer and closer, and people's living standards have continued to improve. At the same time, the application of more and more intelligent technologies has also made People's privacy security has been greatly violated, so people pay more and more attention to the security of their own privacy, and as a necessary curtain in a family residence, it is very useful for protecting residents' privacy and blocking external light. Most of the traditional curtains on the market now need to be opened and closed manually, which is not only laborious, but also may miss the best light time, so the intelligent control of curtains is very important and effective.1. Design scheme of intelligent curtain control systemThe design is mainly to realize the light control curtain system, which includes three functions of light control, timing and manual. Therefore, it is necessary to connect these control elements with various interfaces and MCU. Apply AT89C52 series MCU design system, install ADC0832 chip, VS1838b, ULN2003 chip, etc., to control the opening or closing of curtains under different light conditions. Button scanning module, infrared remote control module, photoresistor, stepping motor, AT89C52 together constitute the design system. Use photoresistors to collect analog signals and convert them into digital information through the analog-to-digital conversion A/D circuit, and use this to control the stepper motor to rotate clockwise or counterclockwise to simulate the opening and closing of the curtains. The automatic light control opening and closing of the curtains is completed by the principle of light control. When the external light intensity reaches the upper limit of the system's internal preset value, the curtain is opened; when the external light intensity reaches the system's internal preset value lower limit, the curtain is closed. is closed. Based on the above working principles, the realization of the design system is not only low cost, but also convenient and quick.In addition, the automatic opening and closing of the curtains can also be preset through the time or directly start and close the curtains by pressing the button. The system has many advantages, the structure is relatively simple, the system is stable, and it is not easily disturbed by the external environment.2. Hardware design of single-chip intelligent curtain control system2.1 Main program moduleThe system uses AT89C52 single-chip microcomputer crystal oscillator circuit, the so-called quartz crystal oscillator is the crystal oscillator in the single-chip microcomputer circuit. The crystal oscillator is usually a capacitor and a resistor connected in parallel and then a capacitor in series. There are two resonance points. The resonance is connected in series for low frequency; the resonance is connected in parallel for high frequency. The crystal oscillator can provide a pulse signal to the microcontroller, which is the working speed of the microcontroller. The crystal oscillator will be connected to the X1 and X2 pins of the single-chip microcomputer. At this time, this circuit will generate harmonics, and the existence of harmonics will affect the stability of the oscillator. In order to solve this problem, we connect a ceramic chip capacitor to the pin of the crystal oscillator. This capacitor is generally selected at 10 to 50 pF and needs to be grounded. The crystal oscillator used in this design is a 12MHz quartz crystal.2.2 Button moduleThe function of the button module in this design is to close the curtain regularly by pressing the button or directly control the opening or closing of the curtain by pressing the button in addition to the automatic lighting curtain. This design requires the use of 5 independent buttons. The functions they realize respectively are setting key (setting the opening and closing time of automatic light control curtain); digital value plus key; digital value minus key; start curtain key (the curtain is opened after pressing this key); close curtain key ( The curtain is closed after pressing this button).2.3 Photosensitive and AD conversion moduleThe automatic light control opening and closing curtain system is to open or close the curtain in time according to the change of external light, and the photoresistor is responsible for completing the required functions of this part. The photoresistor is very sensitive to the external light intensity value, and has a direct effect on the change of the resistance value. The resistance value is negatively correlated with the light intensity, the resistance value decreases as the intensity increases, and vice versa, the resistance increases.ADC0832 is an 8-bit successive approximation analog-to-digital converter. It can be replaced with TLC0832, which has two input channels that can be multiplexed. The serial output can be configured as a standard shift register or microprocessor interface, and its multiplexer can be configured as a single-ended or differential input by software. The differential analog voltage input can suppress common-mode voltage, but the input reference voltage cannot be adjusted. , has been connected to VCC internally. The ADC0832 chip has four data connection lines, which are respectively connected to the microcontroller, which are the CS chip selection terminal; the CLK chip clock input terminal; the DI data signal input terminal; the DO data signal output terminal. When the single-chip microcomputer communicates, the DI and DO terminals are bidirectionally connected to the single-chip microcomputer and they cannot work at the same time, so the two ends are connected in parallel to a data line in the circuit.When the data at both ends are displayed as 1 and 0 respectively, the CH0 pin realizes single-channel conversion. The CH1 pin performs single-channel conversion when the 2-bit data is 1, 1. The CH1 pin and the CH0 pin are respectively used as the negative input terminal IN- and the positive input terminal IN+ when the data display is 0 and 0. When the two bits of data are displayed as 0 and 1, the polarity of the positive and negative input terminals of CH1 and CH0 changes. If the third pulse sinks, the DI terminal will lose its input function before the third pulse comes. Use DO/DI to output data to output DO. Use the DO terminal to output DATA7 of the conversion data when the fourth pulse sinks. The DO terminal will always input data before the D0 terminal sends out the lowest bit data DATA0, and the output data is before each pulse sinks. After receiving DATA0 data, this byte of data is output. Then output the opposite byte data. Set the CS chip selection enable pin to a high level, and the chip cannot be used at this time. The input voltage of the AD conversion chip is 0 to 5V, and this voltage is only applicable when it is used as a single-channel analog signal. Its voltage accuracy is 19.53mV at eight-bit resolution. When used as positive and negative input terminals, the voltage value of a larger range value should be predetermined and used to improve the conversion accuracy.2.4 Stepper Motor Design ModuleThe stepper motor is an open-loop control device, and the angular displacement is obtained through the conversion of its electric pulse. The frequency and number of the pulse signal will affect the rotation of the motor. For example, when a pulse signal is sent to the driver of the stepper motor, it can make the motor rotate a certain angle in the forward or reverse direction we assumed earlier, and we call this angle the step angle. Stepper motors can be started and stopped very quickly. Stepper motors are mostly used in circuits with higher precision due to the relationship between speed and step angle, and these are only related to the frequency of the pulse.The seven pins of ULN2003 are connected with the microcontroller P1.0~P1.7. Install the pin header next to the ULN2003 chip, which is the five-wire interface of the motor, for connecting the stepper motor. The 5V power supply is directly connected to the first pin port of J4. Connect with the motor, directly drive the motor forward and reverse to simulate the opening and closing of the curtain. Stepper motors include single-phase motors and multi-phase motors, both of which are synchronous stepper motors. A single electric pulse can drive a single-phase motor, which is generally used to drive a tiny circuit due to its low output power. Stepper motors are very suitable for microprocessor control mainly because they can directly receive digital quantities.2.5 Display some modulesIn this design, LCD1602 is used to display real time, opening and closing time of curtains, and light intensity value. The time displayed on 1602 can be adjusted by buttons, and the time of opening and closing curtains can be set by buttons, which can be displayed in real time on 1602; The light digital value collected by us can be displayed through 1602. P0 is used as the connection of the data port here, and it is connected with pins 7 to 14 at 1602, and the write data or write command is transmitted on the connection line. Moreover, a pull-up resistor must be added to the connection of the line. Pin 4 of LCD1602 is the RS register selection terminal, which can be used to select data or commands; pin 5 of LCD1602 is the R/W read-write control terminal, which can decide whether to read data or write data, and it is connected with the P2.0 port of the single-chip microcomputer chip ; The six pins of LCD1602 are E enable signal terminals, which can control whether the device works, and are connected with the P2.2 port of the single-chip microcomputer chip. In this design, a rotary potentiometer is used to adjust the brightness of the 1602's backlight.3. Software Design of Intelligent Curtain Control SystemThe functions that the main program of this system needs to complete include: the initialization operation of each module of the single-chip microcomputer, the setting of the initial value of the timer, turning on the motor, displaying the digital quantity of time and light, etc. The function of the whole system is realized by calling the sub-functions of each module through the main function void main().SummarizeThe system design adopts the minimum system design of AT89S52 single-chip microcomputer. It controls the opening and closing of the curtains by controlling a reversible DC motor, and uses remote control and light control to make the curtain system intelligent, which is in line with the current development direction of smart homes. It can make the concept of intelligent life get better promotion.The above is the design process of the intelligent curtain control system based on the single-chip microcomputer 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-15
2021
General Principles and Design Strategies of Low Power Consumption Design of Single Chip Microcomputer SystemWith the development of electronic science and technology, electronic products based on single-chip system design are widely used in people's production and life. At the same time, higher requirements are put forward for the design of power consumption of single-chip systems. Attracting people's attention, the low power consumption design of single-chip microcomputer meets the social energy-saving requirements, which can greatly improve the service life of electronic products and greatly improve product competitiveness. It can be seen from this that the low power consumption design of the single-chip microcomputer not only has good economic benefits, but also has greater social benefits.1. Design principles of low power consumption of single-chip microcomputer system(1) The principle that the CPU core should be simple: In the design of single-chip microcomputer system, the choice of CPU cannot blindly pursue performance. An 8-bit machine is enough, and the principle of enough is enough must be followed. With the development of science and technology, the current single-chip microcomputer runs faster and faster, but the continuous improvement of performance will definitely bring energy consumption. A relatively complex CPU must also have a high degree of integration. Because there are many transistors on the chip, the total leakage current will increase, so when the device is in the stop state, leakage will also occur. Therefore, the choice of CPU should be simple and practical. Reduce power consumption and can reduce costs.(2) The principle of "enough is enough" for the voltage system: reducing the power supply voltage of the single-chip microcomputer can reduce the power consumption very well. At present, the power supply voltage of the single-chip microcomputer has dropped from the original 5V to 1.8V. Low-voltage power supply can effectively reduce the system operating current, but because the size of transistors is constantly decreasing, this is also a very disadvantageous aspect of reducing power consumption. Therefore, you must be careful when choosing a low-voltage system. Other electronic components in the system must work properly at low voltages. In this way, the problem of low power consumption of the system can be solved to a great extent.(3) The principle of selecting low-power circuits: In the design of single-chip low-power systems, it is necessary to choose circuits that maintain high efficiency under low power consumption. At present, most low-power systems use HCMOS integrated circuits, which can integrate many The integrated circuits are joined together in one package. This reduces bus capacitance, allowing more signals to be accommodated. In addition, reducing the frequency of the crystal oscillator can also effectively reduce the current of the whole machine, but the reduction of the frequency of the crystal oscillator will sometimes affect the operating speed of the system, which will be limited by the timing of the external circuit, the frequency of counter measurement, and the frequency of serial communication. When selecting the frequency value, the working speed of the system information processing must be taken into consideration.2. The main basis for low power consumption design of single chip microcomputer2.1 Reduce the power consumption of single-chip application systemIn the low-power system design of single-chip microcomputer, it is necessary to use power-down, sleep and interrupt reasonably to further realize the low-power operation of electronic products. Sleep mode and power-down mode can reduce power consumption by shutting down the CPU and the system. Purpose. Concentrate on tasks with large power consumption, reduce power consumption time, and adopt fast entry into power-down or sleep state to avoid unnecessary waiting of the system. On the premise of ensuring the normal operation of the system, reduce the acquisition speed and bus speed.2.2 Essential low power design of MCUThe essential low power consumption design of the microcontroller is mainly reflected in the selection of components and circuit design. The selection of components should follow the principle that the frequency should be slow rather than fast, the system should be static rather than dynamic, and the voltage should be low rather than high, so as to realize the energy saving of the hardware system. The main methods of energy-saving control of components are: control of power supply voltage, clock control and static control. In the circuit design process, it is necessary to adopt a low-power wake-up circuit design, choose an electronic chip with a high degree of integration to replace an electronic chip with a single function and a low degree of integration, and strengthen the shielding and anti-interference ability of the circuit while reducing the power supply voltage design.3. Low power consumption design scheme of single chip microcomputer system3.1 Hardware design of single chip low power consumption system(1) Choose an appropriate oscillation mode: Currently, the commonly used oscillators include crystal oscillator, resonator and RC oscillator. The wake-up time of the three oscillators is different. This design uses a crystal oscillator. The wake-up time of the crystal oscillator The time is about 8.5ms. During the working process of the microcontroller, if the wake-up time is too long, a pre-working stage will be formed. At this time, the processor will consume power, but the program is not running, so the power consumption will be lost. In order to further save energy consumption, a small resistor RS is connected in series in the circuit of the crystal oscillator.(2) Dealing with I/O pins: In the design of single-chip low-power consumption systems, the handling of I/O pins is particularly important. The pins set as output can drive 20-25mA current, so it is necessary to optimize each output pin. In order to achieve the effect of energy saving, the internal pull-up can be disabled and the external larger resistor can be used as the upper position. This method can To save energy in the sleep state, in the disturbed environment, the current consumption will be increased due to the frequent flipping of the internal latch. Therefore, useless pins can be set as output instead of simply not connected. Once an external interference signal appears, it will easily become an input signal that repeatedly oscillates, causing unnecessary power consumption.(3) Select the appropriate MCU and standby mode: Low-power MCU plays a very important role in reducing the power consumption of the single-chip microcomputer. It is necessary to select the most appropriate mode from various standby modes according to the specific occasions where the single-chip system is applied. mode, the MCU is in a low power consumption state as much as possible. When the operating frequency of the MCU is different, the difference in power consumption will be great. In addition, the low-voltage power supply can greatly reduce the power supply current of the system, and reducing the power supply voltage of the single-chip microcomputer can effectively reduce power consumption. Therefore, choosing an appropriate MCU and system voltage has positive significance for reducing power consumption.3.2 Software design of single-chip low-power system(1) Adopt the "interrupt" method to reduce power consumption: During the running of the system, the interrupt mode of the program is different, and the power consumption of the application system is very different. In the form of "interrupt", the system processor can be in the In the idle state, and in the form of query, the CPU will keep accessing the I/O registers, resulting in extra power consumption.(2) Intermittent operation of the I/O module: the I/O module must pay attention to turning off the power supply during intermittent operation. Currently, the driver used in the single-chip application system generally has a large power, so an I/O pin must be used to perform the operation. Take control, when the system does not need to communicate, turn off the driver in time. For simple encapsulation or single-chip microcomputers without leads, attention should be paid to the initialization of I/O pins.(3) Reduce the amount of CPU computation: In actual operation, there are many ways to reduce the computation amount of the CPU. The calculated results can be embedded in the Flash in advance, and the calculation can be replaced by querying during use. , thereby reducing the amount of CPU operations. Many single-chip microcomputers already have fast addressing modes and look-up table instructions, which are very effective for some unavoidable calculations. Increase the use of fractional operations or reduce the use of floating-point operations, and use some short data types as much as possible.(4) Select the low power mode system: The low power mode mainly refers to the waiting or stop mode of the system. In this mode, the power of the single-chip microcomputer will be much smaller than the running power. In the waiting mode, the CPU will stop working, but the peripheral I/O modules of the single-chip microcomputer will not stop working, and the power consumption of the system will be reduced.Taking Freescale's HCS08 microcontroller as an example, the power consumption of the system under different operating modes is given. HCS08 is an 8-bit single-chip microcomputer, there are many series, and the number of I/O modules in each series is different, but the current consumption in low power consumption mode is roughly the same.Therefore, before letting the system enter the deep stop state, important system parameters should be saved in non-volatile memory, such as EEPROM. The deep stop mode turns off all I/O, and the possible wake-up methods are also very limited. Generally, it can only be reset or IRQ interrupt. The more reserved I/O modules, the more interrupt sources the system allows to wake up. The power consumption of the single-chip microcomputer will be reduced to between 1 μA and tens of μA according to the different reserved wake-up methods.SummarizeIn the development of today's society, the application of low-power single-chip microcomputer has become the main development direction of single-chip system design, and it has important practical significance to strengthen and promote the research of low-power consumption design of single-chip microcomputer. In the future research and design, through the design and innovation of the hardware system and software system, the single-chip microcomputer application system will create greater economic and social benefits in the near future.The above is the general principle and design strategy of the low power consumption design of the microcontroller system 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-13
2021
Design of bus temperature control system based on single chip computerWith the aggravation of urban air pollution and the frequent occurrence of smog, buses are widely used as an environmentally friendly public transportation tool, and in order to improve ride comfort, the popularity of urban air-conditioned buses continues to increase. The heating and cooling comfort of the air-conditioned bus not only directly affects the ride experience of passengers, but also affects the health of passengers. The relevant regulations point out that during the period from June 1st to September 30th and December 1st to March 1st of the following year every year, and when the temperature inside the compartment is higher than 28°C or lower than 12°C during this period, the bus The air-conditioning facility is turned on to maintain a comfortable driving environment. However, in the actual investigation, it was found that the temperature in most bus compartments is too low in summer, while the temperature in winter is too high, and the temperature difference between the inside and outside of the compartment is too large, causing passengers to feel uncomfortable on the bus, which makes the original increase in order to improve the comfort of passengers. The advanced cooling and heating system has become the reason why many people refuse to take the bus.At present, new energy buses—gas-electric hybrid buses are widely used in urban traffic. They have a high gas-saving rate and are more environmentally friendly. However, the cooling and heating system of this car has not been upgraded accordingly, and it cannot better meet the passengers' requirements for temperature comfort. Some scholars have analyzed the velocity field and temperature field of the air supply system in pure electric buses, but the research on the temperature control system of natural gas buses or gas-electric hybrid buses widely used at present is still insufficient.Aiming at the above situation, this paper designs the bus temperature control system based on single-chip microcomputer, so as to meet the passengers' requirements for the temperature comfort of air-conditioned buses to a greater extent in terms of function.1. Hardware design of bus temperature control system1.1 The overall design of the system hardwareThe temperature inside the car will change with the outdoor temperature and the number of passengers in the car. A single given temperature control system cannot guarantee the comfort of passengers in the car. This design is based on the STC89C52 microcontroller as the core of the system, the temperature sensor DS18B20 is used to measure the temperature in the bus, and the LCD1602 liquid crystal display is selected for temperature display. Multiple buttons are set inside the compartment, and passengers can raise or lower the temperature by pressing the buttons. When the passenger presses the keyboard, the single-chip microcomputer starts the counting function to count the heating and cooling requirements within 3 minutes, and at the same time judge the degree of temperature adjustment, so as to meet the needs of passengers.1.2 Schematic diagram of the systemUse 5 groups of button switches to simulate the cabin temperature controller, and 2 buttons in each group represent heating and cooling respectively. Once a button is pressed, the single-chip microcomputer will count the data of the button every 3 minutes, and according to the statistical result, the system will execute the heating or cooling control program. Considering the large mobility of passengers in the compartment and the hysteresis of the temperature adjustment process, the measurement of each adjustment is selected as 2°C, and the temperature change within 1h does not exceed 6°C. When the number of presses of the heating button is greater than that of the cooling button, the 3.4 pin of the single chip microcomputer outputs a high level, the Q1 transistor is turned on, the RL1 relay is turned on, connected to the input terminal of the heating function in the car, and the system starts to heat up. In this design, the heating plate is used to simulate the heating function in the car, and the heating plate is connected to the 5V power supply to start heating. When the number of button presses to raise the temperature is less than the number of button buttons to cool down, the system executes the cooling control program, the pin 3.5 of the microcontroller outputs a high level, the transistor Q2 is turned on, and the relay RL2 is turned on. In this design, a small fan is used to simulate the cooling function in the compartment. At this time, the fan is connected to the 5V power supply to start cooling.2. Software design of bus temperature control system2.1 Main program flowIts operation process is: after turning on the switch and powering on, the system is initialized, after the delay processing, the temperature sensor collects the temperature, and transmits the collected temperature value to the LCD screen to display the current temperature. The sensor continues to work when the button is pressed; if there is a button operation, the single-chip microcomputer collects the number of times the button is pressed with a sampling period of 3 minutes, and then calculates whether the temperature needs to be changed, and judges the degree of temperature adjustment, so as to control the operation of the relay to realize the heating and cooling function.2.2 Temperature acquisitionThis design uses DS18B20 temperature sensor to detect the temperature inside the car. It has the advantages of low power consumption, small size, not easy to be disturbed, easy to match with the microprocessor, and can convert different temperatures into corresponding digital signals. The location of the sensor will affect the accuracy of the measurement. In this design, only one sensor is used to simulate and collect the temperature inside the car, but in practice, it can be placed in multiple positions in the car to reflect the temperature inside the car more comprehensively. DS18B20 collects the external temperature and transmits the collected signal to the single-chip microcomputer through the P3.7 port through the digital signal.2.3 Liquid crystal display moduleThis design chooses LCD1602 as the display module. It has a display capacity of 16×2 characters, which can not only display the current temperature, but also display the parameters of the switch control quantity and the working status of the relay. LCD1602 working voltage is 4.5V to 5.5V, when the voltage does not reach the rated working voltage, the display will not work. The current of LCD1602 is 2mA when the operating voltage is 5V. In order to reach the rated voltage of the display, this design adds an AC direct transformer to change the 220V voltage to 5V to ensure the normal operation of the display module.3. Functions realized by bus temperature control systemThe temperature is collected and displayed. The temperature in the bus is displayed through the temperature sensor DS18B20 and the liquid crystal display LCD1602.Temperature control button information collection. The single-chip microcomputer judges whether there is a button pressed every 3 minutes. If no button is pressed, it will continue to collect and measure the temperature; if a button is pressed, it will judge whether to heat up or cool down.Temperature adjustment. Set a temperature change value of 2°C. When the single-chip microcomputer judges that the temperature needs to be raised or lowered, the relay is turned on to make it work, and the temperature rise or fall operation is completed until the temperature reaches the change amount requirement.The temperature is kept relatively constant. After the temperature adjustment is completed, the next collection control is carried out, and the limited condition is that the temperature change within 1h does not exceed 6°C. In order to avoid continuous temperature adjustment or someone maliciously changing the temperature, the air conditioner setting temperature of the system should not be lower than 16°C in summer and not higher than 30°C in winter.SummarizeThe bus temperature control system based on single-chip microcomputer aims to improve the temperature comfort of passengers in air-conditioned buses without increasing the workload of bus drivers. By installing temperature control keypads in the front, middle and rear parts of the car, passengers can decide the temperature in the car by themselves.After many times of software and hardware debugging, it can be seen through simulation experiments that the bus temperature control system based on the single-chip microcomputer has realized the detection, collection and display of temperature. After the single-chip microcomputer processes the key data, it can automatically complete the heating and cooling functions. . Therefore, this temperature control system can be popularized and applied in air-conditioned buses.In addition, in practice, when the bus enters and exits the bus, the doors open when passengers get on and off the bus, and the temperature inside the bus will change significantly. At this time, the temperature measurement and button statistics will cause inaccurate temperature adjustment. Therefore, this drawback will be eliminated in the future. The design still needs further improvement.The above are the technical details of the bus temperature control system design based on the single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-12
2021
Design of intelligent window closer in rainy weather based on single chip microcomputerThe rainy weather intelligent window closer is composed of a controller system, a sensor system, an actuator system and a display system. The controller system is a single-chip microcomputer, the sensor system is composed of a raindrop sensor and a temperature sensor, the actuator system is a stepping motor, and the display system is an LCD1602 liquid crystal screen. Each system has a clear division of labor, each performs its own duties, and cooperates with each other to form a rainy day intelligent window closing. device as a unified whole.1. Working process of intelligent window closing system in rainy daysFirstly, the single-chip microcomputer detects the external environment through the raindrop sensor, and after A/D conversion, the signal is transmitted to the single-chip microcomputer, and then the single-chip microcomputer judges whether the rainwater value reaches the threshold value, so as to realize the opening and closing of the window.2. Hardware introduction of smart window closer in rainy weather(1) The minimum system module of single-chip microcomputer: STC15W4K32S4 single-chip microcomputer is used in this design. The STC series single-chip microcomputer is developed on the basis of the traditional 8051. STC single-chip microcomputer has carried out a comprehensive technical upgrade and innovation. Compared with the traditional 8051 core single-chip microcomputer, it has better performance and advantages. It has a wide voltage range and can work normally within the voltage range of 2.4 ~ 5.5V; it all adopts Flash technology, and the erasing and writing times are more than 100,000 times; it adopts ISP/IAP (in-system programmable/in-application programmable) technology; enhanced 8051CPU , 1T type, that is, there is only one system clock per machine cycle, and the speed is 8-12 times faster than the traditional 8051 single-chip microcomputer; there is a high-reliability reset circuit inside, and the 16-level reset threshold voltage is optional during ISP programming, which can completely save the external reset circuit; has a high-precision R/C internal clock, which can completely save the external expensive crystal oscillator; when ISP programming, the internal clock 5~35MHz is optional; greatly improves the integration level, such as integrating 8-channel high-speed 10-bit ADC, The speed can reach up to 300,000 times per second.(2) Raindrop sensor module: The raindrop sensor is used to detect whether it is raining and the amount of rain. The sensor has properties such as oxidation resistance, good conductivity, and long life. It is equipped with a potentiometer to adjust the sensitivity. The working voltage is 3.3V to 5V. It uses a wide voltage LM393 comparator. When it rains, through the raindrop sensor, using the principle of the conductivity of water, the sensor board that is not connected is turned on, after A/D conversion, it is transmitted to the single chip microcomputer, and the rainfall is displayed on the LCD screen.(3) Temperature sensor module: The temperature sensor used in this design is LM35D, which is used to detect the outdoor temperature, convert the analog quantity into digital quantity, and display it on the LCD1602 liquid crystal screen. The sensor has the advantages of high sensitivity, good linearity, wide operating voltage and very low power consumption. The output voltage of the sensor has a linear relationship with the Celsius temperature scale. When the temperature is 0°C, the output is 0V. Whenever the temperature rises by 1°C, the output voltage increases by 10mV. The conversion formula is U=T×10mV.(4) Stepping motor drive module: As the name suggests, the stepping motor is stepping and rotating. Its function is to convert the pulsed electrical signal into a corresponding angular displacement, that is, to give a pulse signal, the stepping motor will rotate an angle. The speed and stop position of the motor only depend on the frequency of the pulse signal and the number of pulses, and do not change with the change of the load. The stepper motor drive circuit needs ULN2003 driver chip to realize. The ULN2003 driver chip is composed of high withstand voltage, high current, and 7 silicon NPN Darlington tubes inside. Each pair of Darlingtons in ULN2003 is connected in series with a 2.7K base resistor, which can be directly connected to TTL and CMOS circuits at a working voltage of 5V, and can directly process data that originally required standard logic buffers to process; ULN2003 works The voltage is high, the working current is large, the sink current can reach 500mA, and it can withstand the voltage of 50V in the off state, and the output can also run in parallel at high load current. In this design, the role of the stepper motor is to realize the switch window.(5) Display module: The display adopts LCD1602 liquid crystal screen, which can display 32 characters and 2 lines, that is, 16 columns x 2 lines. There is a potentiometer, which can adjust the contrast by itself. There is a reset circuit inside the LCD, which can be used to provide various control commands, such as: clear screen, character flashing, cursor display, character shifting, etc. In this design, it is used to display the outdoor temperature, rainfall, and the opening and closing status of the windows.3. Test results of rainy weather intelligent window closer systemIn the experiment, we set the threshold to 30. In the automatic mode, when the rainfall is greater than 30, the window will be automatically closed. When the rainfall is less than 30, the windows open automatically. In manual mode, the device realizes opening and closing windows under the control of keys. Automatic and manual mode can be switched arbitrarily. After repeated experiments and tests, it has been verified that the performance of the equipment is stable and reliable.SummarizeSmart home has brought new experience to people's life, and with the development of science and technology will further improve our life, rainy day intelligent window closing system has solved practical problems in people's life. In the future, more functions will be added on the basis of this device, such as intelligent alarm system and intelligent anti-theft system, to create a comfortable and intelligent home space.The above is the rainy weather smart window closer design technology based on single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-11
2021
Single-chip microcomputer button debounce technology and its extended applicationWhen using a single-chip microcomputer to build a human-computer interaction system, it is necessary to use a keyboard. The switch used for the usual buttons is a mechanical elastic switch. When the mechanical contacts are opened and closed, the voltage signal is switched. It is very necessary for the system to accurately sample the input logic 0 or l of the keyboard to avoid wrong input. The ideal keyboard input characteristics are: when the key is not pressed, the input is a logic l, and when it is pressed, the input immediately becomes a logic O, and when it is released, the input immediately becomes a logic 1.However, the input characteristics of the actual keyboard may not be perfect due to the influence of the manufacturing process and the like. Due to the elastic effect of the mechanical contact, a key switch will not be turned on stably immediately when it is closed, nor will it be disconnected suddenly when it is turned off. Therefore, there is a series of jittering at the moment of closing and disconnecting. The length of the jittering time is determined by the mechanical characteristics of the key, generally 5ms-10ms. The working time of the single-chip microcomputer is at the level of nanoseconds and milliseconds. When the button is pressed and the contact is about to be in full contact, the on-off state of the keyboard may have changed many times. That is, during this period of time, the keyboard has entered logic 0 and 1 multiple times. That is, the input is out of control. If these inputs are responded to by the system, the system will temporarily be out of control, which we want to avoid as much as possible. The same is true for the period from when the contacts are about to separate to when they are completely separated.The keyboard actually produces instantaneous high-frequency interference pulses when inputting logic transitions. In order to ensure that the CPU processes only one key closure once, key jitter must be removed. That is, the state of the key is read when the key is closed and stable, and it must be judged that the key is released and stable before processing. The purpose is to eliminate interference to achieve ideal input characteristics.There are two stages to try to eliminate this interference: 1. Before the keyboard signal is input into the system (outside the system): 2. After the keyboard signal is input into the system (inside the system).1. Hardware debounceEliminating the jitter interference before the signal is input into the system can save system resources and improve the system's responsiveness to other signals. This is hardware debounce.(1) Basic RS hardware debounce: Use two "NAND gates" to form an RS flip-flop and use the memory function of the basic RS latch to eliminate the impact of switch contact vibration. There is only one flip of the output end every time the switch S switches, and there is no jitter waveform.(2) Capacitive filter debounce: The use of RS latch debounce is only suitable for single-pole double-throw switches. The keyboards commonly used in practical applications are mostly keys with two terminals. The common hardware debounce method for this type of key is to connect a capacitor in parallel on the key, use the capacitor discharge to delay the smoothing wave, and then adjust the Schmidt inverter to obtain a glitch-free pulse wave.(3) Interrupt method debounce: each button is externally connected to the external interrupt port. When a button is pressed, it will cause the interrupt of the single chip microcomputer. The advantage of this method is that there is no need to continuously loop the query in the main program. As long as there is an interrupt, then do the corresponding processing. The disadvantage is that the interrupt source of a single-chip microcomputer is very precious, so few people use this method.2. Software delay debounceAs mentioned earlier, if the hardware anti-shake circuit is used, then N keys must be equipped with N anti-shake circuits. Therefore, when the number of keys is relatively large, the hardware anti-shake will not be able to do the job. In this case, I can use software for anti-shake. The essence of software debounce is to reduce the sampling frequency of the keyboard input port to omit the high-frequency jitter, that is, to detect the key closure and execute a delay program to generate a delay of 5ms to 10ms, so that the state of the key is detected again after the front jitter disappears. , if the closed state level is still maintained, it is confirmed that there is a real key pressed. When it is detected that the button is released, a delay of 5ms to 10ms is also given, and the processing program of the button can only be transferred after the jitter of the trailing edge disappears.3. Extended application of software debounceIn practical applications, the software anti-shake technology is not only applied to the buttons, but also can be applied to other places to make the program run more in line with our requirements, as in the following two situations:1) In some cases, for example, the system is subject to external vibration, and there will be level jitter in the button circuit, but this jitter is not the operation the controller wants. If there is no anti-shake program, the system will be affected by this unwanted interference. And wrong action.2) In order to avoid system misjudgment, an anti-shake program can be written. The following is the first case (in the stroke control system) using this technology shield to see if it can improve the system performance and better realize the function I make up for the lack of common methods! Take a simple industrial control project as an example to illustrate Gu Mu’s request to power on Finally, a common motor controls a slider that is pushed from the left to the right and there is a limit switch on the far right. After the slider touches the limit switch, the machine stops and the movement ends.Convert it into a single-chip programming idea and use one IO port to output the motor to move when the level is low, and the motor to stop when the level is low. The other 1 IO port is used as an input method to fully measure the level status of the travel switch. If it is found to be high, it means that it has not touched the travel switch sensor. If it is found to be low, it means that it has touched the sensor. At this time, it can send out Command to stop the motor.Idea 1: Directly judge that the level state of the travel sensor is wide and low level is found, it is considered that the motor has touched the travel switch and immediately stops the motor.The advantage of this idea is that the response is timely, but the disadvantage is that it is too sensitive and the anti-interference ability is very poor. In the industrial control environment, when the motor is running, if the input signal of the travel switch is disturbed by power fluctuations or external glitch signals, it may be read. The momentary low-level situation caused the single-chip microcomputer to misjudge and stop the motor in advance, and the machine stopped hastily before touching the travel switch.Idea 2: Add software anti-interference processing (software debounce technology) when judging the level status of the travel sensor. Once a low level is found, a timer starts counting. Immediately clear the timer. If it is always low and there is no high level during the period, it is considered to be a stable low level. At this time, it is determined that the travel switch has been touched.The advantage of this idea is that the addition of anti-interference processing can almost 100% ensure that the motor stops when it touches the limit switch, and there will be no misjudgment by the first idea. The disadvantage is that a small delay is added in the anti-interference link of the software, and this small delay will cause the motor to not stop immediately after touching the limit switch. After a long time, it is easy to crush and squeeze the limiting mechanical structure on the right.Idea 3: This idea is to combine the advantages of the previous two. When judging the level state of the travel sensor, when it is found to be a low level (even if it is a momentary low level when there is interference), the motor will immediately pause and stop. The concept is different (although the motor is not rotating), when it is found that the machine continues to run when it is high Only when it is considered that the travel switch has been touched. During the small delay period for judging the low level, the motor is in a paused state and does not rotate), so it will not overshoot and squeeze the travel limit mechanism on the right.The advantage of this idea is that it can respond in time and increase the anti-interference processing of the limit switch detection, and will not let the motor overshoot and squeeze the limit switch on the right. The third idea can better realize the function and effectively prevent interference!SummarizeTraditional single-chip microcomputer systems are mostly serial processing and can only process some interrupt programs in parallel. For such a system, only pure software or hardware debounce can be used, but neither is perfect. In actual application, in order to improve the stability and reliability of the system, the software debounce technology is often applied on the basis of the hardware debounce technology, which can better meet the needs of the system.The above is the MCU button debounce technology and its extended application introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-10
2021
Design of intelligent wheeled robot based on Arduino microcontrollerWheeled robots can complete the task of automated handling operations in industrial applications. In today's society, with the increasing modernization of production conditions, the requirements for labor productivity are getting higher and higher, and enterprises pay more attention to efficiency. The role of robots in various fields of society is increasing. The research on robots has become a hot topic, and various robot competitions have attracted people's attention.Today, under the background of the development of the Internet, platforms such as online shopping have been born, and at the same time, it has injected a strong impetus into the vigorous development of the logistics industry. In the logistics center, the sorting of express delivery is basically done manually. Manual picking is inefficient and error-prone. With the increase of business volume, more manpower has to be added. Therefore, the construction of automatic sorting is the key to the development of express delivery. inevitable direction. Therefore, the research and innovative application of intelligent sorting robots will largely solve some problems faced by the logistics industry. More importantly, some functions realized by robots can be applied to all walks of life, which fully reflects the importance of intelligence for people's life and The convenience brought by production.This robot experiment project adopts the design method of wheeled robot, which is a kind of mobile robot. The robot is required to be able to transport the object to the corresponding location through the designated route, and at the same time, the handling robot can automatically avoid obstacles in the route and autonomously cope with the complex road environment. The handling robot can realize long-distance control through wireless transmission technology, and can better serve human beings.1. Development idea of intelligent wheeled robot solutionThe intelligent handling robot is driven by four wheels, each wheel is controlled by a DC motor, and the steering of the robot is controlled by controlling the rotation of the motor. The robot recognizes obstacles through the ultrasonic module or infrared sensing module, and transmits the information collected by the module to the single-chip microcomputer. After the judgment of the single-chip microcomputer, it sends instructions to the IO port of the control motor to make the robot complete the corresponding steering action. Artificial wireless control is realized through Bluetooth module and mobile phone software. The robot can be wirelessly controlled to complete the instructions of forward, backward, left turn, and right turn, so that the robot can reach the designated position.2. Hardware system design of intelligent wheeled robotThis experimental project uses the Arduino control board. This chip is responsible for controlling the state of the motor, processing the information collected from each module, and then issuing corresponding instructions. This project is mainly based on experimental innovation. Due to the small size of the dry battery, it is easy to use, and can be arbitrarily combined into a DC power supply of the required voltage, so the dry battery is used for power supply. In this experiment, two 3.7V high-capacity 18650 lithium batteries are used as power supply to provide stable and reliable working voltage for each module in the system.The robot design adopts the design concept of a wheeled robot. Each wheel is equipped with a DC3-6V DC geared motor with a reduction ratio of 1:48 and a working voltage of 3-6V. A suitable motor occupies a very important position in the experiment. Durability, environmental protection, and shielding from environmental interference are all parameters to be considered, and a good motor is also obviously helpful in the tolerance of the code.The motor drive scheme used in this experimental project is the TB6612FNG circuit. TB6612FNG is a dual driver, and the motor power interface has a reverse polarity protection circuit. Compared with the traditional L298N, the efficiency is much improved, and the volume is also greatly reduced. The ultrasonic module is composed of a transmitting circuit and a receiving circuit. The ultrasonic sensor used in this experiment is the most common HC-SR04, which uses a voltage of DC5V and outputs 5v high level and 0v low level. The static current is less than 2mA, the sensing angle is not more than 15 degrees, the detection distance is 500cm, and the accuracy can reach 0.3cm.SR04 is a sensor that uses ultrasonic characteristics to detect distance. It has two ultrasonic probes, which are used to transmit and receive ultrasonic waves respectively. First use Arduino's digital pin 13 to input a trigger signal of at least 10us to the TRIG pin, the module will automatically send out 8 40KHZ ultrasonic pulses, and automatically detect whether there is a signal return. Once an echo signal is detected, the ECHO pin will output a high level, and the distance between the robot and the measured obstacle can be obtained according to the duration of the high level, thereby completing the obstacle avoidance task.The basic principle of infrared sensor line hunting is to use the reflective properties of objects. This experiment is to patrol the black line. The four-way infrared sensor is connected to the A1, A2, A3, and A4 ports on the Ar-duino main control board. When the infrared ray is emitted to the black line, it will be absorbed by the black line. , emitted to other colors will be reflected to the infrared receiving tube. The trajectory of the car is judged by the change of the high and low level of the IO port on the main control board.3. Software design of intelligent wheeled robotIn the design of microcomputer control system, in addition to the system hardware design, a lot of work is how to design the application program according to the actual needs of each production object. Therefore, software design plays an important role in the design of microcomputer control system. For this system, software is more important.In the single-chip control system, it can be roughly divided into two basic types: data processing and process control. Data processing includes: data acquisition, digital filtering, scale transformation, etc. The process control program is mainly to make the single-chip computer calculate according to a certain method, and then output it in order to control the production.In order to accomplish the above tasks, in software design, the whole process is usually divided into several parts, and each part is called a module. The so-called "module" is essentially a relatively independent program segment that completes a certain function. This programming method is called the modular programming method.The main advantages of the module programming method are: a single module is easier to write and debug than a complete program; modules can coexist, and a module can be called by multiple tasks under different conditions;Modular programs allow designers to divide tasks and utilize existing programs, providing convenience to designers. The system software adopts a modular structure, which is composed of a main program, a timing subroutine, an obstacle avoidance subroutine, an interrupt subroutine display subroutine, a speed control subroutine, and an algorithm subroutine.After the intelligent sorting robot carries the objects, it should drive to the designated area according to the planned route and wait for the objects to be unloaded. Objects of different colors will be transported to different classification areas. Then the robot will return to the initial area to start the next round of tasks, and so on. The system software design of this project mainly includes the line-finding motion subroutine, the obstacle avoidance subroutine and the color recognition subroutine. The intelligent sorting robot can realize the whole set of task process without the cooperation of each module function.This experiment uses Arduino single-chip microcomputer to design a robot that can realize sorting, which has the characteristics of line hunting, color recognition, and obstacle avoidance.The above is the design technology of intelligent wheeled robot based on Arduino microcontroller introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-09
2021
Traffic risk voice warning system based on ultrasonic and single chip technologyAt present, when people drive cars on the road, they still mainly judge with the naked eye, observe the road conditions, and use signal lights to transmit information in the workshop. Secondly, my country's vehicle-mounted road traffic warning system is relatively backward. Generally, ultrasonic technology is only used in reversing radar, and the scope of application is relatively narrow. In vehicles, most voice warnings are still GPS-based speed limit and speeding reminders. At present, the car reversing radar is mainly a car safety system with a distance display of a digital tube or an LCD screen and a voice alarm with a buzzer. There are very few devices equipped with real-time measurement of the distance between vehicles and the speed of front and rear vehicles on the car. Most cars do not have their own "eyes", and the cost of equipment such as laser ranging is relatively high. Tube display speed or distance, easily distract the driver's attention, causing many accidents.1. Design principle of traffic risk voice warning systemThe car voice risk warning device in this work includes a single-chip microcomputer control circuit, an ultrasonic distance measuring sensor, a voice chip, etc. The device organically combines all components, and completes the measurement of the speed through the transmission and reception of ultrasonic waves. At the same time, the single-chip microcomputer works. Complete the voice broadcast project. When the system is working, two ultrasonic probes are used to transmit and receive ultrasonic waves respectively to measure distance and relative speed. This system can measure the speed and distance of the front and rear vehicles. When the distance between vehicles is less than 5m, the voice will prompt the real-time distance and its relative speed, so as to play the role of prompting and alarming. This system utilizes the one-chip computer to collect the ultrasonic signal cycle continuously. The system includes an ultrasonic sensor, a single-chip microcomputer control, and a voice chip. This design can measure distance and speed continuously, and after the data is processed by the single-chip microcomputer, it will give voice broadcast warning.1.1 Selection of Ultrasonic ModuleAccording to the design requirements of this system, apply T/R-40 ultrasonic sensor to this system.Ultrasonic emission process: The emission circuit is mainly composed of ultrasonic emission transducer T40 and inverter 74LS04. When working, the 40kHz square wave signal output by the P1.0 port of the single-chip microcomputer is sent to an electrode of the ultrasonic transducer after passing through the first-stage inverter, and the other square wave signal is sent to the ultrasonic transducer after passing through the two-stage inverter. The other electrode is to apply the square wave signal to both ends of the ultrasonic transducer in the form of push and switch, so that the emission intensity of the ultrasonic wave can be improved. Two inverters are connected in parallel at the output end to improve the driving capability. On the one hand, the upper resistors R1 and R2 can increase the damping effect of the ultrasonic transducer and shorten its free oscillation time; on the other hand, it can improve the drive capability of the high-level output of the inverter 74LS04.Ultrasonic receiving process: The ultrasonic receiving circuit is composed of a two-stage amplifier circuit, an ultrasonic sensor and a phase-locked loop circuit. Since the reflected wave signal received by the ultrasonic sensor is very weak, a two-stage amplifier circuit is used to amplify the signal received by the sensor. When the phase-locked loop circuit receives the signal whose frequency meets the requirements, it sends an interrupt request to the microcontroller. Since the frequency of the ultrasonic wave sent is 40kHz, the center frequency of the phase-locked loop is adjusted to 40kHz to help adjust the relevant components, and only respond to the signal of this frequency, avoiding the interference of other frequency signals. When the ultrasonic sensor receives the ultrasonic signal, it is sent to a two-stage amplifier for amplification, and the amplified signal enters the phase-locked loop for detection. If the frequency is 40kHz, a low-level interrupt request signal is sent from pin 8 to the P3.3 end of the microcontroller. Stop the timer's work after detecting low level.1.2 Selection of MCUAccording to the actual requirements of this system design, the AT89S51 single-chip microcomputer is selected as the single-chip microcomputer of this design. The 51 series single-chip microcomputer is fully compatible with the standard 52 series single-chip microcomputer in terms of hardware structure, instruction system and on-chip resources. The 51 series MCU has low power consumption and fast execution speed. The maximum clock frequency can reach 90MHz. It can be programmed in both applications and systems without occupying user resources.1.3 Choice of voice chipThe ISD2560 voice chip has a recording and playback time of 32s~120s, and the sound quality is good. The chip contains an oscillator, adopts CMOS technology, and has the characteristics of automatic gain control, microphone preamplification, smoothing filter, anti-aliasing filter, speaker driver and EEPRIM array. The sampling frequency of the voice chip is 8kHz. The lower the sampling frequency of the same series of products, the longer the recording and playback time, but the passband and sound quality will be reduced. ISD2560 can repeat recording and playback 100,000 times. It is a permanent memory voice recording and playback circuit. ISD2560 saves the A/D and D/A converters and has a high degree of integration.1.4 Working principle of distance and relative speed calculationWhen the system measures the distance and speed, the ultrasonic sensor installed on the same horizontal line emits ultrasonic waves. After encountering obstacles, the ultrasonic waves are reflected back and accepted by the receiver, and then the distance is determined by the time of ultrasonic reflection. The specific operation is firstly that the ultrasonic emitting probe emits ultrasonic waves in the direction of reversing. At the same time, the timer starts to work and records the time. As long as the ultrasonic waves encounter obstacles on the way in the air, they will be reflected back. When the ultrasonic receiver receives After reaching the reflected wave, a negative pulse will be sent to the microcontroller to stop timing immediately. In this way, the timer can accurately record the time it takes for the round-trip propagation between the ultrasonic emission point and the measured obstacle, and use the fixed formula to calculate the safe distance through the obtained data and give a prompt.1.5 System C programmingThe main program will first initialize the entire system, delete the necessary data, and then set the ultrasonic echo receiving flag, and make a port of the microcontroller output a low level to start the ultrasonic transmitting circuit, and the timer starts at this time At the same time, the subroutine for calculating the distance also starts to work, and then calculates the relative speed and distance to be measured according to the time recorded by the timer, and then calls the sound processing program to call the police. Finally, the main program completes the follow-up work by receiving the echo signal. In this way, the system will run continuously, using two measurement cycles as a calculation unit to calculate the relative speed, and then perform this operation continuously , and finally complete the measurement of distance and speed. The system adopts a modular design method, which consists of ultrasonic generating subroutine, main ultrasonic program, distance calculation subroutine, ultrasonic receiving interrupt subroutine and other programs.2. Research on MCU of voice warning systemLearn about the physical properties of ultrasound and the basics of single-chip microcomputers by consulting materials. In fact, many methods have been demonstrated by experts and have achieved certain results, which can be used after modification. Due to the author's limited ability and lack of knowledge, I can only simply modify and organize the knowledge to be used, and apply it to my own ideas. By consulting the parameters of each selected device, see if it meets the mainstream application and whether it can meet the design requirements.This work is based on the single-chip microcomputer to realize the prompt of distance and relative speed. It connects the ultrasonic distance measurement and the sensor, and uses the real-time control and data processing function of the single-chip microcomputer to measure and prompt the distance between the car and the obstacle and the speed relative to its own driving. In this way, the driver can directly judge the distance between the cars. The design of this device is simple, the degree of perfection is not high, but the scale is small, the components are few, the debugging is convenient, the cost is also low, the components are easy to replace, and it does not occupy the driver's visual space, which can completely relieve the driver's concerns and worries during the reversing process. Trouble, reduce the occurrence of accidents.SummarizeThe design of the automobile traffic risk warning system is mainly based on the control core of AT89C51 single-chip microcomputer, and at the same time, it is a voice alarm system based on ultrasonic distance measurement. Through theoretical analysis, the design scheme is basically feasible. When the system is working, the data collection is completed through the ultrasonic sensor, and then the single-chip microcomputer starts to work, calculates and processes the data, and finally prompts the driver with the result through the voice chip. Each device is cheap and easy to popularize. With the continuous development of science and technology, more and more ultrasonic technologies will appear in sensors. The application of ultrasonic can greatly improve the accuracy, and the design is simple and easy to operate. However, the technology in this area in our country is very limited at present. It is impossible to completely manufacture ultrasonic sensors. In the near future, ultrasonic technology will definitely meet the applications of various industries with the advantages of precision and convenience. This system lacks perfection, lacks correction, ignores the influence of temperature, and has relatively low accuracy. However, as a safety assistance system, combined with the driver's experience and subjective judgment, it can still avoid a certain degree of risk and has a relatively wide range of applications. foreground.The above is the design of traffic risk voice warning system based on ultrasonic and single-chip microcomputer technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-08
2021
Design of Intelligent Garment System Based on Single Chip ComputerThe rapid development of microelectronics, network communication and embedded technology has promoted the popularization and application of IoT innovations. In recent years, as a part of the Internet of Things industry, intelligent wearable devices have received widespread attention from all walks of life and are gradually entering people's lives, such as smart watches, smart glasses, and smart clothing. In order to make intelligent wearable devices better meet social needs and practical applications, and provide humans with intelligent, convenient and efficient services, scientific researchers and technicians in various fields have increased their research and application of wearable device technology. Clothing, as a necessity in people's daily life, ranks first in "basic clothing, food, housing and transportation". Integrating wearable technology and Internet of Things technology into clothing, research on smart clothing that integrates perception, drive, processing and transmission has become the mainstream trend of the market and the development hotspot of the times.Smart clothing was first used in special fields such as military and aerospace, and later gradually expanded to medical, health care, sports and other industries. For example, for smart clothing for human health, embedded technology and multi-sensor technology are usually applied to clothing, which can realize the collection and processing of blood pressure, pulse, heart rate, body temperature and other information of monitoring personnel. In the medical field, smart clothing is also used to study real-time monitoring of patients with high blood pressure and heart disease. In particular, product design that combines medical devices with smart clothing has become a current and future development trend. In order to make smart clothing better meet user needs, researchers also apply wireless communication and data transmission technologies to smart clothing. Compared with wired transmission technology, wireless communication has significant advantages in terms of economy, portability and comfort. In addition, smart clothing can also conduct in-depth research on the new functions of clothing, the degree of intelligence, and new materials.Since patients, children, and the elderly belong to vulnerable groups, they are not very sensitive to body temperature and external environment, and need comprehensive and real-time care throughout the process. This paper designs a smart clothing system based on the STC89 C52 single-chip microcomputer, which can sense data such as human body and ambient temperature, atmospheric pressure and air quality in real time, and transmit the data to the computer or mobile terminal through short-distance wireless communication technology, which is helpful for realizing 24-hour real-time monitoring of patients, children, and the elderly. In addition, a mosquito repelling sensor module with mosquito repelling function is designed by using special ultraviolet LED light-emitting diodes and ultrasonic sensors, so that the smart clothing system can effectively repel mosquitoes. At the same time, the design of multi-sensor data fusion mode is also the focus of this paper. Its purpose is to eliminate errors and redundant data in the monitoring process, avoid unnecessary interference, and obtain the comprehensive health evaluation value of monitoring personnel correctly. Helps to make a health assessment and take effective countermeasures.1. Overall scheme design of smart clothing system1.1 Overall system designThe smart clothing system uses plug-in technology to embed microelectronic devices such as sensors (such as temperature sensors LM335 A) and microprocessors STC89 C52 into smart clothing to realize real-time monitoring and processing of the health status of monitoring personnel and environmental information. , display, warning and other functions. The system mainly includes microprocessor module, sensor module, communication module, upper computer and monitoring terminal. The overall structure design of the smart clothing system is shown in Figure 1.1.2 Working principle of smart clothing systemThe smart clothing system designed in this paper is based on the S T C8 9 C5 2 microprocessor, which integrates modules such as temperature sensor, air pressure sensor, mosquito repellent sensor and ambient gas sensor, and uses Bluetooth wireless communication technology. First of all, the smart clothing system receives and forwards the data collected by multiple sensors through the installed Bluetooth device (Bluetooth transceiver), that is, uses the Bluetooth wireless communication protocol to forward the received monitoring personnel's health status data and environmental data to the nearby host computer . Secondly, the data is processed, optimized and stored on the host computer, and then transmitted to the remote monitoring terminal through Internet, 4G, GPRS and other networks to realize the functions of information storage, processing and display. Finally, users can view the comprehensive health status of personnel in real time through APP, IPAD, WEB, etc. on the remote monitoring terminal. At the same time, the system also uses a combination of light sensors and physical insect repellent modules, which can not only monitor human health around the clock, but also achieve the effect of repelling mosquitoes. The smart clothing system comprehensively uses technologies such as sensors, embedded development, communication and software development, which can sense human health status data and environmental data in real time, making it convenient for users to view various monitoring information and comprehensive health assessment through connected remote computers or mobile device terminals. value.2. Hardware design of smart clothing system2.1 Sensor moduleThe hardware design is mainly to design the monitoring equipment installed on the clothing, including the design of modules such as microprocessors, temperature sensors, air pressure sensors, mosquito repellent sensors and ambient gas sensors. The design principle of the microprocessor and each sensor module of the smart clothing system is shown in Figure 2.The temperature sensor module adopts LM335A high-precision temperature sensor chip, which mainly collects the real-time body temperature and ambient temperature of the monitoring personnel. The LM335A temperature sensor has high precision, small size, flexible and convenient power supply, and is more suitable for embedding into smart clothing systems. The key technology of the mosquito repellent sensor module is to make use of the mosquito's special aversion to special light sources and its sensitivity to a certain frequency of ultrasonic waves to achieve the effect of repelling mosquitoes. The light source of the designed mosquito repellent sensor module adopts 3 mm ultraviolet LED light-emitting diode; the ultrasonic sensor adopts SSE1625T plastic case ultrasonic sensor (16 mm/25 kHz).The air pressure sensor module is mainly to assist the smart clothing system to monitor the human health status data more accurately and effectively. The ambient air pressure is different, which will have a certain impact on the sensor data. Therefore, in order to make the various data monitored accurately reflect the real-time health status of the human body, an air pressure sensor module is especially embedded in the smart clothing system. The air pressure sensor used in the air pressure sensor module designed in this paper is the MS5611-01 B A03 sensor chip.The ambient gas detection sensor module is mainly for real-time understanding of the environmental status of the monitoring personnel. In recent years, environmental pollution has become increasingly serious, causing the living environment to seriously affect people's health and life. Vulnerable groups such as patients, children, and the elderly are more sensitive to the living environment, and need to pay attention to air quality at all times in certain occasions or situations. The smart clothing system designed in this paper integrates the ambient gas detection sensor module, which senses the air quality of the monitoring personnel's environment in real time through the environmental gas sensor, and comprehensively monitors various dynamic data to effectively evaluate the health status of the monitoring personnel. The smart clothing system adopts C C S8 1 1 digital air quality monitoring sensor with low power consumption and small size, and the gas sensor is controlled by a single-chip microcomputer to collect gas data.2.2 Control circuit moduleThe STC89 C52 processor is a low-power, high-performance microcontroller with 8K system programmable Flash memory. The STC89 C52 microprocessor is widely used in single-chip microcomputers, providing more flexible and effective solutions for many embedded control application systems.The smart clothing system can be based on the minimum system circuit diagram of the STC89C52 single-chip microcomputer, combined with the above-mentioned various sensor modules, and use Bluetooth communication technology to realize the collection and transmission of sensory data.2.3 Principle of communication circuitProteus is a well-known EDA tool (simulation software) in the UK, including schematic layout, code debugging, and co-simulation of single-chip and peripheral circuits. One design platform. The tool can be used to realize the design, debugging and simulation of the communication circuit of the smart clothing system.3. Software design of smart clothing systemThe hardware device designed for the smart clothing system must rely on the program to realize the data collection and transmission functions of each sensor.3.1 Monitoring platform designThe monitoring platform of the smart clothing system can facilitate users to view monitoring information. The system monitoring platform can be accessed on the host computer, remote WEB terminal, mobile terminal, etc. Its functions mainly include the display and query of various sensor monitoring data, comprehensive evaluation of human health and other information. Among them, the comprehensive evaluation value of human health is the fusion value processed by multi-sensor data fusion technology; the human body temperature value can simultaneously check the local temperature of the monitor's left armpit, right armpit, front chest and back. All data can not only be visually displayed in digital form, but also can display real-time data change curves.3.2 Data processingIn terms of data processing, the smart clothing system mainly adopts the multi-sensor data fusion method, and the multi-sensor data is transmitted to the host computer for data fusion. Usually, in the process of human health status data collection, there may be factors such as external environment and system abnormalities, which may cause packet loss, redundancy, inaccuracy or errors in the monitoring data. Therefore, the data collected by the smart clothing system is fused into more accurate and effective data to achieve the purpose of comprehensively evaluating human health.in conclusionThis paper designs a smart clothing system based on STC89C52 microcontroller by analyzing the research status of smart clothing. The system senses and monitors the health status information of personnel (such as patients, children, the elderly and other special groups) in real time, and uploads multi-sensor data such as human body temperature, ambient temperature, atmospheric pressure and air quality to the host computer through Bluetooth technology, and monitors multiple The sensor data is first-level and second-level fusion, and then the more accurate and effective data after fusion is transmitted to the remote monitoring platform through the Internet or mobile network, and users can browse in real time through the WEB system or APP to check the health status of the monitoring personnel , and pay attention to the health changes of the monitoring personnel in a timely manner according to the system reminder and early warning function, so as to take corresponding remedial measures as soon as possible. At the same time, the system also uses the principle that mosquitoes are particularly disgusted by special light sources and sensitive to ultrasonic waves of a certain frequency. A mosquito repellent sensor module with light-emitting diodes and ultrasonic sensors is designed in the smart clothing system, which has a good effect of repelling mosquitoes. .The intelligent clothing system designed in this paper has practical functions, convenient operation, easy implementation and promotion, and has broad application prospects. In the future, smart clothing will continue to improve in terms of materials, technology, comfort, and style, and will integrate medical diagnosis, health monitoring, and safety protection into one. While studying the comprehensive design and development of smart clothing systems, people will pay more attention to the practicability and health of smart clothing, especially starting from the actual needs of society and the market, integrating new technologies, new materials and multidisciplinary research for in-depth research , to promote the intelligent, networked, popular and commercial development of smart clothing and wearable devices.The above are the details of the smart clothing system design of the single-chip microcomputer 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-07
2021
Design of fire alarm system based on single chip computerThe number of fires in the world is increasing year by year, among which fires in residential areas account for the largest proportion, causing serious casualties and economic losses. At present, many fire alarm systems are widely used in various places, but they generally have the problem that they cannot send alarm signals to management personnel in time. Therefore, it is urgent to design a multi-channel fire alarm system with fast response and automatic alarm, so as to accurately detect the disaster in the early stage of the fire and send alarm messages to the mobile phones of the management personnel in time.1. Fire alarm system schemeThe structure of the fire alarm system is shown in Figure 1. The whole system can be divided into two parts. One is the monitoring and display alarm part of the receiving end of the upper computer, and the other is the temperature and smoke concentration testing subsystem of the lower computer. In this design system, there are three groups of test subsystems. The upper computer subsystem and the lower computer subsystem are connected by NRF24 L01 wireless communication module, and the communication mode is one-to-three.In each subsystem of the lower computer, the single-chip microcomputer msp430 is used as the central control unit, and the temperature and smoke concentration of the surrounding environment are detected by the smoke detection module and the temperature detection module, and the data is transmitted to the upper computer subsystem through the wireless communication module NRF24L01, which is the monitoring display terminal. The control chip in the monitoring display terminal also adopts msp430. When the system receives the data sent by the lower computer, it will display the data through the LCD 12864. If the received data value is higher than the set value of the system, the system will sound an alarm, and at the same time send an alarm message to the administrator's mobile phone through the GSM module to remind. Among them, the upper computer can adjust the limit value of the alarm through the keyboard module.2. Hardware design of fire alarm systemThe hardware part of the fire alarm system mainly includes the monitoring and display part of the receiving end of the upper computer, the NRF24L01 wireless communication module, and the temperature and smoke concentration acquisition unit of the lower computer.The hardware part of the receiving end of the upper computer mainly includes the core controller, 12864 liquid crystal display module, keyboard module for setting the alarm range, the minimum system module of single-chip microcomputer, GSM communication module and NRF24L01 interface circuit.(1) Core controller: MSP430 single-chip microcomputer is a 16-bit ultra-low power consumption microprocessor, which has the characteristics of powerful processing capability, high integration, stable working status and rich on-chip peripheral modules. The fire alarm system chooses the msp430f169 of the msp430 series as the core controller, because the system not only includes a one-to-three NRF24L01 wireless communication module, but also adds a GSM communication module. These modules need many input and output ports, and require high program processing ability, which is difficult to realize with 51 single-chip microcomputer, but the upper computer subsystem and lower computer subsystem can solve these problems by using msp430 as the central controller.(2) GSM communication module: GSM communication module adopts SIM300, the main reason is that SIM300 can work at three frequencies of EGSM 900MHz, DCS1800MHz and PCS1900MHz. The shape and structure of the SIM is also very light, and its size is suitable for almost all industrial applications. SIMs are also frequently used in mobile devices such as smartphones and PDAs. In addition, the SIM has the function of voice call and short message sending, and the standby power consumption is low. The design system uses its SMS sending function. The receiving end and sending end of the GSM communication module need to be connected to the P1.0 and P1.1 pins of the microcontroller respectively. The module needs to set up three aspects to send SMS. First, set the GSM working mode; second, you need to set the PDU mode to send Chinese text messages; third, set the length of the text messages.(3) 12864 liquid crystal display and button circuit design: the system uses a three-way data acquisition module to collect temperature and smoke concentration. In order to facilitate the display of three-way detection values at the receiving end, a QC12864B liquid crystal display is specially used, which can display 4 lines of data while the picture is clear. Because the system contains 3 lower computer test systems, when the upper computer is displayed, it is set to display in three lines, and each line displays a group of temperature and smoke concentration, such as "No. 1: temperature 29 thick 10%", in the LCD screen Another line says "Settings: Temp **Concentrated**". Although the price of QC12864 LCD is higher than that of LCD1602, and the display program is complicated, its display effect has obvious advantages and can display information completely. The LCD1602 is only convenient for displaying numbers and letters, and can only display two lines, and the size of the display font is also limited.A button circuit is added to the upper computer system to adjust the alarm limit value of temperature and concentration. During actual use, the system will encounter seasonal changes, and the ambient temperature will change accordingly. Therefore, it is necessary to adjust the alarm temperature value. For example, if the ambient temperature is high in summer, the alarm temperature value needs to be raised appropriately, while in winter, the normal ambient temperature is low, and the alarm temperature value needs to be adjusted downward. Since it only needs to increase, decrease and confirm three function keys to work smoothly, and the matrix keyboard programming is more complicated, the key circuit does not use matrix keys when designing, but chooses 3 independent keys.2.2 NRF24L01 wireless communication moduleThe fire alarm system consists of two parts: the upper computer subsystem and the lower computer subsystem. The communication between the upper computer and the lower computer adopts NRF24L01 wireless communication module. NRF24L01 is connected with the central controller by means of SPI communication. The working frequency of NRF24L01 is 2.4-2.5GHz, which is highly versatile and can be connected to various single-chip microcomputer chips to complete wireless data transmission. In addition, it has low current consumption, with a current consumption of approximately 11.3 mA in transmit mode, approximately 12.3 mA in receive mode, and even lower power consumption in standby mode.In the circuit connection of the host computer subsystem, the 24L01 chip should be connected with the 6 pins of the microcontroller. Among them, CSN is the chip selection signal of the wireless module, which needs to be connected to P1.2, and the single chip microcomputer sends a signal to control whether to allow data input and writing to 24L01. MOSI is an input signal, which is connected to P1.3 of the single-chip microcomputer, and the single-chip microcomputer sends data to the wireless module. MISO is the output signal of the module, and it is the interface for the wireless module to send data to the single-chip microcomputer, and it is connected with P1.4 of the single-chip microcomputer. IRQ is the module output interface, which is the interface through which the wireless module generates an interrupt signal and sends it to the microcontroller, and is connected to P1.5 of the microcontroller. SCK is the input interface of the wireless module, the serial clock signal is connected with the P1.6 of the single-chip microcomputer, and the single-chip microcomputer sends a signal to control the operation rhythm of the wireless module's reading or writing. CE is the input signal of the wireless module, which is connected to P1.7 of the single-chip microcomputer, and the signal given by the single-chip microcomputer controls whether the internal radio frequency circuit of 24L01 starts to work. In the lower computer subsystem, the pins of the wireless communication module are connected to P2.0-P2.5 of the microcontroller. In the entire fire alarm system, a one-to-three communication mode is adopted, that is, one node receives and three nodes send. The upper computer works in the receiving mode, while the wireless modules in the three lower computers work in the sending mode, and then the detected temperature and smoke concentration data are sent to the upper computer system and displayed.2.3 Lower computer temperature and smoke concentration acquisition unit(1) Smoke concentration detection circuit design: The smoke concentration detection circuit adopts HIS-07 sensor. It is an ion-type smoke sensor, its performance is far superior to that of gas-sensitive resistance sensors, and it is particularly sensitive to tiny smoke particles. In addition, the line uses Motorola's MC14468. MC14468 is a special chip for ion smoke detection and alarm, with short alarm response time. Its pin 1 is the input signal terminal. When it detects that the smoke concentration changes, it outputs a high level from pin 1 to the P1.1 pin of the microcontroller.(2) Temperature detection circuit design: DS18B20 sensor is used in the temperature detection circuit, which can accurately and effectively collect the ambient temperature. Its advantages are high sensitivity and accurate data. DS18B20 has 3 pins, the pins on both sides are respectively grounded and the positive pole of the power supply, and the middle pin is the data output port, which is connected to the P1.2 port of the msp430 microcontroller. The microcontroller inputs the temperature detected by the temperature sensor to the inside through the P1.2 port. The temperature data collected by DS18B20 is an analog signal, and the msp430 microcontroller has an analog-to-digital conversion unit inside, and the circuit does not need to be connected to an additional analog-to-digital conversion chip. The analog signal is converted into a digital signal by content, and then displayed on the display screen.(3) Data display of the lower computer: LCD1602 display screen is used for the display circuit of the lower computer detection system. Since only the temperature and smoke concentration of the system need to be observed in the acquisition system of the lower computer, the LCD1602 can be used for complete display. The circuit wiring and driver of LCD1602 are relatively simpler than 12864, and it is the best choice for the lower computer system.3. Software design of fire alarm systemThe software program of the system is divided into upper computer program and lower computer program. Among them, the upper computer program part includes liquid crystal display, button program, upper computer communication program and GSM alarm program. The lower computer program includes temperature sensor data acquisition, smoke sensor smoke detection and wireless communication program.The execution process of the GSM alarm program: Enter the alarm program, input 1, the display will output the alarm of test group A, input 2, the display will output B alarm, input 3, the display will output and display the alarm signal of test group C. All alarm signals need to be transmitted to the SMS sending program, and finally the program is terminated.in conclusionThe innovation of this system lies in the following aspects. First, the use of smoke sensors. The system uses the ion smoke sensor HIS-07 and the special chip for ion smoke detection and alarm, which can detect the occurrence of fire faster and more sensitively. Second, the main control chip selects msp430 single-chip microcomputer. Compared with 51 single-chip microcomputer, msp430 single-chip microcomputer has lower power consumption and stronger processing ability, and the place where the system is used is a fire scene. When the fire causes indoor power failure, the msp430 single-chip microcomputer with small system power consumption is the best choice. Third, the design uses the GSM module to send SMS alarms, and the fire situation will be sent to the inspector at the first time, so as to rescue the victims in time.The above are the design details of the fire alarm system based on the single-chip microcomputer 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.
03-06
2021
Design of Intelligent Fully Opening Window Based on Single Chip MicrocomputerToday, technology is advancing rapidly. A large number of modern high-tech represented by artificial intelligence, microelectronics semiconductor technology, aerospace, biology, new energy, etc. are flourishing. The development of science and technology has brought great convenience to people, but windows have not undergone fundamental progress in this era of change. If there is a multifunctional smart window, designed with technical means, the traditional smart window can realize intelligent functions such as remote opening and closing of the window, active opening of the window in fire, and closing of the window in rainy days. In addition, the window has the characteristics of simple structure, strong applicability, and complete functions, which is very in line with the requirements of modern smart homes and has broad market application prospects.1. Functional characteristics of multifunctional smart windows1.1 Monitoring of dangerous situations: The window system will monitor the content of various gases in the room 24 hours a day. When the concentration of combustible gas or a specific gas reaches a pre-designed value, the window will automatically open to ventilate the outside. If the gas concentration returns to normal levels, the windows will automatically close.1.2 Close the window in rainy days: When the window is opened, the window system will start monitoring the rainy weather. Once the rainfall reaches a certain value and will affect the interior, the windows will be closed automatically.1.3 Remote control: The window system has a built-in Bluetooth communication module, as long as the remote control is used, the window can be controlled remotely. In addition, the windows can also be controlled by voice, as long as specific voice sentences are spoken, the opening/closing function can be realized after the windows are recognized.1.4 Adjust the temperature: The window system monitors the indoor temperature. When the temperature is too high, the window will automatically open and close when the temperature returns to the normal level.1.5 Automatic locking: The window has a built-in electromagnetic lock structure to realize the automatic locking function.1.6 Switching between mechanical and electronic operation: In order to prevent the window from being unable to work due to a power failure, the window can be switched to a manual operation mode by simply pressing a button.1.7 The window has an anti-theft function: after opening, if someone enters through the window, the window can be monitored and an alarm sound will be issued immediately.2. Mechanical Design of Intelligent Fully Opening Window System2.1 Fully open window structureThis smart window has changed the opening and closing method of traditional windows in the past, and adopts a "full window" structure to maximize the use of space. After calculation, the opening rate of this structure is as high as 94.5% (the maximum opening space of conventional sliding windows is only 45%). The outer frame of the window adopts an aluminum alloy structure, and its division flexibility is relatively large, and it can be made into a variety of facade effects. People can refit this type of window and apply it to various occasions.2.2 Internal mechanical driveThe multi-functional smart home full-opening window is equipped with various high-sensitivity sensors, such as smoke sensors, raindrop sensors, etc. On this basis, it can sense changes in the external environment, and then through the circuit, the motor starts to work. After the motor works, it drives the internal mechanical structure of the window to run with each other, thus realizing a series of functions such as automatic window closing in rainy days and automatic window opening in sunny days. The synchronous belt is driven by a high-torque motor wheel set, and a fixed clip is installed on the synchronous belt. The fixed clip is connected with the bottom window base, so that the left and right translation and sliding of the window can be realized. At the same time, the inertia of the window movement and the power on and off of the electromagnet are used to realize automatic locking.In the process of opening and closing the windows, the problem of "dead spot" will be encountered. After the window is closed, the two sashes are in the same straight line, and at this moment the dead point problem of the mechanism has just occurred. If you energize the motor in this condition, no amount of torque will open the window, and you'll just burn out the motor. In response to such situations, people add two springs between the two windows for "energy storage" to ensure that the windows still maintain a certain power after they are closed. When the window is opened, it can be made not on the same straight line, forming a small angle, so that the window can be opened and closed smoothly.3. Circuit Design of Intelligent Fully Opening Window System3.1 Overall DesignThe system is controlled based on the STC89C52 single-chip microcomputer. As a system controller, it has the characteristics of low power consumption, small size, large storage capacity, and easy realization of hardware functions.3.2 Motor drive module designThe smart window is a variety of external environment change sensing control circuits composed of stepping motors, STC89C52 chips, operational amplifiers, logic gate chips, various sensitive resistors, and remote controls to realize the intelligent opening and closing of stepping motors, thereby simply realizing the window automation.3.3 Temperature and humidity detection module designThis smart window takes single-chip microcomputer as the core, and uses temperature and humidity sensor DHT11 to design a detection system for ambient temperature and humidity. DHT11 is a temperature and humidity composite sensor with calibrated digital signal output. It applies special digital signal module acquisition technology and advanced temperature sensing technology, has high reliability and excellent long-term stability, and is widely used in laboratories, industries, environmental protection, sanitation and epidemic prevention, storage and transportation, greenhouses and other fields. Temperature measurement range: 0~50℃; Humidity measurement range:20%~90%RH. DHT11 has a data line, a power line, a ground line, and one (NC) floating. Directly connect the power line to the power supply VCC of the single-chip microcomputer, and connect the ground line to the GND of the single-chip microcomputer. The data line DATA is connected to the P1.0 port of the microcontroller, plus a 5kΩ pull-up resistor. The required temperature and humidity data is sent to the microcontroller through the DATA pin through P1.0, and the corresponding temperature and humidity data is obtained after corresponding processing in the microcontroller. After using this sensor, when the indoor temperature is too high, the smart window will automatically open to adjust the indoor temperature. Make the indoor environment comfortable and comfortable.3.4 Raindrop sensing module designRaindrop sensors have been used in cars in the past to control the speed of the wipers. The raindrop sensor is used to detect whether it is raining or the size of the raindrops. The raindrop sensor can work under the specified working conditions of the program design. The author innovatively applies the CCD camera raindrop sensor to this smart window, so that the system can detect rainy weather, so as to achieve the function of closing the window in rainy days. The sensor is installed in the protruding position of the window triangle, and can receive raindrops when it just rains. When the sensor receives raindrops, it sends a signal to connect the controller, and the controller makes the actuator act to close the doors and windows.3.5 Smoke sensing module designThe window is equipped with a soot sensor. When a certain concentration of gas in the room is detected to be dangerous to the human body, the alarm will sound, and at the same time, a signal will be transmitted to the circuit to realize automatic window opening. The smoke sensor is a gas sensor, which is a gas-electric converter, which converts the content (ie concentration) of flammable gas in the air into a voltage or current signal, and converts the analog quantity into a digital quantity through the A/D conversion circuit and then sends it to the single-chip microcomputer, and then the single-chip microcomputer completes the work of data processing, concentration processing and alarm control. This sensor has high sensitivity. When an abnormal gas concentration is detected, the window will be closed, and it will not be reopened until the smoke returns to the normal range.4. Software Design of Intelligent Fully Opening Window SystemThe control unit of this intelligent window control system selects STC89C52 single-chip microcomputer, which is a low-power consumption, high-performance CMOS 8-bit microcontroller of ATMEL Company, with 8kΩ system programmable Flash memory. The system uses Keil as the programming software and C language as the programming language.The external and indoor environmental conditions are detected by various sensors, and the corresponding opening and closing actions are judged by the single-chip microcomputer. After the power is turned on, each sensor is initialized and starts to detect various parameters of the environment. When the value reaches the set value, it starts to act. The highest priority is set in the program to manually open and close windows, and the automatic operation of all windows can be stopped manually, which fully reflects the humanized design, and the will of people is the top priority. The second priority is to prevent gas leakage. When gas leakage is detected, the motor will turn to open the window and give a voice alarm to ventilate in time. Thereafter, according to the importance of more sensors, they are prioritized sequentially.epilogueThe structure design of this intelligent window is ingenious, and it integrates various sensors such as temperature, humidity and smoke. High degree of mechanical and electrical integration, high reliability and strong stability. After its integration, the degree of intelligence is very high, and the concept of humanization is strong. It is easy to manufacture and install, and has a wide range of applications. It is suitable for introduction to high-end residences, hotels, schools and other scenarios, and has very broad application prospects.The above are the details of the intelligent full-opening window design based on the single-chip microcomputer 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 MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. 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.