Design of building timed broadcasting system based on single chip microcomputer

Publisher:MysticalDreamerLatest update time:2012-01-18 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Building broadcasting systems are widely used in school teaching buildings. They need to broadcast building management notices, get out of class bells, eye exercises background music and other scheduled broadcast information on time every day. Therefore, this broadcasting system is required to be stable and reliable, with clear sound quality and easy operation. Most of the existing systems on the market are a set of equipment controlled by computers, which requires large investments and consumes large amounts of resources such as electricity. If the computer serving as the control center is attacked by a virus, the system is prone to crash, has poor stability, and requires frequent maintenance. Therefore, it is very necessary to design a set of scheduled broadcasting systems composed of integrated circuits with good stability and flexible control in combination with the existing equipment conditions of the teaching building.

2. Composition of the timed broadcasting system

Newer teaching buildings are more electrified and are generally equipped with water alarm, fire alarm detection and alarm systems. The alarm terminals are loudspeakers distributed on each floor. If an alarm occurs, the control center sends the alarm audio signal through the power amplifier to the loudspeakers on each floor to emit the alarm audio [1] . In most cases, only the alarm detection part of this alarm system is working, while the power amplifier and loudspeaker are idle. Therefore, we can make full use of this part of the power amplifier and loudspeaker as peripheral equipment of the teaching building broadcasting system. If an alarm occurs, it will not hinder the operation of the original alarm system.

In addition to the peripheral power amplifier equipment of the timed broadcasting system, the main thing is the control part of the timed broadcasting system, that is, the controller of the timed broadcasting system. The broadcasting controller should output the broadcasting audio signal to the power amplifier equipment on a regular basis. Therefore, the entire timed broadcasting system can be divided into two parts, as shown in Figure 1.

Figure 1 Block diagram of the timed broadcast system

3 Composition of the central controller of the timed broadcasting system

The scheduled broadcast control center has two main functions: one is the timing function, which sets the time for playing scheduled broadcasts; the other is the control function, which can play the corresponding broadcast information according to the set time [2] . Therefore, the system control center can be divided into two module units: the timing function module and the control function module for design.

3.1 Implementation of the timing function module

This timing function module is realized by using relatively mature timing products on the market. This system uses TW837A timer. This timer can set up to 700 arbitrary timings within 24 hours, with a timing accuracy of one minute, and can modify the timing time countless times. When the set time arrives, the level state of the output signal line of this timer will change: from 0 volts to 12 volts, and will remain for 15 to 45 seconds, so the level change of the signal line can be used to obtain the timing information.

3.2 Implementation of control function module

The entire broadcast control function module consists of three parts: 51 single-chip microcomputer, timing broadcast information storage module, and drive circuit.

The broadcast information to be played at a scheduled time must be stored in advance for scheduled playback. Considering that there are many floors in the teaching building, the audio signal transmission distance is long and the distortion is relatively large, so the audio quality requirements are relatively high. The quality of audio is mainly reflected in the storage format of audio information. At present, the quality of audio signals stored in mp3 format is relatively ideal, so mp3 format is selected as the storage format of broadcast information. When playing, the mp3 decoding chip is used to decode the decoded voice information and output it.

The 51 single-chip microcomputer is a microprocessor. Its main function is to determine which broadcast information should be output at this time based on the timing information provided by the timer and the recorded timing information [3,4,5] . It then controls the MP3 decoding chip through the driving circuit and multiple relays to decode the corresponding audio file [6] and outputs the decoded audio data stream after power control.

The functional modules of the scheduled broadcast control center are shown in Figure 2.

Figure 2 Building broadcasting system

4 Examples of setting some functional modules of the control center in actual applications

In actual work, each functional module of the system must work strictly according to a certain working sequence. In order to achieve this requirement, each functional module must be set and programmed. The setting of the timing module of this system in the actual teaching building application is given below.

The daily teaching schedule of the teaching building is two classes in the morning and afternoon, each class is 90 minutes. At the end of the class, a brisk music ringtone is played for 15 seconds, and during the class, a 15-second rapid music is played as the start bell. After the morning and afternoon classes, the management broadcast of turning off the lights, doors and windows of the teaching building is played, and then half an hour of light music is played. To complete the timed playback of the above management information, it is necessary to set and program each functional module of the control center: set the timing information for the timer, store different audio playback files in the mp3 memory, and program the single-chip microcomputer.

4.1 Working sequence of each functional module

In actual work, each functional module of the system must work strictly according to a certain working sequence. To meet this requirement, each functional module must be set and programmed during design. The specific settings are shown in Table 1:

Table 1 Working sequence of each functional module of the system

Function

Modules

Corresponding actions of modules at each time point

Timer timing

8:00

9:30

10:30

12:00

12:30

14:00

15:30

16:30

18:00

18:30

Attend class

End of get out of class

Attend class

End of get out of class

Turn off music

Attend class

End of get out of class

Attend class

End of get out of class

Turn off music

MP3 audio file

File 1

File 2

File 1

File 2

File 3

File 1

File 2

File 1

File 2

File 3

Single chip microcomputer controls the MP3 decoder action flow

Turn on the machine,

decoding,

15 seconds timing,

stop,

Shutdown

(1)

Turn on the machine,

decoding,

15 seconds timing,

stop,

Shutdown

(2)

Turn on the machine,

decoding,

15 seconds timing,

stop,

Shutdown

(1)

Turn on the machine,

decoding,

(3)

stop,

Shutdown

(4)

Turn on the machine,

decoding,

15 seconds timing,

stop,

Shutdown

(1)

Turn on the machine,

decoding,

15 seconds timing,

stop,

Shutdown

(2)

Turn on the machine,

decoding,

15 seconds timing,

stop,

Shutdown

(1)

Turn on the machine,

decoding,

(3)

stop,

Shutdown

(4)

1. Music file 1: music for class 2. Music file 2: music for after class 3. Music file 3: broadcast information, background music

4.2 Control Center MCU Workflow

The main functions of the broadcast controller are completed by the 51 single-chip microcomputer. As the control center, the 51 single-chip microcomputer must continuously detect the level changes of the output signal line of the program-controlled timer. Once the fixed time is detected, it will determine what kind of broadcast information should be output at this time point, and then send a control signal to the mp3 audio decoder to control the mp3 decoder to start working, and select the corresponding audio file to make the decoder start decoding and playing, while controlling the output audio volume from low to high. This control process is completed in about 40 seconds. During this period, the 51 single-chip microcomputer no longer detects the output signal line of the timer, and resumes detecting the output signal line of the timer after one minute. The partial program flow of the single-chip microcomputer selecting to play audio files according to the timing information is shown in Figure 3.

Figure 3 MCU control implementation partial flow chart

5 Conclusion

Due to space limitations, this article only introduces the main functional units of this system. Compared with other similar systems, this system has a clear system structure, good independence of each functional module, high system stability, simple and flexible control, and building managers can easily make corresponding settings according to specific needs.

The results of this project have been successfully applied to the management of the new teaching building. After nearly a year of application, the system has high stability, simple maintenance, low investment, and low power consumption, helping teaching building managers to efficiently complete their daily management work.

The author's innovation: Based on making full use of the existing equipment in the building, the implementation scheme of this timed broadcast system is designed. The building broadcast control system is organically combined with the original water and fire alarm monitoring system of the building without interfering with each other. The original equipment of the building is fully utilized, saving equipment investment. This solution has a good inspiration for the implementation of broadcast control systems in most public places.

References

[1] Qi Weigang, Shi Yan. Intelligent building burglar alarm system based on microcontroller [J]. Microcomputer Information, 2004, (3): 120-121.

[2] Zhong Xiaofeng, et al. Broadcast strategy optimization in wireless ad hoc networks[J]. Journal of Computer Applications, 2005, 22(6): 187-188

[3] Xiao Hongbing, Hu Hui, Guo Suxue. Learn to use single-chip microcomputers with me [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2002

[4] Zhang Yigang, et al. Microcontroller Application Design [M]. 2nd edition. Harbin: Harbin Institute of Technology Press, 1997

[5] Li Mi, Lu Zhao. Design of a remote control system based on single chip microcomputer [J]. Microcomputer Information, 2003, 19 (8): 46-47

[6] Kang Huaguang. Fundamentals of Electronic Technology (Digital Part, Analog Part) [M]. Beijing: Higher Education Press, 2000

Reference address:Design of building timed broadcasting system based on single chip microcomputer

Previous article:Proportional Electromagnet Control Technology Based on 51 Single Chip Microcomputer
Next article:Application and research of mode in main control computer software

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号