CN112987554A - Dual-signal control method and device, electronic speed regulator and electronic equipment - Google Patents
Dual-signal control method and device, electronic speed regulator and electronic equipment Download PDFInfo
- Publication number
- CN112987554A CN112987554A CN202110157402.2A CN202110157402A CN112987554A CN 112987554 A CN112987554 A CN 112987554A CN 202110157402 A CN202110157402 A CN 202110157402A CN 112987554 A CN112987554 A CN 112987554A
- Authority
- CN
- China
- Prior art keywords
- control signal
- serial communication
- communication interface
- interface
- pulse width
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B9/00—Safety arrangements
- G05B9/02—Safety arrangements electric
- G05B9/03—Safety arrangements electric with multiple-channel loop, i.e. redundant control systems
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Control Of Electric Motors In General (AREA)
Abstract
The application provides a double-signal control method and device, an electronic speed regulator and electronic equipment. The method is applied to an electronic speed regulator, the electronic speed regulator comprises a pulse width modulation interface and a serial communication interface, and the method comprises the following steps: receiving a control signal sent by a controller through the pulse width modulation interface and the serial communication interface; detecting a control signal received by the pulse width modulation interface and a control signal received by the serial communication interface; and when normal control signals exist in the control signals received by the pulse width modulation interface and the control signals received by the serial communication interface, one of the normal control signals is adopted to control the motor connected with the electronic speed regulator. By the mode, the safe and stable operation of the electronic equipment comprising the electronic speed regulator is ensured, and the reliability of the electronic equipment is improved.
Description
Technical Field
The application relates to the technical field of electronic equipment, in particular to a double-signal control method and device, an electronic speed regulator and electronic equipment.
Background
At present, a Pulse Width Modulation (PWM) control interface is widely used on an electronic speed regulator of products such as an unmanned aerial vehicle and an underwater robot, the control interface forms an aeromodelling standard control interface, the universality of PWM control is not possessed by other interfaces, but certain disadvantages exist, for example, PWM Pulse Width signals are easily influenced by interference and hardware factors, and once the PWM Pulse Width signals are influenced, the whole unmanned aerial vehicle or the whole underwater robot cannot normally operate.
Disclosure of Invention
An object of the embodiment of the application is to provide a dual-signal control method and device, an electronic speed regulator and electronic equipment, so as to improve the problem that the existing electronic speed regulator is easily affected by interference and hardware factors only by adopting a PWM control interface, and once a PWM pulse width signal is affected, the whole unmanned aerial vehicle or the whole underwater robot cannot normally operate.
The invention is realized by the following steps:
in a first aspect, an embodiment of the present application provides a dual-signal control method, which is applied to an electronic speed regulator, where the electronic speed regulator includes a pulse width modulation interface and a serial communication interface, and the method includes: receiving a control signal sent by a controller through the pulse width modulation interface and the serial communication interface; detecting a control signal received by the pulse width modulation interface and a control signal received by the serial communication interface; and when normal control signals exist in the control signals received by the pulse width modulation interface and the control signals received by the serial communication interface, one of the normal control signals is adopted to control the motor connected with the electronic speed regulator.
In the embodiment of the application, the electronic speed regulator is provided with two control interfaces, namely the electronic speed regulator comprises a pulse width modulation interface and a serial communication interface. The electronic speed regulator receives the control signal sent by the controller through the pulse width modulation interface and the serial communication interface together, detects the two paths of signals, and controls the motor connected with the electronic speed regulator by adopting one of the normal control signals when detecting that the normal control signal exists. Through the mode, the electronic speed regulator can realize the control of the motor according to the received normal signal in one way in the two interfaces, the situation that the electronic speed regulator with a single interface can not normally work in the whole equipment after the control signal is abnormal is avoided, through the mode, the safe and stable operation of the electronic equipment comprising the electronic speed regulator is ensured, the reliability of the equipment is improved, and the electronic equipment can be suitable for multiple different scenes through the two interfaces.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the detecting the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface includes: judging whether the pulse width modulation interface continuously receives a control signal within a preset time interval, and judging whether the serial communication interface continuously receives the control signal within the preset time interval; when the pulse width modulation interface continuously receives the control signal within the preset time interval, the control signal received by the pulse width modulation interface is normal; and when the serial communication interface continuously receives the control signal within the preset time interval, the control signal received by the serial communication interface is normal.
In the embodiment of the application, whether two paths of signals are abnormal or not can be effectively judged by judging whether two paths of control signals are continuously received within a preset time interval or not, so that when one path of signals is interrupted, the other path of signals can be adopted for control in time, and the reliable operation of the electronic equipment comprising the electronic speed regulator is improved.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the detecting the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface includes: determining a first rotating speed required to be adjusted based on a control signal received by the pulse width modulation interface; determining a second rotating speed required to be adjusted based on a control signal received by the serial communication interface; when the difference value between the first rotating speed and the second rotating speed is larger than a preset error threshold value, the control signal representing the pulse width modulation interface is abnormal; and when the difference value between the first rotating speed and the second rotating speed is smaller than a preset error threshold value, the control signal representing the pulse width modulation interface and the control signal received by the serial communication interface are normal.
Since the control signal received by the pwm interface is susceptible to external interference or interference from internal driving to cause signal jump or waveform distortion, the control signal of the serial communication interface is directly a digital signal, and no settlement error exists, therefore, in the embodiment of the application, the control signal received by the pulse width modulation interface is judged whether to be abnormal or not through the difference value between the rotating speeds converted by the control signals transmitted by the two control interfaces, the state detection can be effectively carried out on the control signal received by the pulse width modulation interface, thereby ensuring that when the control signal received by the pulse width modulation interface generates jump or waveform distortion, the control signal received by the serial communication interface can be used for executing control in time, and the reliable operation of the electronic equipment comprising the electronic speed regulator is improved by the mode.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the detecting a control signal received by the serial communication interface includes: judging whether the continuous frame loss time of the data packet in the control signal received by the serial communication interface exceeds a preset threshold value or not; and when the continuous frame loss time of the data packet in the control signal sent by the serial communication interface does not exceed a preset threshold value, the control signal received by the serial communication interface is represented to be normal.
Because the control signal received by the serial communication interface is easy to be subjected to electromagnetic interference to cause the frame loss of the signal, and the stability of the control signal received by the pulse width modulation interface is better under the environment, in the embodiment of the application, when the continuous frame loss time of a data packet in the control signal received by the serial communication interface is detected to exceed the preset threshold value, the control signal received by the pulse width modulation interface can be used for executing control in time, and by the mode, the reliable operation of the electronic equipment comprising the electronic speed regulator is improved.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, when both the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface are normal control signals, the controlling a motor connected to the electronic speed regulator by using one of the normal control signals includes: and controlling a motor connected with the electronic speed regulator by adopting the control signal received by the serial communication interface.
Because the serial communication interface has better control precision and stronger anti-interference capability and can realize bidirectional data communication, when two paths of control signals are normal, the control signals received by the serial communication interface are adopted to control the motor connected with the electronic speed regulator, and the electronic equipment with the electronic speed regulator can be ensured to have better stability by the mode.
With reference to the technical solution provided by the first aspect, in some possible implementations, the controlling a motor connected to the electronic speed regulator by using one of normal control signals includes: and controlling a motor connected with the electronic speed regulator by adopting a control signal of an interface corresponding to the switching signal sent by the controller.
In the embodiment of the application, when one of the normal control signals is used for controlling the motor connected with the electronic speed regulator, the control signals can be switched according to the switching signal sent by the controller, so that the electronic equipment comprising the electronic speed regulator can realize different controls according to different scenes.
In a second aspect, an embodiment of the present application provides a dual-signal control device applied to an electronic speed regulator, where the electronic speed regulator includes a pulse width modulation interface and a serial communication interface, and the device includes: the receiving module is used for receiving the control signal sent by the controller through the pulse width modulation interface and the serial communication interface; the detection module is used for detecting the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface; and the control module is used for controlling the motor connected with the electronic speed regulator by adopting one of the normal control signals when the normal control signal exists in the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface.
In a third aspect, an embodiment of the present application provides an electronic governor, including: a processor and a memory, the processor and the memory connected; the memory is used for storing programs; the processor is configured to execute the program stored in the memory to perform the method as provided in the above-described first aspect embodiment and/or in combination with some possible implementations of the above-described first aspect embodiment.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a controller, an electronic governor, and a motor; the electronic speed regulator comprises a pulse width modulation interface and a serial communication interface, the electronic speed regulator is connected with the controller through the pulse width modulation interface and the serial communication interface, and the electronic speed regulator is connected with the motor; the electronic governor is adapted to perform the method as described above in the first aspect embodiment and/or as provided in connection with some possible implementations of the first aspect embodiment described above.
In a fifth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program, which, when executed by a processor, performs a method as provided in the embodiments of the first aspect described above and/or in connection with some possible implementations of the embodiments of the first aspect described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an electronic governor according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating steps of a dual-signal control method according to an embodiment of the present disclosure.
Fig. 4 is a block diagram of a dual-signal control device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
In view of the problem that the existing electronic governor is easily affected by interference and hardware factors only by adopting a PWM control interface, and once a PWM pulse width signal is affected, the whole unmanned aerial vehicle or the whole underwater robot cannot normally operate, the inventor of the present application has conducted research and exploration, and proposes the following embodiments to solve the above problems.
Referring to fig. 1, an embodiment of the present application provides an electronic device 10, including: a controller 11, an Electronic Speed Controller (ESC) 12, and a motor 13. The electronic governor 12 includes a Pulse Width Modulation (PWM) interface and a serial communication interface, the electronic governor 12 is connected to the controller 11 through the PWM interface and the serial communication interface, and the electronic governor 12 is connected to the motor 13.
The electronic governor 12 mainly adjusts the rotation speed of the motor 13 connected thereto based on the control signal. In circuit connection, the input line of the electronic governor 12 is connected with the power supply in the electronic device 10, the output line of the electronic governor 12 is connected with the motor 13, and the electronic governor 12 is divided into a brush-type electric regulation and a brushless electric regulation according to the difference of the motor 13. The control line of the electronic governor 12 is connected to the controller 11, and in the embodiment of the present application, the electronic governor 12 includes two control interfaces (a pulse width modulation interface and a serial communication interface), and correspondingly, the controller 11 also includes two control interfaces (a pulse width modulation interface and a serial communication interface). The two control interfaces on the electronic speed regulator 12 are respectively and correspondingly electrically connected with the two control interfaces on the controller 11 through control lines.
The serial communication interface may be, but is not limited to, RS232 (a kind of communication interface), RS485 (a kind of communication interface), CAN (Controller Area Network) bus interface.
The controller 11 may be an integrated circuit chip having signal processing capability. The controller 11 may also be a general-purpose Processor, for example, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which can implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The electronic device 10 may be, but is not limited to, an unmanned aerial vehicle, an unmanned ship, an underwater robot, some industrial mechanical devices including a motor drive, and the like, and the present application is not limited thereto.
Referring to fig. 2, an exemplary block diagram of an electronic governor 12 using a dual signal control method and apparatus is provided in the present application. Structurally, the electronic governor 12 can include a processor 120 and a memory 121.
The processor 120 and the memory 121 are electrically connected directly or indirectly to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The dual signal control means comprises at least one software module which may be stored in the form of software or Firmware (Firmware) in the memory 121 or solidified in the Operating System (OS) of the electronic governor 12. The processor 120 is used for executing executable modules stored in the memory 121, such as software functional modules and computer programs included in the dual-signal control device, so as to implement the dual-signal control method. The processor 120 may execute the computer program upon receiving the execution instruction.
Similarly, the processor 120 may be an integrated circuit chip having signal processing capabilities. The Processor 120 may also be a general-purpose Processor, such as a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 121 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), and an electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 121 is used for storing a program, and the processor 120 executes the program after receiving the execution instruction.
It should be understood that the configuration shown in fig. 2 is merely illustrative, and the electronic governor 12 provided in the embodiment of the present application may have fewer or more components than those shown in fig. 2, or may have a different configuration than that shown in fig. 2. Further, the components shown in fig. 2 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 3, fig. 3 is a flowchart illustrating steps of a dual-signal control method according to an embodiment of the present application, which is applied to the electronic governor 12 shown in fig. 2. It should be noted that the dual-signal control method provided in the embodiment of the present application is not limited to the order shown in fig. 2 and below. The method comprises the following steps: step S101-step S103.
Step S101: and receiving the control signal sent by the controller through the pulse width modulation interface and the serial communication interface.
Step S102: and detecting the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface.
Step S103: and when normal control signals exist in the control signals received by the pulse width modulation interface and the control signals received by the serial communication interface, one of the normal control signals is adopted to control the motor connected with the electronic speed regulator.
In summary, in the embodiment of the present application, the electronic speed regulator is provided with two control interfaces, that is, the electronic speed regulator includes a pulse width modulation interface and a serial communication interface. The electronic speed regulator receives the control signal sent by the controller through the pulse width modulation interface and the serial communication interface together, detects the two paths of signals, and controls the motor connected with the electronic speed regulator by adopting one of the normal control signals when detecting that the normal control signal exists. Through the mode, the electronic speed regulator can realize the control of the motor according to the received normal signal in one way in the two interfaces, the situation that the electronic speed regulator with a single interface can not normally work in the whole equipment after the control signal is abnormal is avoided, through the mode, the safe and stable operation of the electronic equipment comprising the electronic speed regulator is ensured, the reliability of the equipment is improved, and the electronic equipment can be suitable for multiple different scenes through the two interfaces.
The above steps are described below with reference to specific examples.
Step S101: and receiving the control signal sent by the controller through the pulse width modulation interface and the serial communication interface.
It should be noted that, the electronic speed governor provided in the embodiment of the present application has a pulse width modulation interface and a serial communication interface, and in order to achieve that both two interfaces can receive the control signal, correspondingly, the controller also needs to include a pulse width modulation interface and a serial communication interface, and two control interfaces on the electronic speed governor and two control interfaces on the controller are respectively and correspondingly electrically connected through a control line, so that the electronic speed governor can receive two control signals sent by the controller through the pulse width modulation interface and the serial communication interface in the operation process.
Step S102: and detecting the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface.
In the embodiment of the application, although the electronic speed regulator receives two paths of control signals, when the motor is actually controlled, only one path of normal control signal is adopted for control. Therefore, after receiving the two control signals, the two control signals need to be detected in real time.
As a first optional detection method, the detection method includes: and judging whether the pulse width modulation interface continuously receives the control signal within a preset time interval, and judging whether the serial communication interface continuously receives the control signal within the preset time interval. When the pulse width modulation interface continuously receives the control signal within a preset time interval, the control signal received by the pulse width modulation interface is normal; when the serial communication interface continuously receives the control signal within the preset time interval, the control signal received by the serial communication interface is normal.
The first detection method is interrupt detection, and the preset time interval may be 1 second, 2 seconds, 3 seconds, or the like, but the present application is not limited thereto. Taking the preset time interval as 1 second as an example, when the pulse width modulation interface of the electronic speed regulator does not receive the control signal for more than 1 second, the control signal received by the pulse width modulation interface is represented to be abnormal, otherwise, the control signal is represented to be normal; correspondingly, when the serial communication interface of the electronic speed regulator does not receive the control signal for more than 1 second, the control signal received by the serial communication interface is represented to be abnormal, otherwise, the control signal is represented to be normal.
Because the pulse control can only be controlled in a single direction, the serial communication interface can realize two-way data communication. Therefore, in the embodiment of the application, no matter which interface control signal is adopted by the electronic speed regulator to control the motor, the feedback data are all fed back to the controller through the serial communication interface. Therefore, when the first detection mode is adopted, the controller can also determine whether the signal is interrupted according to the feedback data, for example, once the control signal of the pulse width modulation interface is disconnected, the electronic speed regulator feeds back a fault code through the serial communication interface, and if the controller does not receive the feedback data of the electronic speed regulator, the serial communication interface is characterized to be interrupted.
As a second optional detection method, the detection method includes: determining a first rotating speed required to be adjusted based on a control signal received by a pulse width modulation interface; determining a second rotating speed required to be adjusted based on a control signal received by the serial communication interface; when the difference value between the first rotating speed and the second rotating speed is larger than a preset error threshold value, the control signal representing the pulse width modulation interface is abnormal; and when the difference value between the first rotating speed and the second rotating speed is smaller than the preset error threshold value, the control signal representing the pulse width modulation interface and the control signal received by the serial communication interface are normal.
The control signal received by the pulse width modulation interface is converted into a first rotating speed required to be adjusted by the electronic speed regulator in a pulse width mapping mode, and the control signal received by the serial communication interface is directly a rotating speed instruction so as to directly obtain a second rotating speed. The preset error threshold may be 20% or 30%, and the application is not limited thereto. Taking the preset error threshold as 20%, when the difference between the first rotation speed and the second rotation speed divided by the first rotation speed is greater than 20%, the control signal representing the pwm interface is abnormal, and when the difference between the first rotation speed and the second rotation speed divided by the first rotation speed is less than 20%, the control signal representing the pwm interface and the control signal received by the serial communication interface are both normal. The above calculation process is also only an example, and accordingly, the difference between the first rotation speed and the second rotation speed may be divided by the second rotation speed, which is not limited in the present application.
It should be noted that, the control signal received by the pulse width modulation interface is easily interfered by external or internal driving to cause signal jump or waveform distortion, and the control signal of the serial communication interface is directly a digital signal, and there is no settlement error, so in the embodiment of the present application, whether the control signal received by the pulse width modulation interface is abnormal or not is determined by the difference between the rotation speeds converted from the control signals transmitted by the two control interfaces, and the state detection of the control signal received by the pulse width modulation interface can be effectively performed.
As a third optional detection method, the detection method includes: judging whether the continuous frame loss time of a data packet in a control signal received by a serial communication interface exceeds a preset threshold value or not; and when the continuous frame loss time of the data packet in the control signal sent by the serial communication interface does not exceed the preset threshold value, the control signal received by the serial communication interface is represented to be normal.
The preset threshold may be 1 second, 2 seconds, 3 seconds, and the application is not limited thereto. Taking the preset threshold value of 2 seconds as an example, when the continuous frame loss time of a data packet in a control signal of a serial communication interface of the electronic speed regulator exceeds 2 seconds, the control signal received by the serial communication interface is represented to be abnormal, otherwise, the control signal is represented to be normal.
It should be noted that, because the control signal received by the serial communication interface is susceptible to strong electromagnetic interference, which results in a frame loss of the signal, and the control signal received by the pulse width modulation interface has better stability in this environment, in the embodiment of the present application, the above detection method is adopted, so that the state detection of the control signal received by the serial communication interface can be effectively performed.
It should be understood that the above three detection methods can be used in the electronic governor at the same time, and of course, any one or two detection methods may be used in the configuration, and the present application is not limited thereto.
Step S103: and when normal control signals exist in the control signals received by the pulse width modulation interface and the control signals received by the serial communication interface, one of the normal control signals is adopted to control the motor connected with the electronic speed regulator.
And finally, controlling the motor based on the control signal received by the pulse width modulation interface and a normal control signal in the control signal received by the serial communication interface.
The above-described modes include various control cases.
In the first case, when both the control signal received by the pwm interface and the control signal received by the serial communication interface are normal control signals, any one of the control signals may be used to control the motor.
Because the serial communication interface has better control accuracy, and the interference killing feature is stronger, and can realize two-way data communication, consequently, when two way control signal were normal, in this application embodiment, adopt the control signal that serial communication interface received to control the motor of being connected with electronic governor, through this mode, can guarantee that the equipment stability that contains this electronic governor is better. Of course, in other embodiments, when both the two control signals are normal, the control signal received by the pulse width modulation interface may be used to control the motor connected to the electronic speed regulator.
Optionally, in the first case, when both the two control signals are normal, the electronic governor may also randomly select one control signal to control the motor.
In the second case, when the control signal received by the pulse width modulation interface is abnormal and the control signal received by the serial communication interface is a normal control signal, the control signal received by the serial communication interface is used for controlling the motor.
This situation corresponds to the first detection mode and the second detection mode, for example, the first detection mode may be adopted to detect whether the pwm interface and the serial communication interface continuously receive the control signal, and if the pwm interface continuously does not receive the control signal within the preset time interval, and if the serial communication interface continuously receives the control signal within the preset time interval, the control signal received by the serial communication interface is adopted to control the motor. By the detection mode, when the signal of the pulse width modulation interface is interrupted, the control signal received by the serial communication interface can be adopted for control in time, and the reliable operation of the electronic equipment comprising the electronic speed regulator is improved.
For example, the second detection method is adopted to compare the rotation speeds of the adjustment motors corresponding to the two paths of signals. And when the difference value between the determined first rotating speed required to be adjusted and the determined second rotating speed required to be adjusted is larger than a preset error threshold value based on the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface, the motor is controlled by the control signal received by the serial communication interface. By the mode, when the control signal received by the pulse width modulation interface jumps or the waveform distorts, the control can be executed by the control signal received by the serial communication interface in time, and the reliable operation of the electronic equipment comprising the electronic speed regulator is improved.
In the third situation, when the control signal received by the serial communication interface is abnormal and the control signal received by the pulse width modulation interface is a normal control signal, the control signal received by the pulse width modulation interface is adopted to control the motor.
This situation corresponds to the first detection mode and the third detection mode, for example, the aforementioned first detection mode may be adopted to detect whether the pwm interface and the serial communication interface continuously receive the control signal, and when the serial communication interface continuously receives no control signal within a preset time interval, and the pwm interface continuously receives the control signal within the preset time interval, the control signal received by the pwm interface is adopted to control the motor. By the detection mode, when the signal of the serial communication interface is interrupted, the control signal received by the pulse width modulation interface can be timely adopted for control, and the reliable operation of the electronic equipment comprising the electronic speed regulator is improved.
For example, the third detection method is adopted to detect whether the duration of the data packet frame loss in the control signal received by the serial communication interface exceeds a preset threshold. And when the continuous frame loss time of the data packet in the control signal sent by the serial communication interface exceeds a preset threshold value, the control signal received by the pulse width modulation interface is adopted to control the motor. By the mode, when packet loss occurs in the serial communication interface and control is influenced, control is timely executed through the control signal received by the pulse width modulation interface, and reliable operation of electronic equipment comprising the electronic speed regulator is improved.
The above is the control situation of the electronic speed regulator under different conditions, and it should be noted that when no normal control signal exists in the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface, the electronic device cannot operate normally.
Optionally, in this embodiment of the present application, the controlling the motor connected to the electronic governor with one of the normal control signals further includes: and controlling the motor connected with the electronic speed regulator by adopting a control signal of the interface corresponding to the switching signal sent by the controller.
That is, the embodiment of the present application further provides a dynamic switching manner of the control signal. The electronic speed regulator can switch the control signal of the corresponding interface in real time according to the switching signal sent by the controller to control the motor.
As an illustration of an application scenario, the electronic device further includes a communication module, and the communication module is electrically connected to the controller of the electronic device. The communication module is in communication connection with the user terminal, and the communication module can be used for receiving a switching instruction sent by the user terminal and then sending the switching instruction to the controller, so that the electronic regulator is controlled to send a switching signal to the electronic speed regulator, and the electronic regulator is switched to the current control mode. In this way, the user can realize different controls according to the application scene of the electronic equipment. For example, the electronic device is a robot, and when the robot executes an underwater task, a frame loss situation occurs in data in a control signal sent by the serial communication interface due to an underwater environment, so that a user can actively switch the electronic speed regulator of the robot to be controlled by the pulse control interface.
In the following, the underwater robot is taken as a specific example to fully describe the above process, an electronic speed regulator in the underwater robot receives a control signal sent by a controller through a pulse width modulation interface and a serial communication interface, initially, the control signal received by the serial communication interface is used by default to control a motor connected with the electronic speed regulator, and in the process of executing a task, the underwater robot continuously detects the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface by using the three detection methods. When the underwater robot is in a strong electromagnetic interference environment, and the continuous frame loss time of data packets in the control signals received by the serial communication interface exceeds a preset threshold value, the control is executed in time through the control signals received by the pulse width modulation interface. When the pulse width modulation of the underwater robot fluctuates due to the influence of the environment, the control is executed in time through the control signal received by the serial communication interface.
Referring to fig. 4, based on the same inventive concept, an embodiment of the present application further provides a dual-signal control apparatus 200, including: a receiving module 201, a detecting module 202 and a control module 203.
A receiving module 201, configured to receive the control signal sent by the controller through the pwm interface and the serial communication interface.
The detecting module 202 is configured to detect the control signal received by the pwm interface and the control signal received by the serial communication interface.
And the control module 203 is used for controlling the motor connected with the electronic speed regulator by adopting one of the normal control signals when the normal control signal exists in the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface.
Optionally, the detecting module 202 is specifically configured to determine whether the pulse width modulation interface continuously receives the control signal within a preset time interval, and determine whether the serial communication interface continuously receives the control signal within the preset time interval; when the pulse width modulation interface continuously receives the control signal within the preset time interval, the control signal received by the pulse width modulation interface is normal; and when the serial communication interface continuously receives the control signal within the preset time interval, the control signal received by the serial communication interface is normal.
Optionally, the detecting module 202 is specifically configured to determine, based on a control signal received by the pulse width modulation interface, a first rotation speed required to be adjusted; determining a second rotating speed required to be adjusted based on a control signal received by the serial communication interface; when the difference value between the first rotating speed and the second rotating speed is larger than a preset error threshold value, the control signal representing the pulse width modulation interface is abnormal; and when the difference value between the first rotating speed and the second rotating speed is smaller than a preset error threshold value, the control signal representing the pulse width modulation interface and the control signal received by the serial communication interface are normal.
Optionally, the detecting module 202 is specifically configured to determine whether a duration of a frame loss of a data packet in the control signal received by the serial communication interface exceeds a preset threshold; and when the continuous frame loss time of the data packet in the control signal sent by the serial communication interface does not exceed a preset threshold value, the control signal received by the serial communication interface is represented to be normal.
Optionally, the control module 203 is specifically configured to control the motor connected to the electronic speed regulator by using the control signal received by the serial communication interface when both the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface are normal control signals.
Optionally, the control module 203 is specifically configured to control the motor connected to the electronic speed governor by using a control signal of an interface corresponding to the switching signal sent by the controller.
It should be noted that, as those skilled in the art can clearly understand, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Based on the same inventive concept, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed, the computer program performs the method provided in the foregoing embodiments.
The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A dual signal control method applied to an electronic governor, wherein the electronic governor comprises a pulse width modulation interface and a serial communication interface, the method comprising:
receiving a control signal sent by a controller through the pulse width modulation interface and the serial communication interface;
detecting a control signal received by the pulse width modulation interface and a control signal received by the serial communication interface;
and when normal control signals exist in the control signals received by the pulse width modulation interface and the control signals received by the serial communication interface, one of the normal control signals is adopted to control the motor connected with the electronic speed regulator.
2. The dual-signal control method according to claim 1, wherein the detecting the control signal received by the pwm interface and the control signal received by the serial communication interface comprises:
judging whether the pulse width modulation interface continuously receives a control signal within a preset time interval, and judging whether the serial communication interface continuously receives the control signal within the preset time interval;
when the pulse width modulation interface continuously receives the control signal within the preset time interval, the control signal received by the pulse width modulation interface is normal; and when the serial communication interface continuously receives the control signal within the preset time interval, the control signal received by the serial communication interface is normal.
3. The dual-signal control method according to claim 1, wherein the detecting the control signal received by the pwm interface and the control signal received by the serial communication interface comprises:
determining a first rotating speed required to be adjusted based on a control signal received by the pulse width modulation interface;
determining a second rotating speed required to be adjusted based on a control signal received by the serial communication interface;
when the difference value between the first rotating speed and the second rotating speed is larger than a preset error threshold value, the control signal representing the pulse width modulation interface is abnormal; and when the difference value between the first rotating speed and the second rotating speed is smaller than a preset error threshold value, the control signal representing the pulse width modulation interface and the control signal received by the serial communication interface are normal.
4. The dual-signal control method according to claim 1, wherein the detecting the control signal received by the serial communication interface comprises:
judging whether the continuous frame loss time of the data packet in the control signal received by the serial communication interface exceeds a preset threshold value or not;
and when the continuous frame loss time of the data packet in the control signal sent by the serial communication interface does not exceed a preset threshold value, the control signal received by the serial communication interface is represented to be normal.
5. The dual-signal control method according to claim 1, wherein when the control signal received by the pwm interface and the control signal received by the serial communication interface are both normal control signals, the controlling the motor connected to the electronic governor with one of the normal control signals comprises:
and controlling a motor connected with the electronic speed regulator by adopting the control signal received by the serial communication interface.
6. The dual signal control method of claim 1, wherein said controlling the motor connected to the electronic governor with one of the normal control signals comprises:
and controlling a motor connected with the electronic speed regulator by adopting a control signal of an interface corresponding to the switching signal sent by the controller.
7. A dual signal control device for use with an electronic governor having a pulse width modulation interface and a serial communication interface, the device comprising:
the receiving module is used for receiving the control signal sent by the controller through the pulse width modulation interface and the serial communication interface;
the detection module is used for detecting the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface;
and the control module is used for controlling the motor connected with the electronic speed regulator by adopting one of the normal control signals when the normal control signal exists in the control signal received by the pulse width modulation interface and the control signal received by the serial communication interface.
8. An electronic governor, comprising: a processor and a memory, the processor and the memory connected;
the memory is used for storing programs;
the processor is configured to execute a program stored in the memory to perform the method of any of claims 1-6.
9. An electronic device, comprising a controller, an electronic governor, and a motor; the electronic speed regulator comprises a pulse width modulation interface and a serial communication interface, the electronic speed regulator is connected with the controller through the pulse width modulation interface and the serial communication interface, and the electronic speed regulator is connected with the motor;
the electronic governor is used to perform the method of any of claims 1-6.
10. A storage medium, having stored thereon a computer program which, when executed by a computer, performs the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110157402.2A CN112987554B (en) | 2021-02-04 | 2021-02-04 | Dual-signal control method and device, electronic speed regulator and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110157402.2A CN112987554B (en) | 2021-02-04 | 2021-02-04 | Dual-signal control method and device, electronic speed regulator and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112987554A true CN112987554A (en) | 2021-06-18 |
CN112987554B CN112987554B (en) | 2022-11-11 |
Family
ID=76347249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110157402.2A Active CN112987554B (en) | 2021-02-04 | 2021-02-04 | Dual-signal control method and device, electronic speed regulator and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112987554B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114115428A (en) * | 2021-12-13 | 2022-03-01 | 东莞市奥奇普科技有限公司 | Method, device and equipment for adjusting electric tuning parameters and electric tuning parameters |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909942A (en) * | 2007-12-26 | 2010-12-08 | 本田技研工业株式会社 | Redundant communication system |
CN202168025U (en) * | 2011-06-17 | 2012-03-14 | 时臻 | Electron speed regulator of double-station multi-mode direct current brushless motor |
CN103365214A (en) * | 2013-06-29 | 2013-10-23 | 天津大学 | Single rotor wing unmanned aerial vehicle three-freedom degree semi-physical simulation platform and experimental method |
CN103853156A (en) * | 2014-02-07 | 2014-06-11 | 中山大学 | Small four-rotor aircraft control system and method based on airborne sensor |
CN112083712A (en) * | 2016-02-29 | 2020-12-15 | 深圳市大疆创新科技有限公司 | Throttle control signal processing method, electronic speed regulator, controller and mobile platform |
-
2021
- 2021-02-04 CN CN202110157402.2A patent/CN112987554B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101909942A (en) * | 2007-12-26 | 2010-12-08 | 本田技研工业株式会社 | Redundant communication system |
CN202168025U (en) * | 2011-06-17 | 2012-03-14 | 时臻 | Electron speed regulator of double-station multi-mode direct current brushless motor |
CN103365214A (en) * | 2013-06-29 | 2013-10-23 | 天津大学 | Single rotor wing unmanned aerial vehicle three-freedom degree semi-physical simulation platform and experimental method |
CN103853156A (en) * | 2014-02-07 | 2014-06-11 | 中山大学 | Small four-rotor aircraft control system and method based on airborne sensor |
CN112083712A (en) * | 2016-02-29 | 2020-12-15 | 深圳市大疆创新科技有限公司 | Throttle control signal processing method, electronic speed regulator, controller and mobile platform |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114115428A (en) * | 2021-12-13 | 2022-03-01 | 东莞市奥奇普科技有限公司 | Method, device and equipment for adjusting electric tuning parameters and electric tuning parameters |
Also Published As
Publication number | Publication date |
---|---|
CN112987554B (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4049910B1 (en) | Automatic driving control system, control method and device | |
US11891040B2 (en) | Vehicle electric braking device and method of controlling the same | |
US11643095B2 (en) | Electronic control device, control system, and reset determination method | |
CN110745144B (en) | Automatic driving control system, control method and equipment | |
CN110100210B (en) | Control device and motor control system | |
US6237112B1 (en) | SCSI device available for breakdown prediction and self-examination and a method thereof | |
US11084524B2 (en) | Motor control device | |
US6351823B1 (en) | Method and device for monitoring a computer system having at least two processors | |
US10048654B2 (en) | Torque control apparatus | |
CN109687782B (en) | Control device and control system of stepping motor | |
CN112987554B (en) | Dual-signal control method and device, electronic speed regulator and electronic equipment | |
EP4129143A1 (en) | Cleaning robot control method and device, storage medium and cleaning robot | |
CN111897670A (en) | Hardware reset circuit, method, Internet of things equipment and storage medium | |
JP2020108307A (en) | Electric conduction control method and power control system | |
JP2000298782A (en) | Plant monitoring device | |
JP4980947B2 (en) | Control system and control method | |
CN110912488B (en) | Motor control method and system | |
KR102592204B1 (en) | A vehicle and method for controlling communication thereof | |
CN114094899A (en) | Motor control method, device and system | |
JPWO2014188764A1 (en) | Functional safety control device | |
CN117985100A (en) | Device and method for controlling redundant steering system | |
US9787532B2 (en) | Module, system and method of switching modules | |
JP7545597B1 (en) | Vehicle Control Systems | |
JP2020048387A (en) | Motor control device | |
CN112162895B (en) | Abnormal state detection method, device, system, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |