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.
03-05
2021
Design of sound and light control lamp system based on single chip microcomputerWith the rapid development of society, technology is following closely behind. Many public places have taken many measures in terms of lighting. This will also be a current development trend. In addition to sound and light control in real life, microwave induction and human body There is also an infrared sensor switch. However, microwave induction is not stable enough and anti-interference is not ideal. Although infrared induction is more ideal than microwave induction in terms of performance, because its installation is more complicated and the price is relatively expensive, the scope of application of infrared induction is limited. , can only be used in some well-managed places, such as: hotels, restaurants, corridors and some fixed corridors. Although infrared sensors can be used to control lighting in these places, there are also price issues and unfavorable factors in installation management.The circuit design avoids the above instability, performance, price and installation limitations. It can meet most of the environment and can save energy in a limited amount.1. Hardware circuit design of sound and light control lamp systemThe course design circuit is composed of 51 single-chip microcomputer, LM393 voltage comparator circuit, electret microphone control circuit, photoresistor control circuit, relay control circuit, digital tube countdown, key switch display part.1.1 MCU and display partThe circuit is composed of a single-chip microcomputer, a triode, and two common anode digital tubes. The time countdown digital tube display circuit is shown in Figure 2; when the program enters initialization, the digital tube displays ten seconds, and when there is sound at night, the digital tube starts to count down when the relay is closed. The pins of the single-chip microcomputer output high and low levels to change the base voltage of the triode, so that Q2 and Q3 are turned off or turned on, thereby changing the bit display of the digital tube. The P0 port of the microcontroller outputs high and low levels to change the values of a, b, c, d, e, f, and use human visual effects to display different numbers. The two-digit digital tube is a common anode digital tube, and the segment selection is connected to the P0 port. By changing the high and low levels of the P0 port pins, the numbers are displayed, and the P2.3 pin is used to control the one-digit digital tube on and off, and the P2.7 is used to control the ten-digit digital tube on and off, and a certain time Scan at intervals, pull up or down the pins of P0 port, P2.3, and P2.7 to display the changes of different digital tubes on and off. The driving current of the single-chip microcomputer is limited, and it cannot drive the digital tube to light at the same time, so two PNP transistors Q2 and Q3 are added to drive the digital tube to display.Press the button S2 to pause the display and the light is always on, press the digital tube again to continue the countdown.1.2 Sound and light partFigure 3 shows the sound and light control circuit. By changing the resistance value of the photoresistor RRR, the voltage of the same input terminal INA+ is changed, and at the same time compared with the voltage of the reverse input terminal INA-, the resistance value of the photoresistor RRR is changed by the intensity of the external light, and the external light When it is strong, the resistance value of RRR is only a few hundred ohms, and when the external light is weak, the resistance value of RRR is tens of megohms. The photoresistor RRR and R5 resistor are connected in series in the circuit, and the change of RRR resistance causes the change of INA+ pin voltage. The INA+ pin voltage is lower than the INA- pin voltage and OUTA outputs a low level. At this time, the photoresistor works at night. The INA- pin voltage can be adjusted by the sliding rheostat R4.The electret microphone MK1 converts the sound into a weak voltage signal. When there is a sound, the microphone senses the sound and generates an AC signal, and then the AC signal causes a voltage drop across the voltage across C4, forcing C4 to charge. At this time, the base of the triode has a voltage, which meets the conduction condition of the triode. At this time, the collector pin becomes a high level. After the voltage of INB- is compared with the voltage of INB+, OUTB outputs a low level, and the conduction time of the triode depends on the capacity of capacitor C4.1.3 Relay partThe pin P3.7 of the microcontroller is connected to the base of the transistor Q1, and the transistor is used to turn on and off the relay, which becomes a relay drive circuit as shown in Figure 4: the base of the transistor Q1 is connected to P3 of the microcontroller. 7 ports, the output current of the I/O port of the microcontroller is about 20mA, so it cannot be directly used to drive the load. Q1 is used to amplify the current, the amplified current is ninety times, the rated current of the relay is 40mA, and the base current of Q1 is amplified enough to drive the relay to work. When the P3.7 port outputs a high level, the Q1 transistor is cut off, and when the P3.7 port outputs a low level, the Q1 transistor is turned on, the relay is energized, the relay is normally open, the electric shock is closed, and the load light is on.The LED is used to display the pull-in and disconnection state of the relay. When the relay is pull-in, the LED light is on, and when the relay is disconnected, the LED light is off.2. Installation of sound and light control lighting systemFirst draw the schematic diagram and check, compile the program, draw the simulation circuit and debug it, the software can be realized, and then prepare the materials needed for welding, as well as various tools, first test whether each device is good or not, and can correctly distinguish each device Positive and negative electrodes, how to use them, what to pay attention to when welding, the sequence of the welding process, one part is debugged after welding, the other part is inspected after welding, and problems can be solved if you know how to modify the program.3. Comprehensive inspection of sound and light control light systemBefore welding the circuit, it is necessary to measure each component separately to see if there are any bad components, to find out the positive and negative poles of each component and its function, and the order of welding. If some components have sockets, solder the sockets first, and insert the components into the sockets after soldering the sockets. When soldering electrolytic capacitors, digital tubes and LED lights, the temperature of the soldering iron should not be too high, and the soldering time should not be too long, so as not to burn out the components.After the circuit is soldered, it is necessary to check each pin to see if there is any false soldering or missing soldering on each pin, and use a multimeter to check whether the positive and negative electrodes of each component are connected together. Whether each pin is short-circuited, and whether some pins are supposed to be connected together are not soldered or soldered incorrectly. In particular, the pins of the single-chip microcomputer are too close, and a multimeter should be used to check whether the adjacent pins are short-circuited. Check whether the connection of each pin is correct, and whether the functions of the pins are wrongly soldered. After checking the basic measurements, don't rush to power on, insert the components into the socket, and then use a multimeter to measure each pin to see if there is any short circuit, open circuit, or false soldering. Finally, be sure to measure the positive and negative poles of the circuit to see if there is a short circuit.in conclusionThis course is designed for energy saving, using the combination of single chip microcomputer, sound and light to realize lighting. The research in this paper is suitable for use in homes, offices, corridors, buildings, and some public places as street lights. Its working principle uses the sound of people walking to be detected by the circuit, and at the same time it is determined that the light will be on at night, and the light will be turned off after a delay after the person leaves. Even if someone passes by during the day, the light will not turn on, and the power consumption of the circuit itself is low. It is powered by a five-volt power supply, and coupled with the characteristics of the circuit itself, this circuit has the effect of saving energy. The design has a wide range of use and is stable and reliable, and it is worthy of being applied to life.This course designs sound and photosensitive circuits to adjust their sensitivity, adds buttons to keep the lights on, and increases the display time of the lights to improve its practicability. When someone passes by continuously, it will re-update the countdown with the last person as the countdown, so that the design is more in line with the actual situation.The above is the design method of the sound and light control light 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-04
2021
Design and analysis of intelligent meter reading system based on single chip computerWith the continuous development of science and technology, people's life is increasingly inseparable from the support of electricity. In the current information age, people's production, life, study and other aspects are closely related to electricity. Therefore, people's electricity consumption is gradually increasing, which puts forward higher requirements for meter reading work. Traditional meter reading work cannot meet the current needs, so power companies must vigorously develop intelligent meter reading systems.1.The hardware design of the meter reading system1.1 Overall architecture designIn order to make the meter reading system more intelligent, it is necessary to add functions such as pulse counting, data storage and processing, display of power and status, and control of the communication center. First, the power collection technology module will calculate the data of the electric meter according to the pulse count, and store the data in the RAM inside the system. Secondly, the system kernel will send the data transmission order to the pulse technology module on time according to the set time, so that it can collect the data of the electric meter, and store the data in RAM according to the agreement set in advance, and then wait for the host computer Inquire, and record the number of the host computer that responds slowly and feed it back to the host computer. Finally, the upper computer has two operation modes, one is timing copying, and the other is copying at any time. Timing copying means that the host will query the data collected by each pulse technology module according to the time set by the system; while copying at any time means reviewing the data of a user separately under special circumstances. It is worth noting that in these two modes, it is necessary to back up the unresponsive computer data and give a warning.1.2 Each module designThe design of each module of the system is the core point of the intelligent meter reading system, mainly including backup power supply, power collection module, communication module, clock module, display module, etc. The selection and design of each module is related to the operation of the entire meter reading system efficiency and quality.First, the circuit design of electric energy data acquisition. There are two design schemes for the test module of the electric energy meter. One is to use discrete components PT, CT, S/H, FIR and multiplier to calculate voltage, current and power. The second is based on the principle of digital multiplier, according to its proprietary large-scale integrated electric energy metering chip to sample voltage and current, etc., and output active power through pulses, which is convenient for microprocessors to process, and it is more convenient to use , reliable performance and high calculation accuracy.Second, the design of the decoding circuit. The decoding circuit can use the 74LS138 chip, and decode through the I/O line of P2.5-2.7, select a reasonable chip according to the time, and transmit its power signal to the single-chip microcomputer. In addition, when it is designed, many slices of parallel sampling circuit chips, memory chips and field bus chips are also used. These chips can be shared by the I/O port of the single-chip microcomputer, and they can be used as data or address lines, and the gate of these chips can be realized with the support of the decoder circuit, so as to avoid conflicts between the addresses of the data lines.Third, the choice of CPU, as the core of the intelligent meter reading system, the CPU will directly affect the operation of the system. Therefore, for the CPU, it can be compatible with the instruction system, can be repeatedly erased and written more than 1000 times, has multiple bidirectional I/O ports, the clock frequency should be kept at 0-33MHZ, and there must be two 16-bit programmable The timer or counter also has a dual-duplex serial interrupt port line, a power-saving mode for interrupt wake-up, a watchdog circuit, and a software idle function.Fourth, watchdog and peripheral storage design. Most single-chip microcomputers must have a reset circuit, which requires that the reset circuit can be reliably reset when the single-chip microcomputer is powered on, and can keep the program in order when the power is turned off, so as to ensure that the data stored inside will not be tampered with. In addition, the single-chip microcomputer will be disturbed by various factors during operation, and even crash. In order to solve this problem, a watchdog circuit can be added. When there is a problem with the operation of the single-chip microcomputer, it can provide a reset signal for the single-chip microcomputer in a short time to reset the system. In addition, in order to avoid the data loss of the single-chip microcomputer in the case of a sudden power failure, peripheral storage design should be carried out, and an unprocessed monitoring chip should be installed. When a power failure occurs, the single-chip microcomputer can be notified in advance to store data.Fifth, the design of the clock module. Because the intelligent meter reading system is an automatic measurement and control system, it not only needs to record data, but also stores the time of recording data. When abnormal data occurs, the source of the problem can be found according to the data recording time. In order to realize automatic meter reading and record the meter reading time at the same time, a clock chip can be used for timing processing. After setting the meter reading time, the intelligent meter reading system will check the meter data according to the time set by the chip.Sixth, the design of the display module and power circuit. Display module can use PS7219 static display chip. Because it has a function control register of 15*8RAM, it is convenient to select an address, and can control and refresh each digit individually without rewriting. And the numbers can also control the brightness of the displayed numbers, and each number can flash. For the circuit, it can be divided into two parts for power supply, one is to supply power to the digital chip of the circuit, and the other is to supply power to the bus circuit, and the power supply voltage of the two is controlled at +5V. In order to ensure that the collector can continue to work when the power grid is suddenly cut off, a backup power supply must be designed. 6V, 4A batteries can be selected, and the control circuit of the backup power supply is composed of two parts: backup power switching and power charging. When there is a sudden power failure, the power supply can be automatically switched to the backup power supply to ensure the normal operation of the microcontroller.2.The design of the communication part of the meter reading system2.1 The way of communicationThe CPU of the computer has two ways to exchange information with the outside world, one is parallel communication, and the other is serial communication. Parallel communication means that data can be transmitted at the same time, which has the characteristics of fast transmission speed and high efficiency, but the number of transmission lines is controlled by the number of transmission data bits, so the design cost is relatively high. In addition, the parallel transmission distance generally does not exceed 30m. Serial communication refers to the transmission according to the order of data, which has the characteristics of fewer transmission lines, low cost, low efficiency and slow transmission speed, but its transmission distance ranges from a few meters to thousands of kilometers. For the intelligent meter reading system, because the distance between the measurement and control object and the measurement and control center is uncertain, the serial communication method will be used.According to the boundary of the data stream, its timing is inconsistent with the synchronous mode, so the serial communication can be divided into two modes: synchronous serial and asynchronous serial. Among them, the synchronous serial communication method uses data blocks as information units for data transmission, and each frame of information contains a large number of characters, and the amount of information transmission is relatively large. The asynchronous serial communication method refers to the data transmission of characters as information units, and the amount of information transmitted each time is small, and each frame of information only contains one character. It can be seen that asynchronous serial communication will be used in occasions where the amount of data transmission is small and the transmission efficiency is low. For the intelligent meter reading system, asynchronous serial communication should be used. When designing its communication interface, it is necessary to choose the interface reasonably according to the actual situation, and at the same time, it must also consider multiple issues such as transmission media, communication control chips, and level conversion, so as to ensure that the communication has high reliability. The distance, speed and anti-interference ability can all be consistent with the standard.2.2 Data uploadData upload is to transmit the meter data collected by the collector to the network device in an asynchronous serial manner, which is mainly manifested as a level conversion function. First of all, for the RS-232 bus standard, it is the serial communication bus interface with the highest utilization rate at the present stage. When connecting RS-232 to the system, the communication methods are divided into short-range and long-range, and the short-range communication is divided into three methods. One is with the hardware handshake function, and the sending and receiving of data are interconnected. Two devices can be connected at the same time. Send and receive data. Data terminal readiness and device readiness are also interconnected, which can effectively detect whether the other party is ready. The second is the handshake function between CTS and RTS. After sending a request to the other party, the other party's response will be indicated by clearing the sender. And its sending line will be connected with the detection line of the other party. The third is to cross-connect the sending and receiving of data, use the docking function together, do not use other signals, and leave it in the air, and realize the handshake function through software. In the design of the intelligent meter reading system, the two ends of the system are the network access device and the single-chip microcomputer level conversion chip, and the three wires are connected between the two, and the computer data is transmitted to the network to realize remote transmission.2.3 Data transmissionFor the data transmission module, the most suitable bus design standard is RS485. Because RS485 is a dual half-duplex, it can send and receive data at the same time. It can be used in multi-occupancy interconnection, which can effectively reduce the waste of signal lines and facilitate long-distance data transmission. And it can use public telephone lines for network communication. From the perspective of its circuit structure, terminal resistors are installed at both ends of the balanced connection, and a data transmitter, receiver or transceiver is installed in the balanced cable. In addition, it does not have data sending and receiving rules. When the transmission distance is less than 1200m, its transmission speed can reach 10KB/s. Therefore, the RS485 serial standard can be used for data transmission in the intelligent meter reading system.For the data transmission chip, the MA485 chip can be selected, because it is not only suitable for the RS485 standard, but also suitable for the RS422 standard. It has many advantages, with +5V power supply; low power consumption, the working current is 120 microamps, and the static current is 300 microamps; the driver has overload protection function; the communication transmission line can hang multiple transceivers; it is suitable for half-duplex communication.3. Software design of meter reading system3.1 Requirements for overall software designIn order to meet the requirements of the intelligent meter reading system and make it have higher quality and efficiency, the following requirements should be met when designing the software. First, it should be easy to understand and easy to maintain. Because with the improvement of production automation, the structure of the measurement and control system becomes more and more complex, the designer cannot fully understand the entire system in a short time, and the software can only have high performance after repeated design and debugging. For an intelligent meter reading system, if its module design has a clear goal and a clear idea, it will be convenient to check for errors and debug. Treat each subroutine as a building block, and arrange them in a reasonable order. Generally, there will be no errors. When a problem occurs, maintenance personnel can judge according to the phenomenon and type of the problem, so as to find the fault point and solve it. The use of modular design facilitates the expansion or modification of the system's functions. Second, it must be real-time. This feature is the basic requirement of an intelligent meter reading system. With the development of science and technology and the improvement of hardware integration, reasonable selection of software can meet this requirement. Third, it is testable. For the intelligent meter reading system, on the one hand, it is necessary to test the software according to the existing test results; It is used in real life. Fourth, accuracy and reliability. Only when the intelligent meter reading system has high accuracy and reliability can it be put into use, so as to strengthen the vital interests of users and promote the better development of my country's electric power industry.3.2 Design of the main programFor the main program design of the system, it is mainly through calling the corresponding subroutine that the electric energy pulse is collected, displayed and communicated by time, which is the main line of the meter reading system design. When the power-on reset reaches the main program, except for the initialization program and power-on data data clearing, other parts are in an infinite loop state, and all functions of the meter must be performed in the loop. If there is no system power-off or program Paralyzed by interference, this execution loops forever.3.3 Subroutine DesignIn the meter reading system, in order to avoid loss of data stored in the meter due to misoperation, a reset program should be added after the baud rate is set in the system, that is, press and hold the reset key before power on, when the display screen is cleared and After flashing, release the reset key, and the system can operate normally. The reset keys should be sorted in the order of pulse counting unit clearing, pulse unit clearing, arithmetic unit clearing, and energy storage unit clearing. For the design of receiving data and communication program, first power on, initialize the program, and then make commands to the computer, and record the number of successful acquisitions at the same time. And the main program should be in the state of waiting to receive. At this time, it is in the communication state with the PC. When the PC sends commands, the main program will be interrupted and the data collected in the data acquisition module will be obtained. When the PC command is successful, it will The reception success mark appears. For the data acquisition program, it includes multiple modules such as parameter setting, meter reading number, data storage, account number design, and meter number reset. The use of the module should be executed according to the command. In addition, the subroutines also include pulse acquisition program, display subroutine, verification subroutine and data transmission subroutine. Only by designing these subroutines well can the intelligent meter reading system run stably.4. Anti-interference design of meter reading system4.1 MCU hardware anti-jamming designFor single-chip microcomputers, there are many interference factors, some of which come from inside and some from outside. Its internal interference is determined by many aspects such as the manufacturing process, while the external interference has nothing to do with the system mechanism and is determined by external factors. Interference problems on the power supply include undervoltage, overvoltage and power failure, which require a backup battery to be added to the system. For radio frequency interference, it is necessary to reduce the electrical width of the band. For surges, sags, and large peak pulses, two isolated power supplies can be used for power supply, or absorbing elements can be installed in the power supply circuit to improve the anti-interference ability of the system.4.2 MCU software anti-jamming designDuring the operation of the intelligent meter reading system, in order to avoid the infringement of other frequency bands, traditional hardware anti-jamming measures can only prevent part of the frequency band interference. Therefore, in order to ensure that the application programs can be executed in an orderly manner according to the established order, relevant measures must be taken during the system design process to improve the reliability of the system operation, reduce the incidence of software errors, or restore the normal state by itself when the software has errors. By designing instruction redundancy, the running programs in the program area can be restored to normal; by designing software traps, the running programs that are not in the program area can be restored to normal; through Watchdog technology, some programs in an endless loop can be restored to normal. The runaway program returned to normal. Therefore, when designing an intelligent meter reading system, the above design must be included so that the system can run stably.SummarizeThe design of the intelligent meter reading system of the single-chip microcomputer includes: the hardware design of the meter reading system, the design of the communication part, the software design of the meter reading system, and the anti-interference design of the meter reading system. Only when these designs are done well can the intelligent meter reading system be able to Stable and effective operation, so as to promote the sustainable development of my country's electric power industry.The above are the design and analysis details of the intelligent meter reading 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 for Jieli, Ankai, Allwinner, Realtek, etc., and also develop BLE Bluetooth ICs, dual-mode Bluetooth modules, wifi modules, and IoT modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
03-03
2021
Research on Electromagnetic Interference Technology of SCM Application SystemThe single-chip microcomputer system is more and more widely used in industrial applications, and it is an important technical means in product development and production. However, due to the harsh electromagnetic environment in which the system is located, the single-chip microcomputer is often subject to various internal and external interferences when it is working. Work is adversely affected. In order to ensure the reliability and safety of the single-chip microcomputer system, it is necessary to understand the cause of the interference, which is an important issue to solve the interference.1. MCU system interference categories and analysis1.1 Elements of electromagnetic interference in single-chip microcomputer systemThere are three factors in the electromagnetic interference problem of the single-chip microcomputer system, namely, the electromagnetic interference source, the coupling path, and the sensitive equipment.Among them, the interference source refers to the components, equipment and signals that generate interference; the coupling path refers to the path and medium from the interference source to the sensitive equipment. The typical coupling way is the conduction through the wire and the radiation in the space; sensitive equipment refers to the disturbed object, such as single-chip microcomputer, amplifier, digital-to-analog converter, etc.1.2 Classification of electromagnetic interference of single chip microcomputerElectromagnetic interference in single-chip microcomputer systems is usually divided into several types, which are classified according to the propagation mode, the cause of noise, and the waveform characteristics. According to the propagation mode, it can be divided into series mode noise and common mode noise; 2) According to the cause, it can be divided into high frequency oscillation noise, discharge noise, surge noise; 3) Waveform characteristics can be divided into pulse voltage, continuous sine wave, pulse sequence etc.The interference source of the single-chip microcomputer system is mainly electromagnetic energy interference. Interference sources are mainly divided into internal interference sources and external interference sources:(1) The internal interference source mainly comes from the mutual interference between the printed circuit board and the circuit; mainly due to the unreasonable design of the printed circuit board inside the system, incorrect layout of components and grounding, etc., the microcontroller system cannot work normally .(2) External interference sources are mainly electromagnetic waves and electromagnetic fields. Strong electromagnetic field interference signals will affect the work of the single-chip microcomputer system. Strong external interference signals mainly enter the internal system of the single-chip microcomputer through the power supply. Therefore, the anti-interference method of the power supply is a research focus of our electromagnetic anti-interference.1.3 The influence of electromagnetic interference on the microcontroller1) The data acquisition error of the single-chip microcomputer system increases, which makes the RAM data tampered and reduces the reliability of the data.2) The single-chip microcomputer control system fails, and when the automatic control system is subjected to electromagnetic interference, misoperation and miscontrol and loss of control may occur, which reduces the effectiveness and reliability of the single-chip microcomputer control system.3) The program runs abnormally, and the interference makes the PC value of the single-chip microcomputer reach the unused address space for meaningless operation, or the program runs in the normal address space, but the interference makes the program jump to the place where it should not go or run Into an endless loop.2. Electromagnetic Interference Suppression Technology2.1 Hardware anti-jamming technologyHardware anti-interference technology is the preferred anti-interference measure in the application and design of single-chip microcomputer systems. It can effectively block the interference propagation path, suppress interference sources, and reasonably arrange and select relevant parameters. Hardware anti-interference measures can suppress most electromagnetic interference. Commonly used The hardware interference is as follows.1) Printed circuit board design. Whether the design and layout of the printed circuit board are reasonable or not is very important to the reliability of the single-chip microcomputer system. Here is a key step in the generation, propagation and absorption of noise.From the perspective of reducing radiation interference, multi-layer boards should be used as much as possible. The inner layer is used as the power layer and the ground layer respectively. Form a uniform ground plane for the signal, increase the distributed capacitance between the signal line and the ground plane, and suppress its internal force radiating to space. For multi-layer circuit boards, the ground planes in different areas must meet the 20 H rule at the edge (that is, the edge of the ground plane should be 20 H longer than the edge of the power layer or the signal line layer, and H is the ground plane and the signal layer. between heights).Power lines, ground lines, and printed circuit board traces should maintain low impedance to high-frequency signals. In the case of high frequency, power lines, ground lines or printed circuit board traces will all become small antennas for receiving and transmitting interference. Reducing this kind of interference is to reduce the high-frequency impedance of the power line, ground wire, and printed circuit board wiring itself, and the arrangement should be appropriate, as short and straight as possible. When there are different functional circuits on the circuit board, the different types of circuits should be separated, and their grounding should also be separated; no signal lines can pass through the cracks on the ground surface.An independent ground wire is used on the I/O interface to provide a clean place for the filter and shielding layer, and the filter should be as close as possible to the cable inlet and outlet. The ground wire of the high-speed clock should be as short as possible, do not change layers, and the corners should not be 90°, and keep as far away from the I/O port as possible; the heat sink installed on the chip should be connected to the signal ground; the driving circuit of the I/O interface should be close.2) Select components. Components are the foundation of the system and also an important link in the control system. Only by selecting components reasonably can the reliability and stability of the entire system be improved. Therefore, components with high integration, strong anti-interference ability, and low power consumption should be selected. electronic devices.3) Grounding technology. Signal grounds are usually divided into single-point grounding, multi-point grounding, and hybrid grounding. When the signal frequency is less than 1MHz, use single-point grounding; when the operating frequency is 1 MHz to 10 MHz, when using single-point grounding, the length of the ground wire must not exceed 1/20 of the wavelength, otherwise multi-point grounding is used; the signal operating frequency is greater than 10 MHz, multi-point grounding should be used in order to reduce ground impedance. The grounding point of the multi-level circuit should be selected at the input end of the low-level circuit, so that this end is closest to the reference position, the grounding of the input stage is shortened, and the possibility of electromagnetic interference is reduced.4) Isolation technology. Through isolation, external interference can be cut off, and at the same time play the role of restraining drift and safety protection. Generally divided into physical isolation and optical isolation. Physical isolation is generally aimed at the input signal of the front-end of the single-chip microcomputer, which is divided into two parts in industrial measurement. (1) The display and control part is called the secondary instrument; (2) the sensor is called the primary instrument. Sometimes the distance between the primary instrument and the secondary instrument is far away, and the signal is easily disturbed during the transmission process, and its signal line is much larger than the power line; photoelectric isolation is to isolate the electrical signals of the two circuit systems, and transmit the signal through the optocoupler. It can not only ensure the transmission of noisy signals from one circuit to another, but also ensure the correct transmission of signals. In DC and low-frequency systems, optoelectronic coupling is mostly used for isolation. Because light is used as a medium for indirect coupling, it has high electrical isolation and interference suppression capabilities.2.2 Software anti-jamming technologyAlthough the hardware anti-jamming technology is adopted, it is difficult to ensure that the single-chip microcomputer system will not be disturbed due to the complexity of the reasons for the interference and the large randomness, so the software anti-jamming technology is used to supplement it.1) Instruction redundancy technology. When the MCU is strongly disturbed, the value of the program counter PC will change, the program will deviate from the normal running track, there will be random flying, the value of the operation will change, and the operand will be wrongly put into the operation code. Instruction redundancy is similar to software traps, but there are differences. Software traps are used in unused areas of program memory, while instruction redundancy is usually in programs. The practice is to insert some NOP instructions after normal instructions or put valid bytes Rewriting, the use of instruction redundancy technology can not only make the runaway program regular, but also help to eliminate random interference and improve reliability.2) Software trap technology. Software trap refers to a series of instructions that can restore the runaway program to normal operation or return to the initial state. Usually, the NOP empty instruction is used as a software trap. When the program is out of control, as long as the PC points to these units, after performing several empty operations in succession, The program will execute the following normal program or be forced to jump to a specified location and automatically return to normal. When the program is working normally, the software trap will not affect the normal operation of the system.3) Digital filtering technology. Digital filtering is realized by program, and it can be shared by multiple channels without adding hardware equipment. It has high reliability and high stability, and can filter low-frequency signals. The analog RC filter is limited by the capacitance and the frequency cannot be too low, and the flexibility is good, and different filtering methods can be changed by changing the program.4) Watchdog. Sometimes the single-chip microcomputer will execute the program out of order when it accepts electromagnetic interference. If the program enters an endless loop, the single-chip microcomputer will crash. The way to solve this problem is to add a watchdog to the system.Add the following program in each program segment:Among them, YS is the delay subroutine, WATCHDOG is the watchdog subroutine, the counting value (counting time) of the counter should be greater than the cycle time of the main program once, otherwise the system will always reset and cannot run normally. During normal operation, every time the program runs LCALL WATCHDOG, a pulse is sent from P2.7 to clear the counter, and its Qn output terminal is always at low level, which will not reset the system. Once the system is disturbed by electromagnetic interference, the program enters an endless loop. If the program cannot be executed normally, the pulse cannot be sent from P2.7, which will make the counter full and Qn be covered with "1" and send it to the RESET pin of 8051 through the 47uF capacitor to reset the system and execute the main program again.SummarizeIn the design of single-chip application system, as long as the hardware composition of the system is carefully analyzed, the components are carefully selected, the interference sources and sensitive components are confirmed, and the reasonable layout of them can improve the stability of the system. Practice has proved that only by taking measures from two aspects of hardware and software, with hardware anti-interference technology as the main and software anti-interference technology as a supplement, the combination of the two can effectively eliminate the influence of interference signals and improve system stability.The above is the research on electromagnetic interference technology of single-chip microcomputer application 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 for Jieli, Ankai, Allwinner, Realtek, etc., and also develop BLE Bluetooth ICs, dual-mode Bluetooth modules, wifi modules, and IoT modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
03-02
2021
The pure BLE data communication module is a communication module based on Bluetooth Low Energy (BLE for short) technology, which is used to realize wireless data transmission. BLE is a low-power Bluetooth technology designed specifically for short-range communication between low-power devices. Compared with traditional Bluetooth technology, BLE has lower power consumption, simpler communication protocol and shorter connection time, making it ideal for Internet of Things (IoT) devices, sensors and other low-power applications.A pure BLE data communication module usually includes a Bluetooth wireless transceiver, a radio frequency front end, a microcontroller unit (MCU) and related peripheral circuits. It can communicate directly with other BLE devices, such as smartphones, tablets, computers or other BLE-enabled devices. Through the BLE communication module, the device can transmit data, send commands or receive control signals wirelessly.Pure BLE data communication modules are often used in various application fields, such as IoT devices, health monitoring devices, smart homes, wearable devices, wireless sensor networks, etc. They can realize the interconnection between devices through BLE technology, and support various data transmission requirements, such as sensor data collection, remote control, firmware upgrade and other functions.Usually, the BLE communication module supports other functions and communication protocols, such as serial communication, GPIO control, etc., to meet the needs of different application scenarios. Therefore, in practical applications, a suitable BLE communication module can be selected according to specific technical specifications and functional requirements.
03-01
2021
Bluetooth file transfer refers to the file transfer between devices through Bluetooth technology. It allows users to wirelessly transfer various types of files such as photos, audio, video, documents, etc. between Bluetooth devices. Bluetooth file transfer provides a convenient and fast way for users to share files without using data cables or Internet connection.Bluetooth file transfer involves the following key technologies:Bluetooth technology: Bluetooth is a wireless communication technology that uses radio waves to transmit data over short distances (typically a few meters). Bluetooth technology provides reliable connection and data transmission capabilities, enabling devices to interconnect and communicate.Bluetooth File Transfer Protocol (OBEX): OBEX is a protocol for transferring files between Bluetooth devices. It defines a common set of commands and specifications that enable devices to identify and interpret transferred files, and handle them appropriately during file transfers.File format and encoding: In Bluetooth file transfer, the file format and encoding compatibility between different devices should be considered. Typically, files are stored and transmitted in a specific format (such as JPEG, MP3, MP4, etc.) with an appropriate encoding for data compression and decoding.Device identification and pairing: In order to carry out Bluetooth file transfer, the devices participating in the transfer need to identify and pair with each other. This usually involves the device's Bluetooth address (Bluetooth address) and pairing code (Passkey) to establish a secure connection and data transfer.User interface and application: Bluetooth file transfers typically require a user interface and application to manage the transfer process. These interfaces and application programs can provide functions such as file selection, connection management, and transfer progress display, so as to facilitate users to control and monitor the file transfer process.Generally speaking, Bluetooth file transfer utilizes Bluetooth technology and related protocols to realize wireless file transfer between devices. With simple operation and configuration, users can easily share files and transfer data between different devices.
07-30
2020
Due to the traditional software development model, the final product is program code, which is difficult to adapt to the rapid changes in requirements. Although there are already models that can participate in some production links, the models still cannot be applied to large-scale software development. Therefore, problems of non-standardization and non-automation inevitably appear in the software development process. In order to solve these problems in software development, OMG organization released Model Driven Architecture (Model Driven Architecture, MDA). Based on the introduction of MDA development process, this paper discusses the definition, mapping and transformation of platform-independent model and platform-dependent model, and analyzes and compares MDA development method and traditional software development method.1. MDA architectureModel-driven software development refers to the process of analyzing the problem and then modeling, transforming and refining the model, and finally generating executable code. Model-driven architecture is a method to establish an abstract model of business logic and automatically generate a complete application program. A model language (such as UML) is used to construct a platform-independent model (Platform Independent Mode, PIM) that does not need to care about the technology used during implementation, and then the platform-independent model is converted into a platform-dependent model (Platform Specific Mode, PIM) through certain conversion rules and auxiliary tools. PSM), and finally PSM refines to generate executable code. The MDA software development method puts the standard system model at the core of the driver architecture, as shown in Figure 1. MDA separates system description and implementation technology from platform through PIM and PSM, ensuring that software development results are not affected by demand changes and technology changes.The MDA model organization is divided into four layers, as shown in Figure 2. The next level is the application of the previous level, and the previous level is the basis of the next level. MOF is located in the M3 layer, which is the basic and core model in the MDA framework, and is also the meta-model of all the models in the M2 layer. The M2 layer is the modeling language corresponding to different models on the MOF. Different fields can obtain the modeling language that matches the field through the M2 layer, which provides modeling symbols for the modeling of the M1 layer. The M1 layer is the model description created by the modeler for the enterprise application using the model language during the software development process, and the PIM, CIM, and PSM application models are located in this layer. The bottom layer is the M0 layer, that is, the instance layer, which converts the model of the M1 layer into specific usable applications.The core of MDA is a series of standards formulated by OMG, Meta Object Facility (Meta Object Facilit, MOF), Unified Modeling Language (Unified Modeling Language, UML), Data Warehouse Metamodel (CommonWarehouse Metamodel, CWM), XML Metadata Exchange ( XML⁃based Metadata Interchange, XMI) and Object Constraint Language (Object Constraint Language, OCL). These standards constitute a benchmark for building a model-driven architecture, which not only determines the core architecture of MDA, but also plays a key role in the system modeling of State⁃of⁃art.2. MDA implementation and software development based on model-driven architectureMDA-based software development process can be divided into:(1) Model-driven software development process. The models used in this solution are PIM and PSM, and the generation of code is driven by the model. The specific operation steps are that the code is generated through the model, and then the business logic code is written manually, and finally the manually written business logic code is deployed and deployed. release.(2) Control the behavior of the system at runtime through model-driven. At this time, the software model can be directly executed by a general model of the operating system runtime. This process does not need to generate specific software codes. Finally, only the model is deployed and released, because the model has already expressed all levels of the application.MDA-based software development includes three stages: modeling, development and release.Model phase: Create a platform-independent model PIM, and take it as the core. Both ISM and PSM can be automatically converted and generated by PIM. The model is mapped using a MOF mapping method such as XMI.Development stage: Generate platform-independent code, that is, MDA tool automatically generates and programmers manually write client and server code. The code generation in MDA is the ultimate goal of the MDA project, which specifically refers to the mapping from PSM to code, and the mapping generates the ISM model.Publishing stage: In this stage, many contents are put together to form runnable components, including models, MOF mappings, hand-written codes, MDA runtime libraries and configuration information to be released, and finally the components are released to the running platform.3. Comparison of software development processAlthough the MDA-based software development process is a new model-driven software development method, it has the following advantages compared with traditional software development methods:(1) Model transformation can be realized automatically. Compared with the traditional software development process, where the transformation between models and models, and between models and codes is completed manually, the software development process based on MDA is automatically completed by MDA development tools.(2) It is easy to maintain, and the model and code are synchronized. In the process of software development based on MDA, the model can directly generate executable code through conversion without other steps, so as to realize the synchronization of model and code. The focus of software maintenance by software developers has changed from program code to a platform-independent model that is independent of the technology platform and related to business logic.(3) High development efficiency and strong software reliability. The MDA model architecture abstracts different levels of the system, and the meaning of each level is simple and easy to understand, so that the entire framework of the system can be clearly understood and mastered by software developers without being confused about specific implementation technologies. Because the model can directly generate executable code through conversion, the coding link is reduced in the development process, so if the PIM is constructed correctly, the correctness of the entire system can be guaranteed.(4) The business logic model is independent of the technology implementation platform. The PIM model can automatically generate a software system based on the model according to the different technology platforms, thus realizing the independence of the PIM model and the technology experiment platform.(5) The model is the infrastructure generated by the program. In the process of software development based on MDA, the model is regarded as the design work in its life cycle, and it is the infrastructure of program generation. The model can automatically generate executable code through a series of transformations.SummarizeOn the basis of introducing and analyzing the framework of MDA and the software development process based on it, this paper compares it with the traditional software design method, explains its remarkable advantages in the software development process, and finally designs the MDA-based The decision support system proves that the software system designed using the MDA development method is independent of the technology platform and has strong versatility and portability. Design cost and improved development efficiency.The above is the research on the MDA-based software development method introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have software and hardware function development needs for smart electronic products, you can rest assured to entrust them to us. We have rich experience in customized development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad, including MCU, voice IC, Bluetooth IC and modules, wifi modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth wifi development, 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 solutions, the development of Bluetooth audio, the development of children's toys, and the development of electronic education products.