Design of Environmental Noise Measuring Instrument Based on 89C51

Publisher:万童洁Latest update time:2011-10-12 Keywords:89C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Environmental noise monitoring is an important part of improving the quality of life and strengthening environmental protection. In the busy streets and residential areas of major cities, large environmental noise displays have been erected on the streets. However, most of the portable noise testers in China are expensive imported special equipment. Except for the professional environmental protection departments such as health and measurement, they cannot be popularized as civilian products. This article introduces a low-cost, portable digital display environmental noise measuring instrument with 89C51 microcontroller as the core and V/F conversion technology. The instrument has stable operation and good performance. After calibration and calibration, it can meet general civilian needs and can be widely used in industrial and mining enterprises, government agencies, schools and other occasions where environmental noise needs to be measured and controlled.

1 Measurement mechanism of sound pressure level

The hearing threshold of the human ear is generally 20m Pa (micropascals), and the pain threshold is generally 200Pa (Pascals), which is 107 times different. Such a wide sound pressure range is difficult to measure, and the human ear has nonlinear characteristics in distinguishing the relative change of sound pressure. Therefore, the sound pressure level LP is often used in acoustics to reflect the change of sound pressure, and the sound pressure level of sound pressure p is expressed as

LP=20lg(p/p0) dB  (1)

Among them, the reference quantity p0 is 20m Pa. When p=p0, Lp=0dB, and when p=200 Pa, LP=140dB.

The sound pressure level can be measured with a sound level meter. By inputting a 1kHz pure tone for 0.2 seconds to 0.25 seconds or more than 0.5 seconds, the true sound pressure level or the average sound pressure level can be obtained. Taking into account the human ear's perception of loudness at different frequencies, in noise measurement, the inverse curve of the 40-phon equal loudness curve is often used to perform weighted correction on the sound pressure level, that is, the A-weighted network is used to measure the A-level, which is written as dB (A). Table 1 shows the relationship between the center frequency of the octave band and the correction amount of the A-level.

Table 1 Relationship between octave band center frequency and A sound level correction

Octave band center frequency (Hz) 31.5 63 125 250 500
A sound level correction (dB) -39.4 -26.2 -16.1 -8.6 -3.2
Octave band center frequency (Hz) 1k 2k 4k 8k 16k
A sound level correction (dB) 0 1.2 1.0 -1.1 -6.6

2 Hardware circuit composition

The hardware structure principle block diagram of the environmental noise measuring instrument is shown in Figure 1.

Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer

Figure 1 Hardware block diagram

Environmental noise is converted into electrical signals by a highly sensitive, non-directional electret microphone. The frequency characteristics of the microphone used have an unevenness of less than 1.5 dB in the range of 50 to 14000 Hz. It can be used for outdoor measurements after adding a windscreen and rainscreen. The three-stage amplifier circuit is composed of the operational amplifier LM324. The parameters of the relevant peripheral components are carefully adjusted to make its amplitude-frequency characteristics close to the A-weighted curve. D1, C1, and R1 form a peak detection network, and its output DC level reflects the size of the noise sound pressure.

The voltage/frequency conversion circuit is composed of LM331, and the output frequency signal is converted into TTL level and sent to the P3.4 pin of the microcontroller as the counting pulse of T0. The conversion circuit has good linearity and strong anti-interference ability. The output frequency range is above 10 to 10000Hz, and its change ratio is 103, which is better than the ordinary 8-bit parallel A/D converter and is conducive to improving the measurement range of the system. In Figure 1, Rs can be used to adjust the gain deviation and change the output frequency.

The core part of the system is the AT89C51 single-chip microcomputer, whose instruction system is fully compatible with MCS-51, and with 4kb E2PROM on the chip, it can easily form a minimum measurement system. Its P3.5 pin is connected to the 100kHz square wave output by the timer composed of NE555, and the T0 timing count is controlled through the T1 interrupt. The counting pulse frequency input from the T0 end reflects the size of the measured sound pressure. After software processing, the noise sound pressure level display value is output from the P1 port, and then driven by the 74LS248 decoding to display the two-digit 4.572cm (1.8-inch) high-brightness LED digital tube. The decoder enable end is properly controlled to make the two digital tubes light up in turn to achieve dynamic display and reduce power consumption.

3 Software Design

The software of the environmental noise measurement system adopts modular design, which consists of the main program, interrupt service program, table lookup subroutine and display subroutine. The flow chart of each program module is shown in Figure 2.

The main program is in a cyclic working state, mainly completing the initialization of the timer/counter and interrupt system, and cyclically calling the table lookup and display subroutines. Whenever T1 counts the external 100kHz clock for 0.5 seconds, an interrupt is requested. After the CPU responds to the interrupt, it reads the count values ​​in the TH0 and TL0 registers and reinitializes T0 and T1 to detect the next data.

Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer

Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer

Figure 2 Software Flowchart

It is worth pointing out that the table lookup program realizes the conversion of count value to sound pressure level. From formula (1), we know that the sound pressure level increases by 1dB for every 12.2% increase in sound pressure. Therefore, the sound pressure level increases by 1dB for every 12.2% increase in T0 count value. A table is defined in E2PROM, with each three bytes as a group of data, where the first two bytes are count values ​​and the last byte is the sound pressure level value represented by compressed BCD code. During debugging, refer to the precision sound level meter to read out the count value corresponding to a certain sound pressure level, so as to determine the corresponding relationship between the two parameters in the table. After the program is solidified, it can also be adjusted through the hardware circuit. The pseudo instruction format for defining the table is given below.

TAB: DB 1BH, 0A0H, 0BBH, ; table upper limit


05H, 83H, 83H,
04H,0EAH, 82H,
04H, 61H, 81H,
03H,0E7H, 80H,
03H, 7AH, 79H,
03H, 19H, 78H,
02H,0C3H,77H,
02H, 76H, 76H,

00H, 00H,0AAH; table lower limit

Among them, the two data "0AAH" and "0BBH" are respectively displayed as the lower limit mark "[" and the upper limit mark "]" after decoding, indicating that they are beyond the measurement range.

In order to improve the anti-interference ability of the system, in addition to taking corresponding measures in hardware, redundant design method is adopted in software, that is, repeating important instructions and setting no-operation instructions in unused space to prevent program jumping and crashing.

4 Conclusion

The system was calibrated using an ND-2 precision sound level meter produced by the state-owned Jiangxi Hongsheng Equipment Factory. The measurement error was less than 1 dB and the measurement range was between 40 and 96 dB, which met the measurement requirements for noise in general environments.

Keywords:89C51 Reference address:Design of Environmental Noise Measuring Instrument Based on 89C51

Previous article:Infrared remote control decoding program
Next article:Design of intelligent lighting control system based on 51 single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号