Specific implementation functions
The system consists of STC89C52 microcontroller + ultrasonic distance sensor (HC-SR04) + DS18B20 temperature sensor + LCD1602 liquid crystal display + button + buzzer + power supply
Specific functions: 1. LCD1602 liquid crystal displays the measured distance and temperature;
2. The measuring range is 0.02m~4m, and the accuracy is 0.01m;
3. You can set the upper and lower limits of the distance alarm; button functions: plus key, minus key, set key
4. If the alarm value exceeds the set upper and lower limits, the sound and light alarm will start.
design background
The rapid rise and vigorous development of single-chip microcomputer technology has outstanding advantages such as stability, safety, efficiency and economy, so its application is also very extensive. Single-chip microcomputers are already everywhere, closely related to our lives, and have penetrated into all aspects of life, such as air conditioners, VCD machines, mobile phones, microwave ovens, automatic washing machines and automotive electronic equipment. The characteristics of single-chip microcomputers are small size, that is, their integrated characteristics. Their internal structure is a simplification of ordinary computer systems. By adding some peripheral circuits, a complete small system can be formed. Single-chip microcomputers have strong scalability. It has powerful data processing functions similar to ordinary computers. By using some scientific algorithms, it can obtain strong data processing capabilities. Therefore, single-chip microcomputers can greatly improve the intelligence, data processing capabilities and processing efficiency of industrial equipment in industrial applications, and single-chip microcomputers do not need to occupy a large space.
At the same time, with the development and progress of society, ultrasonic ranging systems are becoming increasingly important, and their application scope is rapidly expanding. Since ultrasonic ranging is a non-contact detection technology, it is not affected by light, the color of the object being measured, etc., and has a certain adaptability in harsh environments (such as dust), so it is extremely widely used. It is commonly used in surveying and mapping topographic maps, building houses, bridges, roads, excavating mines, oil wells, etc., reversing radars, construction sites, and some industrial sites, such as liquid level, well depth, pipeline length, etc. Ultrasonic detection is often faster, more convenient, simple to calculate, easy to achieve real-time control, and can meet industrial practical requirements in terms of measurement accuracy.
hardware design
The project "Ultrasonic Distance Measurement Based on Single Chip Microcomputer" consists of a 51 single chip microcomputer minimum system, an ultrasonic distance measurement module, a drive display circuit, a 5V DC voltage regulator circuit, a temperature sensor, etc. The ultrasonic distance measurement module HC-SR04 is used to measure the distance, and the data is analyzed and processed, transmitted to the 51 single chip microcomputer, and then displayed through LCD1602. At the same time, the power supply part uses a 5V DC voltage regulator.
software design
The main function of the main program is to display the distance, read out and process the measured distance value of HC-RS04, control the effective distance limit with buttons, and when the measured value exceeds the preset value, the buzzer will sound an alarm.
Schematic
The schematic diagram of this system was designed using Altium Designer19, as shown in the figure.
program
This design uses KEIL5 software to implement program design, as shown in the figure.
Simulation Implementation
This design uses protues8.7 software to implement simulation design, as shown in the figure.
Previous article:8-Badminton score counter based on 51 single chip microcomputer
Next article:6-PM2.5 detection and alarm system based on 51 single chip microcomputer
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- What should I do if the current of the small motor is too large when it starts and the microcontroller is reset?
- MSP430 driver function for LCD1602
- With vias in vogue, where will high-speed DDR4 signals go?
- Micropython can be simulated in proteus
- EEWORLD University Hall----Live Replay: Introduction of ON Semiconductor's Photovoltaic and Energy Storage Products
- Watch the video to win a JD card | Taixiang test of Shuige cheats
- The motor coil is an inductive load, so the current in the coil will have a certain delay relative to the load voltage on the coil.
- Summary of national competition experience sharing
- [NXP Rapid IoT Review] +6. Guide to Translation Display Elements
- MicroPython driver porting for STTS751