Method, device, chip and storage medium for controlling pan / tilt platform based on multi-channel signals
By designing a multi-channel signal integration module, supporting interfaces for multiple communication protocols and selecting priority signals to control the pan-tilt head, the problem that the existing pan-tilt head cannot receive multi-channel signals is solved, and the security of the remote control signal and the flexibility of hardware upgrades are improved.
Patent Information
- Application Number
- CN202211175147.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-09-26
AI Technical Summary
Existing gimbals only support a single communication protocol and are unable to receive and switch between multiple signals. This can lead to unpredictable movements when the remote control signal is lost, and the hardware interface needs to be upgraded at high cost when replacing the device.
A multi-channel signal integration module is designed to support multiple communication protocols through multiple interfaces. A software scanning scheme is used to determine the protocol. The processing unit selects one signal as the output signal to control the pan-tilt head, realizing the reception and switching of multiple signals.
It realizes flexible switching of the pan/tilt system under multiple communication protocols, improves the backup and security of remote control signals, and reduces the cost of hardware upgrades.
Smart Images

Figure CN116800859B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of remote control, and in particular to a method, device, chip and computer-readable storage medium for controlling a pan / tilt platform based on multiple signals. Background Art
[0002] Existing open-source gimbals have open source code, but to adapt to various usage scenarios, these gimbals generally support several common communication protocols on the market. Among them, some gimbals support the input of pulse width modulation (PWM) signals, serial bus (SBUS) signals, and serial port control signals. However, when the gimbal is working, it can only operate according to a pre-set input signal and does not support the input of multiple signals, nor does it support selection among multiple signals. Summary of the Invention
[0003] To solve the above technical problems, the embodiments of the present application provide a method and device, a chip, and a computer-readable storage medium for controlling a pan-tilt head based on multiple signals.
[0004] To achieve the above objectives, the technical solution of the embodiment of the present application is implemented as follows:
[0005] In one aspect, an embodiment of the present application provides a method for controlling a pan / tilt head based on multiple signals, the method being applied to a multiple signal integration module, the multiple signal integration module having multiple interfaces, each of the multiple interfaces supporting input signals of multiple communication protocols, the method comprising:
[0006] Determining communication protocols corresponding to the multiple interfaces, and configuring the multiple interfaces to operate using the corresponding communication protocols;
[0007] In the case where the multiple interfaces operate using corresponding communication protocols, receiving and identifying multiple input signals through the multiple interfaces, and selecting one input signal from the identified multiple input signals as an output signal;
[0008] The pan / tilt platform is controlled via the output signal.
[0009] On the other hand, an embodiment of the present application provides a device for controlling a pan / tilt platform based on multiple signals, the device comprising a multiple signal integration module having multiple interfaces, each of which supports input signals of multiple communication protocols; the multiple signal integration module further comprising a processing unit and an output unit; wherein,
[0010] The processing unit is configured to determine the communication protocols corresponding to the multiple interfaces and configure the multiple interfaces to operate using the corresponding communication protocols;
[0011] The multiple interfaces are used to receive and identify multiple input signals when working with corresponding communication protocols;
[0012] The processing unit is further configured to select one input signal from the identified multiple input signals as an output signal;
[0013] The output unit is used to input the output signal to the pan-tilt head, thereby controlling the pan-tilt head through the output signal.
[0014] Wherein, each of the multiple interfaces has N pins, where N is a positive integer; wherein the definition of the N pins of the interface is determined based on the communication protocol of the input signal corresponding to the interface.
[0015] On the other hand, an embodiment of the present application provides a chip, including: a processor, used to call and run a computer program from a memory, so that when a device equipped with the chip is executed, it is used to implement the method of controlling the pan-tilt head based on multiple signals provided in the above embodiment.
[0016] On the other hand, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a computer, is used to implement the method for controlling a pan-tilt head based on multiple signals provided in the above embodiment.
[0017] The above-mentioned technical solution of the embodiment of the present application designs a multi-channel signal integration module. The multi-channel signal integration module has multiple interfaces, each of which supports input signals of multiple communication protocols, so that multiple signal inputs can be received through the multiple interfaces of the multi-channel signal integration. In addition, a mechanism is designed to determine the communication protocols corresponding to the multiple interfaces, so that the communication protocols corresponding to each interface can be determined under the premise of using a unified hardware interface. Furthermore, a multi-channel signal selection mechanism for the pan-tilt head is designed, so that one input signal can be selected from the multiple input signals as the output signal to realize the control of the pan-tilt head. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 Schematic diagram of the process of the method for controlling the pan / tilt head based on multiple signals provided in the embodiment of the present application Figure 1 ;
[0019] Figure 2 A schematic diagram of a flow chart for determining a corresponding communication protocol for each of the multiple interfaces of the multi-channel signal integration module provided in an embodiment of the present application;
[0020] Figure 3Schematic diagram of the process of selecting output signals based on multiple signals provided in the embodiment of the present application Figure 1 ;
[0021] Figure 4 Schematic diagram of the process of selecting output signals based on multiple signals provided in the embodiment of the present application Figure 2 ;
[0022] Figure 5 Schematic diagram of the process of the method for controlling the pan / tilt head based on multiple signals provided in the embodiment of the present application Figure 2 ;
[0023] Figure 6 A schematic diagram of the structure of a device for controlling a pan / tilt platform based on multiple signals provided in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of multiple interfaces of a multi-channel signal integration module provided in an embodiment of the present application;
[0025] Figure 8 A schematic diagram of the structure of an electronic switch in a multi-channel signal integration module provided in an embodiment of the present application;
[0026] Figure 9 A schematic diagram of a flow chart of selecting an output signal by a multi-channel signal integration module according to an embodiment of the present application;
[0027] Figure 10 A schematic structural diagram of the chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable a more detailed understanding of the features and technical content of this application, the implementation of this application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit this application.
[0029] PTZ can be roughly divided into two categories. One is the non-open source PTZ, which is generally used with the company's self-developed controller. Due to the lack of open source code, this type of PTZ is difficult to use for customized development and its functions are difficult to modify. The other is the open source PTZ, whose underlying source code is open, but in order to adapt to various usage scenarios, this type of PTZ generally supports several common communication protocols on the market. Among them, some PTZs support the input of control signals in PWM, SBUS and serial port formats, but when the PTZ is working, it can only work according to one input signal that has been set in advance. The PTZ does not support the input of multiple signals, nor does it support selection among multiple signals.
[0030] During operation, the gimbal often needs to switch between different working modes, which may include manual control mode controlled by remote control signals, tracking mode controlled by camera image recognition program signals, or tracking mode controlled by Global Positioning System (GPS) signals. These control signals are likely to use different communication protocols and are generated by different control devices. In addition, the remote control signal may be lost when the gimbal is remotely controlled. After the control signal is lost, the gimbal may move unpredictably, causing damage to the equipment on the gimbal. If multiple remote control signals can be used for backup, safety can be improved.
[0031] In order to enable the PTZ to receive multiple signals and switch between them, one feasible solution is to modify the underlying code of the PTZ and add the corresponding signal interface to the hardware circuit. This solution requires modifying the control code of the PTZ, which is a lot of work. At the same time, because the hardware interface needs to be modified according to different input signals, if the control device of another manufacturer or other model needs to be replaced during use, and the new control device uses a different communication protocol than the old control device, then the hardware interface needs to be changed, which increases the cost of the upgrade.
[0032] Another approach involves designing a modular controller to integrate and select input signals. This solution incorporates a multi-channel SBUS signal integration module, which uses multiple SBUS inputs to implement remote control backup and remote drone takeoff and landing. The solution describes an SBUS many-to-one module that receives multiple SBUS signals as input and selects the highest-priority signal as the output signal. This solution has several drawbacks: First, the SBUS protocol is primarily used in drone remote controls. For gimbals, SBUS signals alone are insufficient for most scenarios. The signals generated by tracking control devices are mostly serial signals using USRAT or SPI protocols, and this solution does not provide a way to adapt these serial signals. Therefore, it is limited in gimbal control scenarios. Second, this solution only supports SBUS signal input; it lacks a standardized signal interface and cannot determine the input signal protocol through scanning. Changing the input signal protocol during product upgrades requires modifying the module code and hardware interface, making it inflexible. Third, the final output signal selection scheme in this solution is simply selected according to a fixed priority order and cannot be manually controlled by the user. One signal among multiple input signals is selected as the output signal according to the actual usage scenario.
[0033] To address at least some of the aforementioned issues, the following technical solutions are proposed in the embodiments of this application. The technical solutions in the embodiments of this application, through the design of a unified hardware interface and software scanning solution, enable the module to receive signals from different communication protocols and switch between them at will. The control logic of the pan / tilt system is designed to select different pan / tilt system operating modes through manual control of input signals.
[0034] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the scope of protection of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.
[0035] Figure 1 Schematic diagram of the process of the method for controlling the pan / tilt head based on multiple signals provided in the embodiment of the present application Figure 1 ,like Figure 1 As shown, the method for controlling the pan / tilt head based on multiple signals is characterized by being applied to a multiple signal integration module, the multiple signal integration module having multiple interfaces, each of the multiple interfaces supporting input signals of multiple communication protocols, and the method comprising the following steps:
[0036] Step 101: Determine the communication protocols corresponding to the multiple interfaces, and configure the multiple interfaces to operate using the corresponding communication protocols.
[0037] Step 102: When the multiple interfaces operate using corresponding communication protocols, multiple input signals are received and identified through the multiple interfaces, and one input signal is selected as an output signal from the identified multiple input signals.
[0038] Step 103: Control the pan / tilt platform via the output signal.
[0039] In some implementations, the multi-channel signal integration module is constructed using a single-chip microcomputer chip, such as an STM32 chip.
[0040] for Figure 1 Step 101 in the above example can be achieved by Figure 2 The process shown determines the communication protocols corresponding to multiple interfaces.
[0041] Figure 2 A flow chart of determining a corresponding communication protocol for each of the multiple interfaces of the multi-channel signal integration module provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the determining of the communication protocols corresponding to the multiple interfaces includes the following steps:
[0042] Step 201: Select a communication protocol from multiple communication protocols in sequence.
[0043] Step 202: Configure the interface based on the selected communication protocol.
[0044] Step 203: Identify the received input signal based on the configured interface. If the identification is successful, proceed to step 204; if the identification fails, proceed to step 201 again.
[0045] Step 204: Determine that the communication protocol corresponding to the interface is the currently configured communication protocol.
[0046] In some embodiments, in order to enable the interface to adapt to different input signals, the module adopts a method of automatically scanning the input signals in sequence. When the module starts, it will select one of the four input protocols in sequence, configure the IO port of the microcontroller, and then try to parse it. If the signal can be successfully parsed and the input signal conforms to the specified format, the scan is considered successful, and the current input signal protocol is recorded. When the module is working normally, the port uses this protocol. If the parsed signal does not conform to the specified format, or if no signal is received for a long time, the protocol is considered unsuitable, and the next protocol is selected in sequence for parsing again.
[0047] for Figure 1 Step 102 in the above example can be achieved by Figure 3 The process shown selects one input signal from multiple input signals as an output signal.
[0048] Figure 3 This is one of the flow charts of selecting an output signal based on multiple signals provided in the embodiment of the present application, such as Figure 3 As shown, the step of selecting one input signal from the identified multiple input signals as the output signal includes the following steps:
[0049] Step 301: Determine whether there is a first type signal in the multiple input signals, if yes, execute step 302; if no, execute step 304.
[0050] Step 302: Determine a control signal based on the first type of signal.
[0051] Step 303: Select an output signal from the multiple input signals based on a control signal.
[0052] Step 304: Determine whether there is a second type signal in the multiple input signals, and if so, execute step 305; if not, execute step 306.
[0053] Step 305: Select the second type signal with the smallest interface number from the multiple input signals as the output signal.
[0054] Step 306: Determine whether there is a third type of signal in the multiple input signals, if yes, execute step 307; if no, execute step 308.
[0055] Step 307: Select the third type signal with the smallest interface number from the multiple input signals as the output signal.
[0056] Step 308: Determine whether there is a fourth type of signal in the multiple input signals, if yes, execute step 309; if no, execute step 310.
[0057] Step 309: Select the fourth type signal with the smallest interface number from the multiple input signals as the output signal.
[0058] Step 310: Select a preset neutral point signal as the output signal.
[0059] In some embodiments, the multiple input signals are described using the following four signals as examples: a first type of signal is a serial bus (SBUS) signal (this signal corresponds to multiple channels), a second type of signal is a pulse width modulation (PWM) signal, a third type of signal is a serial peripheral interface (SPI) signal, and a fourth type of signal is a universal synchronous asynchronous receiver transmitter (USART) signal. It should be noted that due to the presence of multiple input signals, we need to select one as the output signal to control the pan / tilt head. A set of output signal selection logic is designed here, which first needs to determine whether there is an SBUS signal in the multiple input signals. Since the SBUS signal is generated by the remote control receiver system and is generally controlled manually, this signal can be used to implement manual output signal selection.
[0060] for Figure 3 Steps 302 and 303 in the above example can be solved by Figure 4 The process shown determines a control signal and selects an output signal based on the control signal.
[0061] Figure 4 The second flow chart of selecting an output signal based on multiple signal paths is provided in the embodiment of the present application. Figure 4 Said method comprises the following steps:
[0062] Step 401: Determine whether the first type signal satisfies the first condition. The first condition is that the value of the 10th channel corresponding to the first type signal is greater than the first threshold. If not, execute the procedure as if the first type signal does not exist. Figure 3 If the condition is met, the first type of signal is used as a control signal and step 402 is executed.
[0063] Step 402: Determine whether the control signal satisfies a second condition, where the second condition is that the value of the fifth channel corresponding to the control signal is greater than a first threshold. If so, execute step 403; if not, execute step 405.
[0064] Step 403: Determine whether a second type of signal exists. If so, execute step 404; if not, execute step 411.
[0065] Step 404: Select the second type signal with the smallest interface number as the output signal.
[0066] Step 405: Determine whether the control signal satisfies a third condition, where the value of the sixth channel corresponding to the control signal is greater than a first threshold. If so, execute step 406; if not, execute step 408.
[0067] Step 406: Determine whether a third type of signal exists. If so, execute step 407; if not, execute step 411.
[0068] Step 407: Select the third type signal with the smallest interface number as the output signal.
[0069] Step 408 : Determine whether the control signal satisfies a fourth condition, where the value of the seventh channel corresponding to the control signal is greater than a first threshold. If so, execute step 409 ; otherwise, execute step 411 .
[0070] Step 409: Determine whether a fourth type of signal exists. If so, execute step 410; if not, execute step 411.
[0071] Step 410: Select the fourth type signal with the smallest interface number as the output signal.
[0072] Step 411: Select the control signal as the output signal.
[0073] In some implementations, the first threshold is set to a value of 1600.
[0074] Figure 5 Schematic diagram of the process of the method for controlling the pan / tilt head based on multiple signals provided in the embodiment of the present application Figure 2 ,like Figure 5 As shown, the method steps for controlling the PTZ with multiple input signals are as follows:
[0075] Step 501: A multi-channel signal integration module receives multiple channels of signals and selects one channel as an output signal.
[0076] In some embodiments, four different communication protocols are used in the multi-channel signal: SBUS, SPI, USART, and PWM. The SBUS signal is generated by the remote control receiver system and is generally controlled manually, so the SBUS signal is preferably selected as the output signal to control the pan / tilt head.
[0077] Step 502: The output signal is output to the pan / tilt platform in the format of three PWM signals.
[0078] In some embodiments, the output signal is output in the format of three signals: PITCH, YAW, and ROLL. The PITCH signal represents rotation around the X-axis, also known as the pitch angle. When the positive half of the X-axis lies above a horizontal plane passing through the origin, the pitch angle is positive; otherwise, it is negative. The YAW signal represents rotation around the Y-axis, also known as the yaw angle. Yawing to the right is positive, and yaw to the right is negative. The ROLL signal represents rotation around the Z-axis, also known as the roll angle. Rolling to the right is positive, and rolling to the right is negative. These three signals work together to control the gimbal.
[0079] Figure 6 A schematic diagram of the structure of a device for controlling a pan / tilt platform based on multiple signals provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device is characterized in that it has a multi-channel signal integration module, which includes: multiple interfaces 601, a processing unit 602 and an output unit 603, wherein
[0080] The multiple interfaces 601 are used to receive and identify multiple input signals when working with corresponding communication protocols.
[0081] The processing unit 602 is used to determine the communication protocols corresponding to the multiple interfaces and configure the multiple interfaces to work using the corresponding communication protocols; and is also used to select one input signal from the identified multiple input signals as an output signal.
[0082] The output unit 603 is used to input the output signal to the pan-tilt head, thereby controlling the pan-tilt head through the output signal.
[0083] In some implementations, the processing unit 602 is configured to determine, for each of the multiple interfaces, a communication protocol corresponding to the interface through the following process:
[0084] Select a communication protocol from a plurality of communication protocols in sequence;
[0085] configuring the interface based on the selected communication protocol;
[0086] Identifying a received input signal based on the configured interface;
[0087] If the identification is successful, determining that the communication protocol corresponding to the interface is the currently configured communication protocol;
[0088] If the identification fails, the next communication protocol is selected in sequence from the multiple communication protocols, and the steps of configuring the interface based on the selected communication protocol and identifying the received input signal based on the configured interface are performed again.
[0089] In some implementations, the processing unit 602 is configured to:
[0090] Determining whether there is a first type of signal in the multiple input signals;
[0091] If the first type of signal exists, determining a control signal based on the first type of signal, and selecting an output signal from the multiple input signals based on the control signal;
[0092] If the first type of signal does not exist, the output signal is selected by the following steps:
[0093] Determining whether there is a second type of signal in the multiple input signals;
[0094] If a second type signal exists, selecting the second type signal from the multiple input signals as the output signal;
[0095] If the second type signal does not exist, determining whether the third type signal exists in the multiple input signals;
[0096] If a third type of signal exists, selecting the third type of signal from the multiple input signals as the output signal;
[0097] If the third type of signal does not exist, determining whether a fourth type of signal exists in the multiple input signals;
[0098] If a fourth type signal exists, the fourth type signal is selected from the multiple input signals as the output signal.
[0099] In some embodiments, the processing unit 602 is configured to select, if there are multiple second-type signals, the second-type signal with the smallest interface number from the multiple input signals as the output signal; if there are multiple third-type signals, select the third-type signal with the smallest interface number from the multiple input signals as the output signal; if there are multiple fourth-type signals, select the fourth-type signal with the smallest interface number from the multiple input signals as the output signal.
[0100] In some implementations, the processing unit 602 is configured to:
[0101] Determining whether the first type of signal satisfies a first condition, where the first condition is that a value of the tenth channel is greater than a first threshold;
[0102] If the first type signal satisfies a first condition, using the first type signal as a control signal;
[0103] determining whether the control signal satisfies a second condition, where the second condition is that the value of the fifth channel is greater than a first threshold;
[0104] If the control signal satisfies a second condition, then, if a second type signal exists in the multiple input signals, using the second type signal as the output signal; and if no second type signal exists in the multiple input signals, using the control signal as the output signal;
[0105] If the control signal does not meet the second condition, determining whether the control signal meets the third condition, the third condition being that the value of the sixth channel is greater than the first threshold;
[0106] If the control signal satisfies a third condition, then, if a third type of signal exists in the multiple input signals, using the third type of signal as the output signal; and if no third type of signal exists in the multiple input signals, using the control signal as the output signal;
[0107] If the control signal does not meet the third condition, determining whether the control signal meets the fourth condition, the fourth condition being that the value of the seventh channel is greater than the first threshold;
[0108] If the control signal satisfies a fourth condition, then, if a fourth type of signal exists in the multiple input signals, using the fourth type of signal as the output signal; and if no fourth type of signal exists in the multiple input signals, using the control signal as the output signal;
[0109] If the control signal does not meet the fourth condition, the control signal is used as the output signal.
[0110] In some embodiments, the processing unit 602 is configured to use the first type signal that satisfies the first condition and has the smallest interface number as a control signal if there are multiple first type signals in the multiple input signals that satisfy the first condition; use the second type signal with the smallest interface number as an output signal if there are multiple second type signals in the multiple input signals; use the third type signal with the smallest interface number as an output signal if there are multiple third type signals in the multiple input signals; and use the fourth type signal with the smallest interface number as an output signal if there are multiple fourth type signals in the multiple input signals.
[0111] In some implementations, the processing unit 602 is configured to:
[0112] If it is determined that the first type of signal does not meet the first condition, the output signal is selected through the following steps:
[0113] Determining whether there is a second type of signal in the multiple input signals;
[0114] If a second type signal exists, selecting the second type signal from the multiple input signals as the output signal;
[0115] If the second type signal does not exist, determining whether the third type signal exists in the multiple input signals;
[0116] If a third type of signal exists, selecting the third type of signal from the multiple input signals as the output signal;
[0117] If the third type of signal does not exist, determining whether a fourth type of signal exists in the multiple input signals;
[0118] If a fourth type signal exists, the fourth type signal is selected from the multiple input signals as the output signal.
[0119] In some embodiments, the processing unit 602 is configured to use a preset neutral point signal as the output signal if the fourth type of signal does not exist.
[0120] In some implementations, the first type of signal is an SBUS signal, the second type of signal is a PWM signal, the third type of signal is a USART signal, and the fourth type of signal is an SPI signal.
[0121] In some embodiments, the output unit 603 is used to output the output signal to the gimbal in the format of three PWM signals to control the gimbal through the three PWM signals, and the three PWM signals include a YAW signal, a ROLL signal, and a PITCH signal.
[0122] In some embodiments, each of the multiple interfaces has N pins, where N is a positive integer; wherein the definition of the N pins of the interface is determined based on a communication protocol of an input signal corresponding to the interface.
[0123] In some embodiments, the value of N is 4;
[0124] When the communication protocol of the input signal corresponding to the interface is SBUS, the four pins of the interface are defined as follows: the first pin is a blank pin, the second pin is a signal pin, the third pin is a blank pin, and the fourth pin is a ground pin;
[0125] When the communication protocol of the input signal corresponding to the interface is SPI, the four pins of the interface are defined as follows: the first pin is the current detection pin, the second pin is the timing pin, the third pin is the data input pin, and the fourth pin is the ground pin;
[0126] When the communication protocol of the input signal corresponding to the interface is USART, the four pins of the interface are defined as follows: the first pin is a sending pin, the second pin is a receiving pin, the third pin is a free pin, and the fourth pin is a ground pin;
[0127] When the communication protocol of the input signal corresponding to the interface is PWM, the four pins of the interface are defined as follows: the first pin is the yaw angle pin, the second pin is the roll angle pin, the third pin is the pitch angle pin, and the fourth pin is the ground pin.
[0128] Those skilled in the art should understand that Figure 6 The functions implemented by each unit in the device for controlling a pan / tilt platform based on multiple signals can be understood by referring to the related description of the method for controlling a pan / tilt platform based on multiple signals. Figure 6 The functions of each unit in the illustrated apparatus may be implemented by a program running on a processor, or may be implemented by a specific logic circuit.
[0129] Figure 7 This is a structural diagram of multiple interfaces of the multi-channel signal integration module provided in the embodiment of the present application, such as Figure 7 As shown, an interface with 4 pins is used in the embodiment of the present application, and the interface defines the pins as different functions according to different input signals.
[0130] It should be noted that the multi-channel input signals described in the embodiments of this application are illustrated using SBUS, PWM, USART, and SPI as examples. Since different input signals use different communication interfaces, in order to achieve interface unification, it is necessary to define the hardware interface. A 4-pin interface is used in this module, and the pins are defined as different functions according to different input signals. The specific situation is shown in Table 1 below:
[0131]
[0132] Table 1
[0133] Figure 8 This is a schematic diagram of the structure of the electronic switch in the multi-channel signal integration module provided in the embodiment of the present application, as shown in FIG. Figure 8 As shown, the electronic switch is controlled by a single chip microcomputer and is used to connect the multiple interfaces with the ports of the single chip microcomputer.
[0134] It should be noted that the reception of SBUS and USART signals can be implemented using the serial port IO of the microcontroller, and the reception of SPI is implemented using the simulation of the IO port. Therefore, these three signals can be connected to the same IO port on the microcontroller at the same time. The PWM signal needs to be read through the timer port, which may be incompatible with the IO port used by the above three signals. Therefore, a signal switching selection switch is required.
[0135] In some embodiments, the electronic switch used is model CH440, which can achieve four-channel switch control. The microcontroller program can be used to interlock the switches to ensure that only one switch is in the closed state.
[0136] Figure 9 A schematic diagram of a flow chart of selecting an output signal for a multi-channel signal integration module according to an embodiment of the present application is shown as follows: Figure 9 As shown, the multi-channel signal integration module selects an output signal from multiple input signals, including the following steps:
[0137] Step 901: The microcontroller starts.
[0138] In some specific embodiments, the multi-channel signal integration module is constructed by a single-chip microcomputer, such as STM32, which has multiple IO ports.
[0139] Step 902: Initialize communication interface 1.
[0140] Step 903: Initialize communication interface n.
[0141] Step 904: Select an input signal as an output signal.
[0142] Step 905: Signal output.
[0143] Initializing the communication interface includes the following steps:
[0144] Step 902-1: Select communication protocols in sequence.
[0145] Step 902-2: Configure the IO port to parse data.
[0146] Step 902-3: Verify the data. If successful, proceed to step 902-4; if failed, proceed to step 902-1.
[0147] Step 902-4: Determine the protocol.
[0148] Figure 10 It is a schematic structural diagram of the chip of an embodiment of the present application. Figure 10 The chip 1000 shown includes a processor 1001, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0149] Alternatively, as Figure 10 As shown, the chip 1000 may further include a memory 1002. The processor 1001 may call and execute a computer program from the memory 1002 to implement the method in the embodiment of the present application.
[0150] The memory 1002 may be a separate device independent of the processor 1001 , or may be integrated into the processor 1001 .
[0151] Optionally, the chip 1000 may further include an input interface 1003. The processor 1001 may control the input interface 1003 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.
[0152] Optionally, the chip 1000 may further include an output interface 1004. The processor 1001 may control the output interface 1004 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.
[0153] This chip can be applied to the multi-channel signal integration module in the embodiment of the present application, and the chip can implement the corresponding processes implemented by the multi-channel signal integration module in each method of the embodiment of the present application. For the sake of brevity, it will not be repeated here.
[0154] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0155] It should be understood that the processor of the embodiments of the present application may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by hardware integrated logic circuits in the processor or software instructions. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented as a hardware decoding processor, or can be implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0156] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0157] It should be understood that the above-mentioned memories are exemplary but not restrictive. For example, the memories in the embodiments of the present application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM RAM (DR RAM), etc. In other words, the memories in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0158] The present invention also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to the multi-channel signal integration module in the present invention. The computer program causes a computer to execute the corresponding processes implemented by the multi-channel signal integration module in the various methods of the present invention. For the sake of brevity, these procedures are not further described here.
[0159] The technical solutions described in the embodiments of this application can be combined arbitrarily unless there is any conflict.
[0160] In the several embodiments provided in this application, it should be understood that the disclosed methods and intelligent devices can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0161] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0162] In addition, all functional units in the embodiments of the present application can be integrated into a second processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0163] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A method for controlling a pan / tilt head based on multi-channel signals, characterized in that: Applied to a multi-channel signal integration module, the multi-channel signal integration module has multiple interfaces, each of the multiple interfaces supports input signals of multiple communication protocols, the method includes: Determining communication protocols corresponding to the multiple interfaces, and configuring the multiple interfaces to operate using the corresponding communication protocols; In the case where the multiple interfaces adopt corresponding communication protocols to operate, multiple input signals are received and identified through the multiple interfaces, and one input signal is selected as the output signal from the identified multiple input signals; the selecting one input signal from the identified multiple input signals as the output signal includes: judging whether there is a first type signal in the multiple input signals; if the first type signal exists, determining a control signal based on the first type signal, and selecting the output signal from the multiple input signals based on the control signal; wherein, judging whether the first type signal satisfies a first condition, the first condition being that the value of the 10th channel is greater than a first threshold; if the first type signal satisfies the first condition, using the first type signal as the control signal; judging whether the control signal satisfies a second condition, the second condition being that the value of the 5th channel is greater than a first threshold; if the control signal satisfies the second condition, then, if a second type signal exists in the multiple input signals, using the second type signal as the output signal, and selecting the output signal from the multiple input signals based on the control signal. if the second type of signal does not exist in the input signal, use the control signal as the output signal; if the control signal does not meet the second condition, determine whether the control signal meets the third condition, the third condition being that the value of the sixth channel is greater than the first threshold; if the control signal meets the third condition, if the third type of signal exists in the multiple input signals, use the third type of signal as the output signal, and if the third type of signal does not exist in the multiple input signals, use the control signal as the output signal; if the control signal does not meet the third condition, determine whether the control signal meets the fourth condition, the fourth condition being that the value of the seventh channel is greater than the first threshold; if the control signal meets the fourth condition, if the fourth type of signal exists in the multiple input signals, use the fourth type of signal as the output signal, and if the fourth type of signal does not exist in the multiple input signals, use the control signal as the output signal; if the control signal does not meet the fourth condition, use the control signal as the output signal; The pan / tilt platform is controlled via the output signal.
2. The method according to claim 1, characterized in that The determining of the communication protocols corresponding to the multiple interfaces includes: For each of the multiple interfaces, determine the communication protocol corresponding to the interface through the following process: Select a communication protocol from a plurality of communication protocols in sequence; configuring the interface based on the selected communication protocol; Identifying a received input signal based on the configured interface; If the identification is successful, determining that the communication protocol corresponding to the interface is the currently configured communication protocol; If the identification fails, the next communication protocol is selected in sequence from the multiple communication protocols, and the steps of configuring the interface based on the selected communication protocol and identifying the received input signal based on the configured interface are performed again.
3. The method according to claim 1, characterized in that The step of selecting one input signal from the identified multiple input signals as an output signal further includes: If the first type of signal does not exist, the output signal is selected by the following steps: Determining whether there is a second type of signal in the multiple input signals; If a second type signal exists, selecting the second type signal from the multiple input signals as the output signal; If the second type signal does not exist, determining whether the third type signal exists in the multiple input signals; If a third type of signal exists, selecting the third type of signal from the multiple input signals as the output signal; If the third type of signal does not exist, determining whether a fourth type of signal exists in the multiple input signals; If a fourth type signal exists, the fourth type signal is selected from the multiple input signals as the output signal.
4. The method according to claim 3, characterized in that If the second type signal exists, selecting the second type signal from the multiple input signals as the output signal includes: if there are multiple second type signals, selecting the second type signal with the smallest interface number from the multiple input signals as the output signal; If a third type signal exists, selecting the third type signal from the multiple input signals as the output signal includes: if multiple third type signals exist, selecting the third type signal with the smallest interface number from the multiple input signals as the output signal; If a fourth type signal exists, selecting the fourth type signal from the multiple input signals as the output signal includes: if there are multiple fourth type signals, selecting the fourth type signal with the smallest interface number from the multiple input signals as the output signal.
5. The method according to claim 3, characterized in that If the first type signal satisfies the first condition, using the first type signal as the control signal includes: if there are multiple first type signals satisfying the first condition in the multiple input signals, using the first type signal satisfying the first condition and having the smallest interface sequence number as the control signal; The step of using the second type signal as the output signal when there is a second type signal in the multiple input signals includes: using the second type signal with the smallest interface number as the output signal when there are multiple second type signals in the multiple input signals; The step of using the third type signal as the output signal when there is a third type signal in the multiple input signals comprises: using the third type signal with the smallest interface number as the output signal when there are multiple third type signals in the multiple input signals; When there is a fourth type signal in the multiple input signals, using the fourth type signal as the output signal includes: when there are multiple fourth type signals in the multiple input signals, using the fourth type signal with the smallest interface number as the output signal.
6. The method according to claim 3, characterized in that The method further comprises: If it is determined that the first type of signal does not meet the first condition, the output signal is selected through the following steps: Determining whether there is a second type of signal in the multiple input signals; If a second type signal exists, selecting the second type signal from the multiple input signals as the output signal; If the second type signal does not exist, determining whether the third type signal exists in the multiple input signals; If the third type of signal exists, selecting the third type of signal from the multiple input signals as the output signal; if the third type of signal does not exist, determining whether the fourth type of signal exists in the multiple input signals; If a fourth type signal exists, the fourth type signal is selected from the multiple input signals as the output signal.
7. The method according to claim 3 or 6, characterized in that The method further comprises: If the fourth type of signal does not exist, the preset neutral point signal is used as the output signal.
8. The method according to any one of claims 3 to 6, characterized in that The first type of signal is a serial communication protocol SBUS signal, the second type of signal is a pulse width modulation protocol PWM signal, the third type of signal is a universal synchronous asynchronous receiver and transmitter protocol USART signal, and the fourth type of signal is a serial peripheral protocol SPI signal.
9. The method according to any one of claims 1 to 6, characterized in that The controlling the pan / tilt platform by the output signal comprises: The output signal is output to the gimbal in the format of three PWM signals to control the gimbal through the three PWM signals, wherein the three PWM signals include a yaw angle YAW signal, a roll angle ROLL signal, and a pitch angle PITCH signal.
10. A device for controlling a pan / tilt platform based on multiple signals, characterized in that: The device has a multi-channel signal integration module, the multi-channel signal integration module has multiple interfaces, each of the multiple interfaces supports input signals of multiple communication protocols; the multi-channel signal integration module also includes a processing unit and an output unit; wherein, The processing unit is configured to determine the communication protocols corresponding to the multiple interfaces and configure the multiple interfaces to operate using the corresponding communication protocols; The multiple interfaces are used to receive and identify multiple input signals when working with corresponding communication protocols; The processing unit is further configured to select one input signal from the identified multiple input signals as an output signal; the processing unit selects one input signal from the identified multiple input signals as an output signal, including: determining whether a first type of signal exists in the multiple input signals; if a first type of signal exists, determining a control signal based on the first type of signal, and selecting an output signal from the multiple input signals based on the control signal; wherein, determining whether the first type of signal satisfies a first condition, the first condition being that the value of the 10th channel is greater than a first threshold; if the first type of signal satisfies the first condition, using the first type of signal as the control signal; determining whether the control signal satisfies a second condition, the second condition being that the value of the 5th channel is greater than a first threshold; if the control signal satisfies the second condition, then if a second type of signal exists in the multiple input signals, using the second type of signal as the output signal, otherwise, if the second type of signal does not exist in the multiple input signals. the control signal is used as the output signal; if the control signal does not satisfy the second condition, determining whether the control signal satisfies a third condition, the third condition being that the value of the sixth channel is greater than a first threshold; if the control signal satisfies the third condition, then if a third type of signal exists in the multiple input signals, the third type of signal is used as the output signal, and if no third type of signal exists in the multiple input signals, the control signal is used as the output signal; if the control signal does not satisfy the third condition, determining whether the control signal satisfies a fourth condition, the fourth condition being that the value of the seventh channel is greater than a first threshold; if the control signal satisfies the fourth condition, then if a fourth type of signal exists in the multiple input signals, the fourth type of signal is used as the output signal, and if no fourth type of signal exists in the multiple input signals, the control signal is used as the output signal; if the control signal does not satisfy the fourth condition, the control signal is used as the output signal; The output unit is used to input the output signal to the pan-tilt head, thereby controlling the pan-tilt head through the output signal.
11. The device according to claim 10, characterized in that Each of the multiple interfaces has N pins, where N is a positive integer; wherein the definition of the N pins of the interface is determined based on the communication protocol of the input signal corresponding to the interface.
12. The device according to claim 11, characterized in that The value of N is 4; When the communication protocol of the input signal corresponding to the interface is SBUS, the four pins of the interface are defined as follows: the first pin is a blank pin, the second pin is a signal pin, the third pin is a blank pin, and the fourth pin is a ground pin; When the communication protocol of the input signal corresponding to the interface is SPI, the four pins of the interface are defined as follows: the first pin is the current detection pin, the second pin is the timing pin, the third pin is the data input pin, and the fourth pin is the ground pin; When the communication protocol of the input signal corresponding to the interface is USART, the four pins of the interface are defined as follows: the first pin is a sending pin, the second pin is a receiving pin, the third pin is a free pin, and the fourth pin is a ground pin; When the communication protocol of the input signal corresponding to the interface is PWM, the four pins of the interface are defined as follows: the first pin is the yaw angle pin, the second pin is the roll angle pin, the third pin is the pitch angle pin, and the fourth pin is the ground pin.
13. A chip, characterized in that: include: A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the method according to any one of claims 1 to 9.
14. A computer-readable storage medium, characterized in that Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Signal processing method and device integrating various protocol communication modes
CN105868142A
Multi-channel and multi-protocol hardware acceleration method for data receiving and storage
CN111858415A