51 MCU Puzhong V2 Ultrasonic Distance Measurement Alarm Display Development of Ultrasonic Distance Measurement Module Based on MCS51 MCU

The development of the ultrasonic ranging module based on MCS51 single-chip microcomputer
adopts C51 programming language to complete the following functional requirements.
l Required functions:
(1) Interface design of ultrasonic module and single chip microcomputer, draw a complete circuit schematic diagram. (15 points)
(2) When the development board is powered on, display the student ID (5 points)
(3) Use the timer of the MCS51 single-chip microcomputer to measure the high level time of the ultrasonic echo pin, convert it into a distance and display it on the digital tube in real time Or on the LCD1602 display, the unit of measurement is accurate to mm. (30 points)
(4) Use the keyboard and display (digital tube or lcd1602 display screen) to design the alarm distance parameter setting function, the alarm range: 30mm-3000mm. (20 minutes)
(5) When the actual distance is less than or equal to the set distance, use a buzzer or LED flashing light to prompt an alarm, and the alarm time is at least 3 seconds. (15 marks)

l Optional functions:
(1) Store the alarm distance parameter in eeprom, and it will not be lost after power-off. The single-chip microcomputer will read this parameter when it is powered on. (10 points) Not done
(2) Measure the ambient temperature and display it (the temperature sensor is not limited), and correct the ultrasonic distance based on the temperature. (5 points) Did not do

Press button 1 to switch options, ones place, tens place, hundreds place, thousands place.
Press button 2 to modify the value.
Insert picture description here

There is also a simple simulation: when the
display distance
is less than 200cm, the buzzer will alarm, and the closer the distance, the faster the alarm sound.
Insert picture description here

Guess you like

Origin blog.csdn.net/x1131230123/article/details/108553804