Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

MCU

Intelligent dormitory system design


Design of Intelligent Dormitory System Based on 51 SCM


At present, the configuration provided by the student dormitory can only meet the basic needs of the students. In the 21st century with the rapid development of science and technology, the simple basic configuration naturally cannot meet the students' requirements for fast and convenient daily life. The intelligence and humanization of the dormitory can improve the students' good impression of dormitory life, improve the quality and safety of dormitory life.


In the design of this article, we can not only provide students with the above convenient functions, but also hope to better protect students by strengthening the security alarm reminder system. The smart dormitory system designed in this paper can realize multiple functions, including wake-up, voice control, security system and remote SMS reminder. The personalized design of the clock allows students to wake up to music; the use of voice recognition technology to better control electrical appliances; the security measures for the dormitory can better protect the safety of students. In the era of intelligence, such a design can provide students with a more convenient life.


1. Design scheme of intelligent dormitory system


The system includes a wake-up system, a security alarm system and a voice control system. Wake up and wake up the system to generate time through the calendar chip, and use the liquid crystal display. The wake-up time is set through independent buttons. When the wake-up time coincides with the chip time, the single-chip microcomputer will start the speaker and the electric curtain switch to wake up the students. The safety alarm system is to activate the smoke alarm when a fire occurs and the smoke concentration is too high. The smoke alarm will send a short message to the students through the single-chip microcomputer control GSM module, and remind the students through the loudspeaker alarm. The voice control system receives voice commands from students through the voice chip, and the system can control the start of electric lights and electric curtains.


2. Hardware design of intelligent dormitory system


2.1 Main controller


The main controller used in the system is a 51 single-chip microcomputer, the model is STC89C52RC, which is a low-power, high-performance 8-bit microcontroller produced by STC. It has 8K bytes of Flash, 512 bytes of RAM, and a built-in 4K bytes EEPROM, 3 16-bit timer/counters and 4 external interrupts.


2.2 Wake up and wake up hardware design


The built-in chip of the calendar module can accurately display the current second, minute, hour, date, month, and year information on the display screen. The built-in power-down protection ensures normal operation without external power supply. The system can not only realize the calendar function, but also realize the intelligent wake-up function by setting the wake-up time. When the current time is the same as the set wake-up time, the speaker will automatically play music to wake up the students.


(1) Calendar module: The calendar module consists of a calendar chip and independent buttons. The calendar chip adopts DS1302 chip, which is a trickle charge clock chip launched by DALLAS company. Contains a real-time clock and 31 bytes of static RAM, it can communicate with the microcontroller through a simple serial interface. The real-time clock provides seconds, minutes, hours, date, month, and year information. The calendar module adjusts the time through independent buttons.


(2) Display and playback module: The display module adopts LCD12864 liquid crystal screen. It can cooperate with a single-chip microcomputer to display Chinese characters and English characters, realize a Chinese human-computer interaction interface, and has the characteristics of low power consumption and rich display content. The playback module uses a loudspeaker for music playback.


2.3 Voice control hardware design


The design of this module realizes the function of voice control electrical appliances at a certain distance. Speak the pre-set command sentences into the microphone, and you can intelligently switch curtains and lights. Ensure that students can switch electrical appliances without getting out of bed or raising their hands under certain circumstances.


(1) Voice module: The voice module adopts LD3320 chip, which has voice recognition function, and can recognize the students' voice commands of "turn on the light", "turn off the light", "open the curtain" and "close the curtain", and realize the control of lights and curtains. Simple operation and strong practicability.


(2) Electric lamp and curtain module: The electric lamp module adopts an LED lamp to realize. Electric curtains are driven by a stepping motor and controlled by the forward and reverse rotation of the motor.


2.4 Security alarm hardware design


The system is designed to better protect students. The current student dormitories are very lacking in the way for students to understand the status of the dormitories. Most of the dormitories can only be experienced by the students' own five senses. But when danger arises, the lack of such communication can be fatal. The safety alarm system is mainly aimed at fire conditions. When the analog voltage output by the smoke alarm reaches the set safe value, the single-chip microcomputer will make the speaker sound an alarm to forcibly wake up the students who may be asleep, so as to ensure that the lives of students can be saved even in the case of a fire in the middle of the night; the single-chip microcomputer An instruction will also be issued to let the GSM module send a text message, so that every student can be informed of the danger in time, and it also ensures that the unknowing students who are approaching the danger zone leave safely.


(1) Smoke alarm module: The smoke alarm module is composed of a smoke sensor and a speaker. The smoke sensor uses the MQ-2 gas sensor. The analog output voltage changes with the smoke concentration, the higher the concentration, the greater the voltage. Once the voltage reaches the safe voltage value set by the microcontroller, the speaker will send out an alarm signal.


(2) GSM module: The GSM module used in the system is SIM900A module, which can be controlled by sending AT commands through the 51 single-chip microcomputer to realize the functions of making and receiving calls, sending text messages, and transmitting data through GPRS. Once a fire occurs, the 51 single-chip microcomputer will send a short message to the students through the GSM module, so that the students can be informed of the danger in time and get out of danger.


3. Software Design of Intelligent Dormitory System


3.1 Wake up software design


The wake-up system first initializes the calendar chip DS1302 and the LCD. The DS1302 chip can accurately display the time on the LCD. The current displayed time and the wake-up time to be set can be changed through independent buttons. When the actual time is the same as the set wake-up time, the speaker will play music. Waking up the sleeping students with the sound of elegant music can keep them relaxed throughout the day, instead of being reluctantly "pulled up" by the annoying alarm clock.


3.2 Voice control software design


The voice control system first needs to initialize the LD3320 voice chip, and set the voice recognition list of "open the curtain", "close the curtain", "turn on the light" and "turn off the light". When the students enter the door of the dormitory, they can realize voice control to switch lights and curtains after issuing the above-mentioned command to the microphone. This function allows students to better control the electrical appliances in the dormitory without getting out of bed and pressing the switch in winter nights or other inconvenient control situations.


3.3 Security alarm software design


In the security alarm system, when the modules are initialized respectively, the smoke sensor can continuously output the analog voltage to the microcontroller. When the smoke concentration reaches a certain value, the analog voltage output by the sensor will exceed the safe value voltage set by the single-chip microcomputer. At this time, the single-chip microcomputer will make the speaker sound an alarm, forcefully wake up the students who may still be asleep, and send AT commands to the GSM module, so that all students can receive short messages reminding them of danger, ensuring that students who do not know will not enter Dangerous zone.


Summarize


This system realizes the three functional designs of the intelligent dormitory, including wake-up system, voice recognition system and security alarm system. The wake-up system realizes the display of the calendar and the function of playing music at the wake-up time. This allows students to wake up in a pleasant environment. The voice recognition system allows students to use voice to control lights and curtains, allowing students to control electrical appliances more conveniently and quickly. The security alarm system can report to the police in time after a fire is discovered and send text messages to students' mobile phones. This can improve the safety index of the dormitory and avoid greater losses. The design of this system can make the student dormitory more convenient and safer, and let the students live in a warm environment.


The above are the details of the design technology of the intelligent dormitory system based on the 51 single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi 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 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 earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.

  • TOP