Design of intelligent wireless monitoring platform

. Taking STC89C52 single chip microcomputer as the controller, the communication carrier adopts low-power Bluetooth 4.0, LCD12864 display screen as the human-computer interaction interface, open-loop stepping motor and closed-loop steering gear as the action actuator, reflective infrared sensor and reflective photoelectric sensor as the detection sensing system, integrating electronics, machinery This set of intelligent wireless monitoring platform developed by *software and other aspects realizes three functions: wireless remote control monitoring, automatic panoramic detection and automatic intrusion alarm. The design has strong practicability. The whole system has the characteristics of low cost and low power consumption. It can play an important role in the field of security.


Introduction
As the main executive device in the field of security, monitoring products shoulder many functions, such as shooting and recording, remote control, detection and alarm, and the platform driving the movement of monitoring cameras is more important.At present, there are only fixed gun type monitoring platform and spherical monitoring platform on the market.Fixed and gun platform cannot move when receiving instructions.After installation, the shooting coverage angle and direction of the surveillance camera are fixed, so the coverage can only be expanded through multiple networking, which virtually increases the cost of equipment in the early stage and the storage space of image data in the later stage; At present, the spherical monitoring platform can only rotate left and right to expand the coverage, and the rotation angle can only be controlled by the handle.

Overall design of system scheme
The STC89C52 single chip microcomputer is used as the core controller, and the motion execution link is driven by the motor.The heading axis adopts the open-loop controlled stepping motor, which is driven by the Darlington tube and is responsible for controlling the left and right motion of the platform.The pitch axis adopts the closed-loop controlled steering gear, which is controlled by the pulse width modulation signal output by the single chip microcomputer and is responsible for the pitch motion of the platform.In the detection link, the opposite photoelectric sensor is used to provide the mechanical zero position signal for the stepping motor and determine the mechanical zero position.The reflective infrared sensor is used to detect whether there is object intrusion at each entrance and exit and provide an alarm signal for the system.As the main human-computer interaction interface, the display screen adopts LCD12864 display, which can display Chinese and English.The display effect is intuitive and clear.It is used to display the current working mode, current working state, wireless communication received signal, etc. the buzzer circuit is used to prompt the current working state and alarm reminder.The Bluetooth serial port is used for wireless communication.The upper computer on the PC side sends a string of hexadecimal code to the Bluetooth host.The protocol set by the Bluetooth module sends the data to the lower computer.After receiving the corresponding hexadecimal code string, the MCU serial port receiving area performs the corresponding action and displays the current mode and status through the display screen.
Mode switching can be controlled by independent keys on the main control board or host computer software, and the current mode can be displayed on the display screen.Mode 1 is the "real-time monitoring" mode.In this mode, the platform can be controlled to rotate left and right in the horizontal direction or up and down in the vertical direction through the upper computer software, or the platform can be controlled to rotate in the heading and pitching directions through the independent keys on the control board; Mode 2 is the "panoramic detection" mode.In this mode, the platform automatically rotates horizontally at an interval of 45 degrees.After every 45 degrees, the buzzer prompts once.After 360 degrees, it reverses to the mechanical origin; Mode 3 is "alert and fortification" mode.In this mode, if any of the four doors in the house is invaded, the sensor will detect the intrusion signal, the platform will rotate horizontally to the intrusion position, the buzzer will prompt twice, return to the mechanical origin after 2 seconds, and continue to wait for the command to set up alert.Special mode keys are used for mode switching, which are common to independent keyboard and upper computer.The system has the function of power on initialization.If the platform is not at the mechanical origin after power on, the system will automatically send a command to return the platform to the mechanical origin, and the display screen displays "system initialization".After returning to the origin, the display screen displays "system running".In this process, all data sent by the upper computer can display the corresponding hexadecimal value on the display screen, which is convenient for viewing communication information and troubleshooting.The overall block diagram of the design scheme is shown in Figure 1.

Hardware circuit design
The hardware circuit includes MCU minimum system circuit, motor drive circuit, sensor detection circuit, Bluetooth wireless control circuit, display screen drive circuit, buzzer and key circuit.

Motor drive circuit
This design adopts four phase eight beat motor, stepping motor and Darlington tube drive, which has strong reliability and simple structure.Each time the single chip microcomputer outputs a PLS pulse, the stepping motor rotates at a step angle corresponding to the rotation, ITM Web of Conferences 47, 01022 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701022and the rotor rotates at a tooth pitch, so as to calculate the required number of pulses.In the program, it is necessary to add a sequence conversion array, define a two-dimensional array, and put the sequence conversion tables of forward and reverse sequence into the array.The single chip microcomputer can directly call the array to complete the control of the stepping motor [1] .Due to the large current required to drive the stepping motor, if the single chip microcomputer directly drives the stepping motor, the pin output current will not reach the current of the driving motor, resulting in the motor will not be able to rotate.At the same time, it will also cause abnormal conditions such as frequent reset and restart of the single chip microcomputer.In order to increase the output capability of the single chip microcomputer, the stepping signal of the ul003a is used to avoid the stepping signal of the single chip microcomputer.This scheme is efficient and stable, and effectively avoids the occurrence of abnormal conditions of single chip microcomputer caused by excessive driving current.Darlington tube input signal is connected to MCU P2.0-P2.3. The output signal of Darlington tube is connected with the four phase input signal of stepping motor.
The control method of the steering gear is different from that of the stepping motor.The steering gear is a closed-loop servo [2] .The DC motor drives the reduction gear set to rotate, and the torque is transmitted by the output shaft.At the same time, the output shaft is connected with a potentiometer to feed back the real-time angle to the potentiometer.The start and stop of the DC motor is controlled through the closed-loop feedback network, so as to accurately control the motion angle.The steering gear control circuit is simple.The external power supply drives the motor to rotate.At the same time, a single chip outputs PWM pulse width modulation to control the duty cycle, so as to accurately control the rotation angle of the steering gear.

Sensor detection circuit
The main function of the radiation type photoelectric sensor is to find the mechanical zero position for the stepper motor.Because the stepper motor has no encoder and Hall element, the motor movement depends entirely on the pulse signal provided by the single chip microcomputer, and the stepper motor can rotate as many step angles as there are pulses.Therefore, the stepper motor cannot feed back the current absolute position, but the use of the radiation type photoelectric sensor can detect the in place signal, Trigger the sensor when the motor rotates to the mechanical origin, send a digital signal to the single chip microcomputer, and define the current mechanical zero position as electrical zero position.
In the warning and fortification mode, the reflective infrared sensor is used to detect foreign intrusion targets.When someone or other objects block the infrared transmitting tube, it triggers the level signal.The signal is amplified by the operational amplifier and input to the corresponding pin of the single chip microcomputer.After the system detects the intrusion, it can control the monitoring platform to rotate quickly to the corresponding position according to the specific intrusion point [3,4] .The detection circuit mainly uses photoelectric device signal conversion and operation amplification to detect the environmental conditions.Reflective infrared sensor out1 is connected to MCU P0.5.Out2 is connected to MCU P0.6.Out3 is connected to MCU P0.7.Out4 is connected to MCU P1.2.

Bluetooth wireless control circuit
The final control form of this design adopts Bluetooth serial port wireless control.Compared with wired control, wireless control is slightly better in flexibility and convenience.This time, the master-slave Bluetooth module is used.Before use, the serial port debugging assistant needs to send at instructions, set ID, password, master-slave mode and mutual binding mac address for the master-slave module respectively, In order to realize data transparent transmission, and adopt protocol free serial port communication mode [5] .The Bluetooth module of the host is connected to the usb-ttl module through DuPont cable, and finally connected to the PC through USB; The slave module is connected to the serial port pin of the single chip microcomputer through the DuPont line.Pay special attention to the form of cross interconnection.Bluetooth RXD is connected to the single chip microcomputer TXD, and Bluetooth TXD is connected to the single chip microcomputer RXD.

Display driving circuit
The data interface of 12864 display screen is connected with the single chip microcomputer.Setting parameters in the program can form a Chinese human-computer interaction interface.The serial control mode with high efficiency is adopted.It only needs to connect three wires e, R/W and RS to complete the control of the display screen, in which e is connected to MCU P1.5.R/W is connected to MCU P1.6.RS connected to MCU P1.7；At the same time, in order to adjust the screen contrast, a 10 kΩ adjustable potentiometer voltage divider needs to be connected to the V0 pin of the display screen.

Buzzer and key circuit
The buzzer needs strong current drive, and the ordinary MCU pin can only output 30-50 ma current.At this time, PNP triode is used to drive the buzzer, which can improve the load capacity.The buzzer adopts an active buzzer, which is connected with an independent switch button on the main control circuit board, which can directly control the platform manually without upper computer control, so as to facilitate rapid switching between the two control modes [6] .

Software simulation debugging
Use proteus8.0software to verify the preliminary design, test whether the intelligent wireless monitoring platform can achieve the expected three modes, detect whether each link can work normally, effectively eliminate software and hardware problems, and provide the verification of the preliminary scheme.Using Proteus8.0simulation, build the drive module, key module, display module and motor module, and connect them according to the circuit schematic diagram.After the connection, run the online simulation.The simulation circuit is shown in Figure 2.

Summary
This design adopts an intelligent wireless controlled platform, which can be loaded with a monitoring camera.The platform can rotate 360 degrees horizontally and adjust the pitch by 120 degrees to meet the panoramic perspective and improve the monitoring efficiency.Intelligent monitoring platform has three intelligent working modes, pitch axis and heading axis dual axis control, low-power Bluetooth 4.0 wireless communication.When the platform is started, the system will conduct power on self-test to detect whether the platform is in the initial position.If it is not in the initial position, it will immediately move to the initial point for standby; In mode 1, the rotation direction and angle of platform can ITM Web of Conferences 47, 01022 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701022be controlled remotely; Mode 2 is automatic mode.The pan tilt rotates 360 degrees horizontally to detect all scenes in a panoramic way; In mode 3, as long as there is a target intrusion, the platform will automatically turn to the target position.The design of the monitoring platform is highly intelligent and integrated, suitable for various conventional occasions, and has the characteristics of economy and environmental protection.

ITM
Web of Conferences 47, 01022 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701022 4 Software development environment The wireless host computer control software designed in this paper runs on the windows platform, and can remotely wireless control and monitor the platform through the control software.The upper computer development software adopts C++ Builder 5.0 development platform.The internal program adopts OCX serial communication component to complete the sending and receiving of serial data.The lower computer development software adopts keil4 compilation and development platform.