Disclosure of Invention
Based on this, the application provides a method, device, singlechip and unmanned aerial vehicle of singlechip output complementary PWM ripples is used for solving above-mentioned singlechip output complementary PWM ripples passageway number and receives the problem of senior timer number restriction.
On one hand, the application provides a method for outputting complementary PWM waves by a singlechip, wherein the method comprises the following steps:
selecting a general timer and an even number of GPIO interfaces connected with the general timer;
configuring working parameters of the general timer and the GPIO interface;
enabling a clock of the general timer and a clock of the GPIO interface;
and starting the general timer to work according to the configured working parameters, so that every two interfaces in the even number of GPIO interfaces output complementary PWM waves.
According to the method for outputting the complementary PWM waves by the single chip microcomputer, the complementary PWM waves can be output by the single chip microcomputer through the universal timer by configuring the working parameters of the universal timer and the GPIO interface. Therefore, in order to output multiple sets of complementary PWM waves, the complementary PWM waves can be realized by configuring more universal timers to drive more circuit elements, so that the number of channels of the complementary PWM waves output by the single chip microcomputer is not limited by the number of high-level timers.
In one embodiment, selecting an even number of GPIO interfaces for the general purpose timer comprises:
and selecting GPIO interfaces with twice number of channels according to the number of channels of the complementary PWM waves to be output.
In one embodiment, configuring the operating parameters of the general-purpose timer and the GPIO interface includes:
configuring a clock frequency at which the universal timer operates;
configuring the counting mode of the universal timer to be an up-down counting mode;
configuring the output mode of the universal timer to be a PWM mode;
configuring the operating mode of the GPIO interface to be push-pull multiplexing;
configuring the output polarity of the GPIO interfaces to make two paths of PWM waves output by the GPIO interfaces in one group, wherein each group of PWM waves are complementary; and
the reload value of each PWM wave is set according to the configured clock frequency.
In one embodiment, the configuring the clock frequency at which the universal timer operates includes: the presorting value and the clock division value of the general timer are configured.
In one embodiment, the configuring the output polarity of the GPIO interfaces so that two sets of the GPIO interfaces output two PWM waves complementarily includes:
configuring the polarity of a first GPIO interface in each group of GPIO interfaces to be high so as to output an upper bridge PWM wave;
and configuring the polarity of a second GPIO interface in each group of GPIO interfaces to be low so as to output a lower bridge PWM wave, wherein the level of the upper bridge PWM wave is opposite to that of the lower bridge PWM wave.
In one embodiment, the step of setting the reload value of each PWM wave according to the configured clock frequency comprises:
and according to the working clock frequency of the universal timer, setting the reloading value of the upper bridge PWM wave and the reloading value of the lower bridge PWM wave, enabling the reloading values of the upper bridge PWM wave and the lower bridge PWM wave to be different by a preset value, and enabling the starting time interval of the upper bridge PWM wave and the lower bridge PWM wave to be preset in duration.
On the other hand, this application still provides a singlechip output complementary PWM ripples method, the method is applied to unmanned aerial vehicle, wherein, the method includes:
outputting complementary PWM waves by the method;
and selecting the three paths of complementary PWM waves to be used for driving a motor of the unmanned aerial vehicle.
In one embodiment, the single chip microcomputer is an STM32 single chip microcomputer.
In one embodiment, the motor comprises any one of the following functions:
a drive motor of the propeller;
the driving motor of cloud platform.
On the other hand, this application still provides complementary PWM ripples output device of singlechip, wherein, the device includes:
the selection module is used for selecting the general timer and an even number of GPIO interfaces connected with the general timer;
the working parameter configuration module is used for configuring the working parameters of the general timer and the GPIO interface;
the clock enabling module is used for enabling a clock of the general timer and a clock of the GPIO interface;
and the starting module is used for starting the general timer to work according to the configured working parameters, so that every two interfaces of the even number of GPIO interfaces output complementary PWM waves.
The device for outputting the complementary PWM waves by the single chip microcomputer enables the single chip microcomputer to output the complementary PWM waves by configuring the working parameters of the general timer and the GPIO interface. Therefore, in order to output multiple sets of complementary PWM waves, the complementary PWM waves can be realized by configuring more universal timers to drive more circuit elements, so that the number of channels of the complementary PWM waves output by the single chip microcomputer is not limited by the number of high-level timers.
In one embodiment, the selection module is further configured to select, according to the number of channels of the complementary PWM wave that needs to be output, GPIO interfaces twice as many as the number of the channels.
As one embodiment, the operating parameter configuration module includes:
the clock frequency configuration module is used for configuring the clock frequency of the work of the universal timer;
a counting mode configuration module, configured to configure the counting mode of the general timer to be an up-down counting mode;
the output mode configuration module is used for configuring the output mode of the universal timer to be a PWM mode;
the working mode configuration module is used for configuring the working mode of the GPIO interface to be push-pull multiplexing;
the output polarity configuration module is used for configuring the output polarity of the GPIO interfaces to make two paths of PWM waves output by the GPIO interfaces in one group and the GPIO interfaces in each group complement each other; and
and the reloading value setting module is used for setting the reloading value of each PWM wave according to the set clock frequency.
As one embodiment, the clock frequency configuration module includes:
the pre-frequency division value configuration module is used for configuring the pre-frequency division value of the universal timer;
and the clock division value configuration module is used for configuring the clock division value of the universal timer.
As one embodiment, the output polarity configuration module includes:
the first interface configuration module is used for configuring the polarity of a first GPIO interface in each group of GPIO interfaces to be high so as to output an upper bridge PWM wave;
and the second interface configuration module is used for configuring the polarity of the second GPIO interface in each group of GPIO interfaces to be low so as to output a lower bridge PWM wave, and the level of the upper bridge PWM wave is opposite to that of the lower bridge PWM wave.
As one embodiment, the reload value setting module is further configured to:
and according to the working clock frequency of the universal timer, setting the reloading value of the upper bridge PWM wave and the reloading value of the lower bridge PWM wave, enabling the reloading values of the upper bridge PWM wave and the lower bridge PWM wave to be different by a preset value, and enabling the starting time interval of the upper bridge PWM wave and the lower bridge PWM wave to be preset in duration.
On the other hand, the application also provides a single chip microcomputer, wherein the complementary PWM wave output device of the single chip microcomputer is included.
On the other hand, the application also provides an unmanned aerial vehicle, which comprises a motor and a single chip microcomputer, wherein the single chip microcomputer comprises a complementary PWM wave output device of the single chip microcomputer;
the motor is connected with the device, and the complementary PWM waves output by every three paths of the devices are used for driving a motor of the unmanned aerial vehicle.
As one embodiment, the single chip microcomputer is an STM32 single chip microcomputer.
As one embodiment, the motor includes a motor having any one of the following functions:
a drive motor of the propeller;
the driving motor of cloud platform.
The single chip microcomputer and the unmanned aerial vehicle can output complementary PWM waves by configuring the universal timer in the single chip microcomputer and the working parameters of the GPIO interface. Therefore, in order to output multiple sets of complementary PWM waves, the complementary PWM waves can be realized by configuring more universal timers to drive more circuit elements, so that the number of channels of the complementary PWM waves output by the single chip microcomputer is not limited by the number of high-level timers.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
For convenience of description, the following embodiments of the present application only use an STM32 single chip microcomputer as an example to illustrate the technical solution of the present application, and it should be understood that the present application is not limited thereto.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an STM32 monolithic computer adopted in an embodiment of the present invention, where the STM32 monolithic computer includes two advanced timers (TIM1, TIM8) and a plurality of general timers (TIM2-TIM5), each general timer may be connected to four general purpose input/output (GPIO) interfaces, and each GPIO interface corresponds to one pin of PA0-PA15 and PB0-PB 15. By configuring the parameters of the general timer and the GPIO interface, the complementary PWM waves can be output by utilizing the general timer. In addition, by configuring a plurality of general timers and selecting a plurality of GPIO interfaces, a plurality of groups of complementary PWM waves can be output to drive different circuit elements.
Referring to fig. 2, the method for outputting complementary PWM waves by using a single chip microcomputer according to the present embodiment includes:
and step S10, selecting the general timer and an even number of GPIO interfaces connected with the general timer.
In the single chip microcomputer, one general timer can be connected with a plurality of GPIO interfaces, and each GPIO interface can output one path of PWM wave, so that at least two GPIO interfaces are needed for generating a group of complementary PWM waves. Therefore, multiple groups of GPIO interfaces can be selected as required, each group of GPIO interfaces comprises two GPIO interfaces so as to output multiple groups of complementary PWM waves, and the number of the selected GPIO interfaces is always even.
And step S20, configuring the general timer and the working parameters of the GPIO interface.
In order to output the complementary PWM wave, it is necessary to configure the operating parameters of the general-purpose timer and the GPIO interface, including the clock frequency, the counting mode, the output mode, etc. required by the general-purpose timer, and the operating mode, the output polarity, etc. of the GPIO interface. Meanwhile, the reloading value of the universal timer needs to be set according to the clock frequency of the universal timer.
In step S30, the clock of the general-purpose timer and the clock of the GPIO interface are enabled.
The clock for enabling the GPIO interface is a precondition that the GPIO interface can be used, and the enabling of the clock of the general timer is a precondition that the general timer works normally, and provides a basic clock signal for the general timer.
The general timers share the same clock source, so that the output PWM clocks are synchronous, and if the general timers do not share the same clock source, the clocks of the general timers need to be made into a synchronous mode through external signals.
And step S40, starting the general timer to work according to the configured working parameters, and enabling every two interfaces of the even number of GPIO interfaces to output complementary PWM waves.
After the configuration of the working parameters of the general timer and the GPIO interfaces connected with the general timer is completed, the general timer is started, so that every two GPIO interfaces output complementary PWM waves.
According to the method for outputting the complementary PWM waves by the single chip microcomputer, provided by the embodiment of the invention, the complementary PWM waves can be output by utilizing the general timer through configuring the working parameters of the general timer and the GPIO interface. Therefore, in order to output multiple groups of complementary PWM waves, the complementary PWM waves can be realized by configuring more universal timers to drive more circuit elements, so that the number of complementary PWM wave channels output by the singlechip is not limited by the number of high-level timers in the singlechip any more.
As one example, in step S10, selecting an even number of GPIO interfaces of the general-purpose timer includes: and selecting GPIO interfaces with twice number of channels according to the number of channels of complementary PWM waves to be output.
Specifically, a general timer in the STM32 singlechip is generally connected with four GPIO interfaces. When a plurality of groups of complementary PWM waves are required to be generated by using a general timer, a GPIO interface with the number being twice that of the channels of the PWM waves can be selected according to the number of the channels of the complementary PWM waves required to be output by circuit elements required to be driven. And each two selected GPIO interfaces output a group of complementary PWM waves.
In an STM32 singlechip, one general timer is generally connected with four GPIO interfaces, so that at most four groups of complementary PWM waves can be output by every two general timers. If the generated complementary PWM is used for driving the motors, each motor needs six paths of PWM waves to form three groups of complementary PWM waves, namely six GPIO interfaces are selected, so that at least two universal timers are required to be configured. As an alternative, three GPIO interfaces connected to one general-purpose timer may be selected, and then three GPIO interfaces connected to another general-purpose timer may be selected to implement six-way PWM wave output. In addition, as another alternative, four GPIO interfaces connected to one general-purpose timer may be selected, and then two GPIO interfaces connected to another general-purpose timer may be selected to implement six-channel PWM wave output, so that the two general-purpose timers may generate six channels of complementary PWM waves for driving the motor.
Referring to fig. 3, as an embodiment, in step S20, the configuring the operating parameters of the general-purpose timer and the GPIO interface includes the following steps:
step S21, configuring the working clock frequency of the universal timer;
step S22, configuring the counting mode of the universal timer as an up-down counting mode;
step S23, configuring the output mode of the universal timer as a PWM mode;
step S24, configuring the operating mode of the GPIO interface as push-pull multiplexing;
step S25, configuring the output polarity of the GPIO interfaces to make two paths of PWM waves output by the GPIO interfaces in one group, wherein each group of the two paths of PWM waves are complementary; and
step S26, a reload value for each PWM wave is set according to the configured clock frequency.
It should be noted that, the above steps are only used to describe parameter items for configuring the general-purpose timer and the GPIO interface, and do not limit the specific setting sequence.
In step S21, the clock frequency at which the general-purpose timer operates may be set according to the requirements of the circuit elements to be driven. Because the universal timers in the STM32 singlechip can share one clock source, such as an APB1 clock source, the universal timers can have the same clock frequency, and the output PWM waves are also in a synchronous mode. It will be appreciated that if the universal timers in the STM32 single chip microcomputer do not share the same clock source, the universal timers can be configured to be in a synchronous mode by external signals.
In step S22, the output of the complementary PWM wave can be realized by configuring the count mode of the general-purpose timer to be the up-down count mode, with centering in the PWM wave output appearance.
In step S24, the two PWM waves output by the at least two selected GPIO interfaces may be complemented by configuring the output polarities of the at least two selected GPIO interfaces.
In step S25, by turning on the general timer reload function, the reload value of each PWM wave is set, and the complementary PWM waves can be output.
According to the method for outputting the complementary PWM waves by using the STM32 single chip microcomputer, provided by the embodiment of the invention, the complementary PWM waves can be output by using the universal timer in the STM32 single chip microcomputer through configuring the universal timer and the GPIO interface; meanwhile, by configuring more universal timers, a plurality of sets of complementary PWM waves can be output, so that more circuit elements can be driven, and the limitation of the number of advanced timers is avoided.
As one example, in step S21, the step of setting the clock frequency at which the universal timer operates includes: the prescaled value and the clock split value of the universal timer are configured to set a clock frequency at which the universal timer operates.
Specifically, by configuring the prescaled value and the clock split value of the universal timer, the clock frequency at which the universal timer operates can be determined. The clock division value is obtained by dividing the clock source initially from APB1, then the actual action of the pre-division value is consistent with the clock division value, but the pre-division value can only be divided by 1, 2 and 4, namely the clock source is divided by 1, 2 and 4; the clock division value can be any integer from 0 to 65535. The configuration of the output clock frequency of the universal timer is realized through the combined action of the two timers. For example, in an STM32F103 single chip microcomputer, the APB1 clock source is 72MHz, and if the clock division value is selected to be 0, that is, 1 division, it is equivalent to maintaining the clock frequency.
As one embodiment, in step S25, configuring the polarity of the selected GPIO interface, and configuring the output polarity of the GPIO interface to make two groups of GPIO interfaces, where two PWM waves output by each group of GPIO interfaces are complementary to each other, includes:
configuring the polarity of a first GPIO interface in each group of GPIO interfaces to be high so as to output an upper bridge PWM wave;
and configuring the polarity of a second GPIO interface in each group of GPIO interfaces to be low so as to output a lower bridge PWM wave, wherein the level of the upper bridge PWM wave is opposite to that of the lower bridge PWM wave.
The configuration of the output polarities of the first GPIO interface and the second GPIO interface is high or low, which can be understood as that the level corresponding to the pre-output PWM duty ratio is high or low. For example: setting the polarity to be high, wherein the output duty ratio of the PWM wave is 20%, 20% of the output waveform is high level, and 80% of the output waveform is low level; the polarity is set to be low, the output duty ratio of the PWM wave is 20%, 20% of the output waveform is low level, and 80% of the output waveform is high level. Referring to fig. 4, in the first set of complementary PWM waves, the high level duty ratio is 20%, and in the second set of complementary PWM waves, the high level duty ratio is 60%.
As one embodiment, in step S26, the step of setting the reload value of each PWM wave according to the configured clock frequency includes:
and according to the working clock frequency of the universal timer, setting the reloading value of the upper bridge PWM wave and the reloading value of the lower bridge PWM wave, enabling the reloading values of the upper bridge PWM wave and the lower bridge PWM wave to be different by a preset value, and enabling the starting time interval of the upper bridge PWM wave and the lower bridge PWM wave to be preset in duration.
Referring to fig. 5, the preset duration of the configured interval is a dead zone D, where the dead zone D is that, in the complementary PWM wave, after the upper half-bridge is turned off, the lower half-bridge is turned on after a certain time delay; or after the lower half-bridge is switched off, the upper half-bridge is switched on after a period of time is delayed, so that the power element is prevented from being burnt or the power supply is prevented from being damaged due to the direct connection of the anode and the cathode of the power supply, and the delay time is a dead zone. Specifically, the reload value of the lower bridge PWM may be higher than a preset threshold of the reload value of the upper bridge PWM, the preset threshold is a preset time length added for preventing the power supply short circuit caused by the simultaneous conduction of the upper and lower MOS transistors in the application of the motor, the preset time length may be any value in 0.5us-1.5us, such as 500ns, 1us and the like, and may be selected according to the clock frequency of the timer.
Further, an embodiment of the present invention further provides a driving method for an unmanned aerial vehicle, where a method for outputting complementary PWM waves by a singlechip is applied to the unmanned aerial vehicle, and the method includes:
outputting complementary PWM waves by using the method of outputting complementary PWM waves by the singlechip;
and selecting the three paths of complementary PWM waves for output, and driving a motor in the unmanned aerial vehicle.
STM32 singlechip can be adopted in unmanned aerial vehicle. The complementary PWM ripples of output can be used to drive the driving motor who is arranged in driving the screw among the unmanned aerial vehicle, also can be used to drive the driving motor of cloud platform, still can be used to drive other driving motor etc. among the unmanned aerial vehicle.
Referring to fig. 6, the present invention further provides a device 1000 for outputting complementary PWM waves by a single chip microcomputer corresponding to the method for outputting complementary PWM waves by a single chip microcomputer, the device comprising:
the selection module 100 is used for selecting a general timer and an even number of GPIO interfaces connected with the general timer;
a working parameter configuration module 200, configured to configure working parameters of the general timer and the GPIO interface;
the clock enabling module 300 is used for enabling the clock of the general timer and the clock of the GPIO interface; and
and the starting module 400 is configured to start the general timer to operate according to the configured operating parameters, so that every two interfaces of the even number of GPIO interfaces output complementary PWM waves.
Specifically, the selection module 100 is configured to select multiple groups of GPIO interfaces as needed, where each group of GPIO interfaces includes two GPIO interfaces to output multiple complementary PWM waves, and the number of the selected GPIO interfaces is always an even number.
The work configuration module 200 is configured to configure the work parameters of the general-purpose timer and the GPIO interface, including a clock frequency, a counting mode, an output mode, etc. required by the general-purpose timer, and a work mode, an output polarity, etc. of the GPIO interface. Meanwhile, the reloading value of the universal timer needs to be set according to the clock frequency of the universal timer.
The always-on module 300 is configured to enable the clock of the general-purpose timer and the clock of the GPIO interface, and provide a basic clock signal for the general-purpose timer.
The starting module 400 is configured to start the general-purpose timer after the configuration of the operating parameters of the general-purpose timer and the GPIO interfaces connected to the general-purpose timer is completed, so that every two GPIO interfaces output complementary PWM waves.
According to the complementary PWM wave output device of the single chip microcomputer, the complementary PWM waves can be output by utilizing the universal timer of the single chip microcomputer through the configuration of the selection module, the working parameter configuration module, the clock enabling module and the starting module. Therefore, in order to output multiple sets of complementary PWM waves, more universal timers can be configured to drive more circuit elements, so that the number of advanced timers is not limited, and the driving manner is more flexible.
As one embodiment, the selection module 100 is further configured to select, according to the number of channels of the complementary PWM waves that need to be output, GPIO interfaces with twice the number of the channels.
Referring to fig. 7, as an embodiment, the working parameter configuration module 200 may further include:
a clock frequency configuration module 210, configured to configure a clock frequency at which the universal timer operates;
a counting mode configuration module 220, configured to configure the counting mode of the general timer to be an up-down counting mode;
an output mode configuration module 230, configured to configure the output mode of the general timer to be a PWM mode;
a working mode configuration module 240, configured to configure the working mode of the GPIO interface to be push-pull multiplexing;
an output polarity configuration module 250, configured to configure the output polarities of the GPIO interfaces, so that two paths of PWM waves output by two groups of GPIO interfaces are complementary; and
and a reload value setting module 260 for setting a reload value of each PWM wave according to the set clock frequency.
The clock frequency configuration module 210 can set the clock frequency of the general timer according to the requirement of the circuit element to be driven. Because the universal timers in the STM32 singlechip can share one clock source, such as an APB1 clock source, the universal timers can have the same clock frequency, and the output PWM waves are also in a synchronous mode.
The output polarity configuration module 240 may be configured to configure the output polarities of the selected at least two GPIO interfaces, so that the two PWM waves output by the selected at least two GPIO interfaces are complementary to each other.
The reloading value setting module 260 can be used for setting the reloading value of each PWM wave according to the set clock frequency, so as to avoid the power element from being burnt or the power supply from being damaged due to the direct connection of the anode and the cathode of the power supply, and improve the safety performance of the device.
As an embodiment, the clock frequency configuration module 210 further includes:
a prescaler value configuration module 211, configured to configure a prescaler value of the universal timer; and
a clock division value configuration module 213, configured to configure the clock division value of the universal timer.
The pre-divided value configuration module 211 and the clock divided value configuration module 213 can be used to configure the pre-divided value and the clock divided value of the universal timer to determine the clock frequency at which the universal timer operates.
For one embodiment, the output polarity configuration module 250 includes:
a first interface configuration module 251, configured to configure the polarity of the first GPIO interface in each group of GPIO interfaces to be high, so as to output an upper bridge PWM wave; and
and a second interface configuration module 253, configured to configure the polarity of the second GPIO interface in each group of GPIO interfaces to be low, so as to output a lower bridge PWM wave, where the level of the upper bridge PWM wave is opposite to that of the lower bridge PWM wave.
The first interface configuration module 251 and the second interface configuration module 253 configure the polarities of the GPIO interfaces to output different complementary PWM waves, so that the complementary PWM waves can be used to drive different types of circuit elements as needed, and the complementary PWM wave output device can drive different types of circuit elements simultaneously, thereby expanding the application range.
As one embodiment, the reload value setting module 260 is further configured to set a reload value of the upper bridge PWM wave and a reload value of the lower bridge PWM wave according to a clock frequency of the universal timer, so that the reload values of the upper bridge PWM wave and the lower bridge PWM wave are different by a preset value, and an on time interval between the upper bridge PWM wave and the lower bridge PWM wave is preset.
The reload value setting module 260 may be configured to configure a reload value to implement the configuration of a dead zone, so that the lower half-bridge is turned on after the upper half-bridge is turned off in the complementary PWM wave; or after the lower half-bridge is switched off, the upper half-bridge is switched on after a period of time is delayed, so that the power element is prevented from being burnt or the power supply is prevented from being damaged due to the direct connection of the anode and the cathode of the power supply.
The embodiment of the invention also provides the singlechip, which comprises a complementary PWM wave output device for outputting complementary PWM waves. Specifically, the single chip microcomputer may include the complementary PWM wave output device described in any one of the above embodiments. The single chip microcomputer can output complementary PWM waves through the universal timer, and the single chip microcomputer comprises a plurality of universal timers, so that the single chip microcomputer can be used for driving a plurality of elements.
Fig. 8 is a schematic diagram of driving a motor by using an STM32 single chip microcomputer. The adopted singlechip is specifically an STM32F103c8t6 singlechip, a Cortex-M3 kernel F1 series small memory processor is adopted, and a power supply, a clock and a reset circuit are added to realize a minimum working circuit system. The general timer TIM2 is used as the output of the upper bridge PWM wave, the corresponding pins of the general timer TIM2 are four GPIO ports of PA0, PA1, PA2 and PA3, and the adopted GPIO ports are PA0, PA1 and PA 2; a general timer TIM4 is used as the output of the lower bridge PWM wave, corresponding pins of the general timer TIM4 are four GPIO ports PB6, PB7, PB8 and PB9, and adopted GPIO ports are PB6, PB7 and PB 8. Meanwhile, TIM2 and TIM4 share the same clock source and are 72MHz, so that the clocks are synchronous; two timers are configured, the reloading value is 1000, the frequency division value is 36 clocks, and PWM waves with the frequency of 1K (72M/36/1000 is 2K and is 1K due to counting up and down) are output; the reloading value of the universal timer TIM4 as the lower bridge is numerically 2 more than that of the universal timer TIM2, the clock frequency is 2MHz, 2 × 1/2M is 1us, and the dead zone is found to be 1 μ s by calculation.
The embodiment of the invention also provides the unmanned aerial vehicle which comprises the complementary PWM wave output device and the motor, wherein the motor is connected with the complementary PWM wave output device, and the complementary PWM waves output by every three paths of complementary PWM wave output devices are used for driving the motor of the unmanned aerial vehicle. Specifically, can include a plurality of motors among the unmanned aerial vehicle, this complementary PWM ripples output device can be used to drive each motor among the unmanned aerial vehicle, and motor among the unmanned aerial vehicle is connected with this complementary PWM ripples output device, and the complementary PWM ripples of three routes that this complementary PWM ripples output device exported for drive a motor among the unmanned aerial vehicle. This complementary PWM ripples output device can be arranged in driving unmanned aerial vehicle, and the driving motor of any function in the driving motor of screw, the driving motor of cloud platform etc. also can be used to the driving motor of drive screw and the driving motor of cloud platform simultaneously, can select according to actual need for drive mode flexibility more.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when executed. The non-volatile storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.