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

Internet of things

Design of Wireless Remote Control Doorbell MCU


The doorbell is a common electronic device in modern homes. Its function is to make a sound to remind the homeowner of a visitor. The doorbell has become an indispensable part of residences, offices and other places. At present, most home doorbells are mainly traditional wired button-type doorbells, which are easy to operate but difficult to meet people's needs for home intelligence. For traditional wired doorbells, when a visitor presses the doorbell, the user in the room often needs to go to the door to open the door for the visitor, which is very inconvenient especially in villas, duplex houses and other buildings. With the improvement of people's demand for quality of life, people pay more and more attention to personal safety and property safety, and home security is also developing in the direction of intelligence. Based on the above problems, this paper puts forward the design scheme of wireless remote control doorbell, using infrared wireless communication technology to realize the breakthrough and improvement of doorbell in wireless control and convenience.


1. Overall scheme of wireless doorbell


This design includes two parts: indoor unit and outdoor unit. The outdoor unit mainly includes a matrix keyboard and a liquid crystal display. When a visitor presses the owner's room number, the corresponding room number is displayed on the liquid crystal display. The key signal is sent to the corresponding room through the serial port. The indoor unit mainly includes a bell module, an infrared signal transceiver module and control buttons. The user can open the door and stop the bell through the manual buttons, or send the door opening command and the bell stop command through the infrared remote control without walking to the doorbell installation location. Realize door opening and bell stop control. The software part mainly includes modules such as infrared signal decoding, door opening and closing control, matrix keyboard identification, and number display. The design adopts Altium Designer 16 to design the hardware schematic diagram, and Keil C51 is used as the software development environment. Keil C51 has a simple operation interface and efficient compilation ability, and is widely used in the software development and design of various mainstream single-chip microcomputers.


2. Wireless doorbell hardware design


This design includes two parts, the indoor unit and the outdoor unit. The block diagram of the system is shown in Figure 1. Both the indoor unit and the outdoor unit take the microcontroller as the core, and expand the peripheral circuit modules such as keys, infrared, ringer, display and matrix keyboard.

2.1 MCU controller module


Both the indoor and outdoor units of the system use STC89C51 single-chip microcomputer as the microcontroller. STC89C51 has stable performance and is easy to develop. It has 4 groups of 8-bit IO ports and is very suitable as a small embedded development platform. Figure 2 is the minimum system circuit diagram of the indoor unit control module, including an external 12MHz crystal oscillator, a 5V input power supply and a reset circuit. A resistance-capacitance coupling circuit is added to the design of the reset circuit, which can effectively remove interference signals and avoid misoperation. The minimum system circuit design of the outdoor unit microcontroller is similar to this.


图 2 单片机最小系统电路图


2.2 Infrared receiving processing module


Infrared remote control is a widely used means of communication and control. Due to its simple structure, low power consumption, and strong anti-interference ability, the infrared remote control first encodes the key values of the remote control keys according to the infrared standard coding format, and then uses the infrared transmitter infrared The coded pulse signal is emitted, and the infrared receiving head converts the received infrared light signal into a corresponding electrical signal, and then sends it to the subsequent circuit for amplification and demodulation. The infrared control signal has the characteristics of strong anti-interference ability, reliable information transmission, low power consumption, low cost, and easy implementation.


In this design, the infrared remote control mainly realizes the elimination of the sound of the doorbell and the operation of opening the door, and does not require complicated data transmission. In the design, 1838T infrared receiving tube is used as the infrared signal receiving device. The 1838T infrared receiving head has the characteristics of low power consumption, and the working current is only about 0.7mA. It integrates a dedicated processing IC inside, which can amplify the received infrared signal to the microcontroller The digital signal that the device can recognize, the working voltage is 2.7V-5.5V.


2.3 1602 liquid crystal display


The design uses LCD1602 liquid crystal display module to display the room number pressed by the visitor. LCD1602 is a display device that can display 32 characters. It has 16 pins in total, including 8 data pins, 2 control pins, and the remaining pins are power supply and bias voltage setting pins.


In order to use the backlight of the LCD to be continuously lit in the LCD drive circuit, connect the BL backlight pin of the LCD1602 directly to VCC, so that there is no need to use an IO port to control the backlight of the LCD separately. The bias voltage of the liquid crystal can be set by adjusting VR1. After setting the bias voltage, the contrast of the liquid crystal display can be adjusted. When the power supply voltage changes, the ideal display effect can be achieved by adjusting this resistance.


2.4 Matrix keyboard and buzzer design


The outdoor unit uses a 4X4 matrix keyboard as the visitor's operation interface. Compared with an independent keyboard, the matrix keyboard can save a lot of IO port resources. Only 8 IO ports can be used to scan and detect 16 keys. The indoor unit uses a passive buzzer as the sound reminder device. The buzzer only occupies one IO port of the microcontroller. The frequency signal is output through the IO port and the signal is amplified to drive the buzzer to sound.


3. Wireless doorbell software design


3.1 Software Design of Remote Doorbell Indoor Unit


Figure 3 is the software flow chart of the indoor unit. It can be seen from the figure that the serial port is initialized first when the system is initialized. The serial port initialization is mainly used to set the baud rate and the received data format of the serial port. After the initialization is completed, it can be called Serial port-related sending and receiving functions. In order to process the infrared signal sent by the 1838T infrared emission tube, the system also needs to set the timer counter. After setting the timer counter, the characteristics of the timer counter can be used to process the received infrared data. The data sent by the outdoor unit is random each time. In order to ensure that the indoor unit can respond well to the serial port data, it is necessary to enable the receiving interrupt of the serial port in the design. After the receiving interrupt is enabled, the serial port data can be responded and received in real time.


After the initialization is completed, the system enters a cycle, and the microcontroller continuously detects whether the serial port data is received. Once the serial port data is received, it starts to process and judge the received serial data form. The data sent by the serial port first buzzer enable command , and then call the detection and monitoring program to detect whether there is an infrared signal or a key signal. Once the relevant signal is detected, it will follow the specific execution action. If no serial port data is received, it is in wait mode.


3.2 Software design of remote doorbell outdoor unit


Figure 4 is the processing flow chart of the outdoor unit of the system, which is similar to the indoor unit. When the system is initialized, the microcontroller resources used and the external hardware are initialized first. The microcontroller resources to be initialized mainly include serial ports, and the external Equipped with matrix keyboard and LCD display. The content of LCD screen initialization must first initialize the IO port of the LCD, and then control the bias voltage of the LCD display and set the temperature correction by operating the IO port to make the LCD display better, and finally call the command to set the display mode. After initializing the microcontroller resources and peripheral hardware, the system starts to enter the program loop, and continuously detects whether there is a key action on the external matrix keyboard. Once a key is detected, it will obtain the key value of the key and display the corresponding room number on the LCD. screen, and then send control commands to the indoor unit through the serial port.


Summarize


This design is mainly aimed at the problem that the traditional doorbell requires the head of the household to walk to the doorbell installation position to open the door, which brings inconvenience to the user. A wireless remote control doorbell system based on infrared communication is designed. The system includes two parts: indoor unit and outdoor unit. The door can be turned on and the buzzer sound can be turned off. After testing, the system is stable and reliable, and can bring great convenience to users.


The above is an example of the design and development of a wireless remote control doorbell system based on a single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have wireless doorbell design needs, you can trust us. We represent a variety of single-chip microcomputers, voice chips, dual-mode Bluetooth ICs, and wifi chips. Brands include Songhan MCU, Yingguang MCU, Jerry Bluetooth, Ankai Bluetooth, Allwinner, and Realtek. Our technical services include: PCB design, microcontroller development, Bluetooth solutions, software and hardware custom development, APP development, small program development, WeChat official account development, etc. It can also undertake the design of intelligent electronic products, the development of living appliances, the research and development of beauty equipment, the application of Internet of things platform, the smart home control system, the development of TWS earphones, Bluetooth earphone speakers, the development of children's educational toys, the design of electronic education products, etc.

  • TOP