Pan-tilt and tilt control method and device, control main board and periscope pan-tilt

文档序号:1390359 发布日期:2020-02-28 浏览:32次 中文

阅读说明:本技术 云台俯仰控制方法、装置、控制主板和潜望镜云台 (Pan-tilt and tilt control method and device, control main board and periscope pan-tilt ) 是由 宋有聚 蒋进超 于 2019-12-02 设计创作,主要内容包括:本发明涉及云台俯仰控制方法、装置、控制主板和潜望镜云台,该云台俯仰控制方法通过获取光学变倍机芯的实时变倍倍数以确定目标脉冲细分数,目标脉冲细分数为多个预设脉冲细分数中的一种,每个预设脉冲细分数均对应设置一个预设脉冲细分变量以记录每个预设脉冲细分数所对应的脉冲数,获取当前脉冲细分数,若当前脉冲细分数和目标脉冲细分数不同,调整当前脉冲细分数为目标脉冲细分数并通过对应的预设脉冲细分变量记录目标脉冲细分数所对应的脉冲数,每隔预设时间间隔计算当前行程细分脉冲总数,并判断当前行程细分脉冲总数是否超过预设阈值,若是,则结合云台的转动方向生成电机控制命令;若否,则控制云台继续转动,提高了整个云台的安全性。(The invention relates to a holder pitching control method, a device, a control mainboard and a periscope holder, wherein the holder pitching control method determines a target pulse subdivision number by acquiring a real-time zoom multiple of an optical zoom movement, the target pulse subdivision number is one of a plurality of preset pulse subdivision numbers, each preset pulse subdivision number is correspondingly provided with a preset pulse subdivision variable to record the pulse number corresponding to each preset pulse subdivision number, the current pulse subdivision number is acquired, if the current pulse subdivision number is different from the target pulse subdivision number, the current pulse subdivision number is adjusted to be the target pulse subdivision number and the pulse number corresponding to the target pulse subdivision number is recorded through the corresponding preset pulse subdivision variable, the total number of the current stroke subdivision pulse is calculated at preset time intervals, judging whether the total number of the current stroke subdivision pulses exceeds a preset threshold value, if so, generating a motor control command by combining the rotating direction of the holder; if not, the cradle head is controlled to continue rotating, and the safety of the whole cradle head is improved.)

1. The utility model provides a cloud platform every single move control method which characterized in that is applied to periscope cloud platform, periscope cloud platform is provided with step motor and optics zoom core, step motor with periscope cloud platform is connected through aggregate unit for through aggregate unit drives periscope cloud platform every single move rotates, cloud platform every single move control method includes:

acquiring the real-time zoom multiple of the optical zoom movement;

determining a corresponding target pulse subdivision number according to the real-time variable magnification, wherein the target pulse subdivision number is one of a plurality of preset pulse subdivision numbers, and each preset pulse subdivision number is correspondingly provided with a preset pulse subdivision variable so as to record the pulse number corresponding to each preset pulse subdivision number;

acquiring a current subdivision number, and comparing whether the current subdivision number is the same as the target subdivision number to judge whether the stepping motor needs to change speed;

when the current subdivision number is different from the target subdivision number, adjusting the current subdivision number to be the target subdivision number and recording the number of pulses corresponding to the target subdivision number through corresponding preset pulse subdivision variables so as to control the stepping motor to change the speed;

and calculating the total number of the current stroke subdivided pulses at intervals of preset time, and generating corresponding motor control commands according to the relationship between the total number of the current stroke subdivided pulses and a preset total stroke pulse threshold value and the rotation direction of the holder.

2. The pan-tilt pitch control method according to claim 1, wherein the step of recording the number of pulses corresponding to the target subdivision number by corresponding preset pulse subdivision variables is preceded by the step of:

judging whether the pulse number recorded by the corresponding preset pulse subdivision variable exceeds a corresponding counting threshold value or not;

if yes, stopping counting; if not, executing the subsequent steps.

3. The pan-tilt pitch control method according to claim 1, wherein the target subdivision number is one of a first preset subdivision number, a second preset subdivision number, and a third preset subdivision number that are sequentially increased, the preset pulse subdivision variables include a first preset pulse subdivision variable, a second preset pulse subdivision variable, and a third preset pulse subdivision variable, and the process of calculating the total number of current stroke subdivision pulses at every preset time interval includes:

multiplying the respective numerical values of the first preset pulse subdivision variable, the second preset pulse subdivision variable and the third preset pulse subdivision variable by the respective corresponding preset scale factors respectively, and adding the products to obtain a current sum value;

calculating the difference value between the current summation value and the last summation value corresponding to the last preset time interval;

and adding the difference value with the total number of the last stroke subdivision pulses corresponding to the last preset time interval to obtain the total number of the current stroke subdivision pulses.

4. The pan-tilt head pitch control method according to claim 1, wherein the step of generating a corresponding motor control command according to the relationship between the total number of the current stroke subdivided pulses and a preset total number of stroke pulses threshold and the rotation direction of the pan-tilt head comprises:

judging whether the total number of the current stroke subdivided pulses reaches a preset upper limit pulse threshold value or not;

if yes, judging the rotation direction of the holder;

when the holder rotates upwards, the stepping motor is controlled to stop; when the holder rotates downwards, the stepping motor is controlled to continue rotating; if not, judging whether the total number of the current stroke subdivided pulses reaches a preset lower limit pulse threshold value or not;

if yes, judging the rotation direction of the holder;

when the holder rotates upwards, the stepping motor is controlled to continue rotating; when the holder rotates downwards, controlling the stepping motor to stop;

if not, controlling the stepping motor to continue rotating.

5. A pan and tilt head pitch control method according to claim 1, wherein the linkage device employs a rotating gear, a magnet is disposed in a mounting hole of the rotating gear, the periscope pan and tilt head is further provided with a control main board, the control main board is further provided with a single hall sensor, and the pan and tilt head pitch control method further comprises:

and when the holder rotates upwards to the highest point, receiving sensing signals output when the single Hall sensor and the magnet are subjected to Hall sensing, respectively initializing each preset pulse subdivision variable according to the sensing signals, and resetting the total number of the current stroke subdivision pulses.

6. A pan and tilt head pitch control method according to claim 5, wherein said step of initializing each preset pulse subdivision variable separately according to said sensing signal comprises:

and respectively setting the initial value of each preset pulse subdivision variable as the 1/2 full-range pulse number corresponding to each preset pulse subdivision variable in the whole stroke of the cradle head from the pitching highest point of rotation to the pitching lowest point of rotation according to the induction signal.

7. The utility model provides a cloud platform pitch control device, its characterized in that is applied to the periscope cloud platform, the periscope cloud platform is provided with step motor and optics zoom core, step motor with the periscope cloud platform is connected through the aggregate unit, is used for through the aggregate unit drives periscope cloud platform pitch rotates, cloud platform pitch control device includes:

the zooming times obtaining unit is used for obtaining the real-time zooming times of the optical zooming movement;

the target subdivision number obtaining unit is used for determining a corresponding target subdivision number according to the real-time variable magnification, wherein the target subdivision number is one of a plurality of preset subdivision numbers, and each preset subdivision number is correspondingly provided with a preset pulse subdivision variable so as to record the pulse number corresponding to each preset subdivision number;

the speed change judging unit is used for acquiring the current subdivision pulse number and comparing whether the current subdivision pulse number is the same as the target subdivision pulse number to judge whether the stepping motor needs to change speed or not;

the speed change unit is used for adjusting the current subdivision pulse number to be the target subdivision pulse number and recording the pulse number corresponding to the target subdivision pulse number through a corresponding preset pulse subdivision variable when the current subdivision pulse number is different from the target subdivision pulse number so as to control the stepping motor to change the speed;

the stroke judging unit is used for calculating the total number of the current stroke subdivision pulses at intervals of preset time, judging whether the total number of the current stroke subdivision pulses exceeds a preset threshold value, and if so, generating a corresponding motor control command by combining the rotating direction of the holder; if not, controlling the stepping motor to continue rotating.

8. A control main board, comprising a memory for storing a computer program and a processor for executing the computer program to cause the control main board to execute the pan/tilt/pitch control method according to any one of claims 1 to 6.

9. A periscope cloud platform, its characterized in that, periscope cloud platform is provided with the control mainboard in claim 8, periscope cloud platform still is provided with step motor and optics zoom core, step motor with optics zoom core respectively with control mainboard electric connection, step motor with the periscope cloud platform is connected through the aggregate unit, is used for through the aggregate unit drives periscope cloud platform every single move rotates.

10. A readable storage medium, characterized in that it stores a computer program which, when executed by a processor, performs the pan-tilt pitch control method of any one of claims 1 to 6.

Technical Field

The invention relates to the field of control, in particular to a pan-tilt and tilt control method and device, a control main board and a periscope pan-tilt.

Background

In the present periscope cloud deck product, the periscope cloud deck usually operates through a driving stepping motor, and then drives the whole periscope cloud deck to pitch up and down through transmission mechanisms such as gears, and the up-down pitch angle of the periscope cloud deck is usually extremely easy to exceed the set angle, and then the periscope cloud deck product is damaged.

Disclosure of Invention

In view of the above, the method and the device for controlling the pitching of the pan-tilt head, the control mainboard and the periscope pan-tilt head are provided, the stepping motor can be controlled to rotate through the method of setting a plurality of preset pulse subdivision numbers and corresponding preset pulse subdivision variables, the accurate pulse step counting mode is adopted, the whole pan-tilt head can not exceed the set pitching angle when pitching up and down, the damage to the periscope pan-tilt head product is avoided, and finally the safety of the whole pan-tilt head is improved.

A cloud platform every single move control method, apply to the periscope cloud platform, the periscope cloud platform has step motor and optics zoom core, the step motor is connected with cloud platform through the aggregate unit, is used for driving the cloud platform every single move to rotate through the aggregate unit, the cloud platform every single move control method includes:

acquiring real-time zoom multiple of the optical zoom movement;

determining a corresponding target pulse subdivision number according to the real-time variable magnification, wherein the target pulse subdivision number is one of a plurality of preset pulse subdivision numbers, and each preset pulse subdivision number is correspondingly provided with a preset pulse subdivision variable so as to record the pulse number corresponding to each preset pulse subdivision number;

acquiring a current subdivision number, and comparing whether the current subdivision number is the same as a target subdivision number to judge whether the stepping motor needs to change speed or not;

when the current subdivision number is different from the target subdivision number, adjusting the current subdivision number to be the target subdivision number, and recording the number of pulses corresponding to the target subdivision number through corresponding preset pulse subdivision variables so as to control the stepping motor to change the speed;

calculating the total number of the current stroke subdivision pulses at intervals of preset time, judging whether the total number of the current stroke subdivision pulses exceeds a preset threshold value, and if so, generating a corresponding motor control command by combining the rotating direction of the holder; if not, the cradle head is controlled to continue rotating.

In one embodiment, the step of counting by the corresponding target pulse subdivision variable is preceded by:

judging whether the pulse number recorded by the corresponding preset pulse subdivision variable exceeds a corresponding counting threshold value or not;

if yes, stopping counting; if not, executing the subsequent steps.

In one embodiment, the target pulse subdivision number is one of a first preset pulse subdivision number, a second preset pulse subdivision number and a third preset pulse subdivision number which are sequentially increased, the preset pulse subdivision variables include a first preset pulse subdivision variable, a second preset pulse subdivision variable and a third preset pulse subdivision variable, and the process of calculating the total number of the current stroke subdivision pulses at preset time intervals includes:

multiplying the numerical values of the first preset pulse subdivision variable, the second preset pulse subdivision variable and the third preset pulse subdivision variable by the corresponding preset scale factors respectively, and adding the products to obtain a current sum value;

calculating the difference value between the current summation value and the last summation value corresponding to the last preset time interval;

and adding the difference value and the total number of the last stroke subdivided pulses corresponding to the last preset time interval to obtain the total number of the current stroke subdivided pulses.

In one embodiment, the step of determining whether the total number of current trip subdivision pulses exceeds a preset threshold comprises:

judging whether the total number of the current stroke subdivided pulses reaches a preset upper limit pulse threshold value or not;

if yes, judging the rotation direction of the holder;

when the holder rotates upwards, the stepping motor is controlled to stop; when the holder rotates downwards, the stepping motor is controlled to continue rotating;

if not, judging whether the total number of the current stroke subdivision pulses reaches a preset lower limit pulse threshold value or not;

if yes, judging the rotation direction of the holder;

when the holder rotates upwards, the stepping motor is controlled to continue rotating; when the holder rotates downwards, the stepping motor is controlled to stop;

if not, the stepping motor is controlled to continue rotating.

In one embodiment, the periscope pan-tilt is further provided with a control main board, the control main board is further provided with a single hall sensor, the linkage device adopts a rotating gear, a magnet is arranged in a mounting hole of the rotating gear, and the pan-tilt pitch control method further comprises the following steps:

when the holder rotates upwards to the highest point, the holder receives sensing signals output by the single Hall sensor and the magnet when Hall sensing occurs, initializes each preset pulse subdivision variable respectively according to the sensing signals, and clears the total number of the current stroke subdivision pulses.

In one embodiment, the step of initializing each preset pulse subdivision variable according to the sensing signal comprises:

and respectively setting the initial value of each preset pulse subdivision variable as the 1/2 full-range pulse number corresponding to each preset pulse subdivision variable in the whole stroke of the cradle head from the pitching highest point to the pitching lowest point according to the induction signal.

In addition, still provide a cloud platform every single move controlling means, be applied to the periscope cloud platform, the periscope cloud platform is provided with step motor and optics zoom core, and step motor is connected through aggregate unit with the periscope cloud platform for drive periscope cloud platform every single move through aggregate unit and rotate, cloud platform every single move controlling means includes:

the zooming times obtaining unit is used for obtaining real-time zooming times of the optical zooming movement;

the target subdivision number obtaining unit is used for determining a corresponding target subdivision number according to the real-time variable magnification, the target subdivision number is one of a plurality of preset subdivision numbers, and each preset subdivision number is correspondingly provided with a preset pulse subdivision variable so as to record the pulse number corresponding to each preset subdivision number;

the speed change judging unit is used for acquiring the current subdivision pulse number and comparing whether the current subdivision pulse number is the same as the target subdivision pulse number to judge whether the stepping motor needs to change speed;

the speed change unit is used for adjusting the current subdivision number to be the target subdivision number and recording the pulse number corresponding to the target subdivision number through a corresponding preset pulse subdivision variable when the current subdivision number is different from the target subdivision number so as to control the stepping motor to change the speed;

the stroke judging unit is used for calculating the total number of the current stroke subdivision pulses at intervals of preset time, judging whether the total number of the current stroke subdivision pulses exceeds a preset threshold value or not, and if so, generating a corresponding motor control command by combining the rotating direction of the holder; if not, the stepping motor is controlled to continue rotating.

In addition, a control main board is further provided, and the control main board comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the control main board to execute the holder pitch control method.

In addition, still provide a periscope cloud platform, the periscope cloud platform is provided with above-mentioned control mainboard, and the periscope cloud platform still is provided with step motor and optics zoom core, and step motor and optics zoom core respectively with control mainboard electric connection, and step motor is connected through the aggregate unit with the periscope cloud platform for drive periscope cloud platform every single move through the aggregate unit and rotate.

Furthermore, a readable storage medium is provided, which stores a computer program that, when executed by a processor, performs the above-described pan/tilt control method.

The cradle head pitching control method is applied to a periscope cradle head, the periscope cradle head is provided with a stepping motor and an optical zoom movement, the stepping motor is connected with the cradle head through a linkage device and used for driving the cradle head to pitch and rotate through the linkage device, a corresponding target pulse subdivision number is determined according to the real-time zoom multiple of the optical zoom movement, the target pulse subdivision number is one of a plurality of preset pulse subdivision numbers, each preset pulse subdivision number is correspondingly provided with a preset pulse subdivision variable to record the pulse number corresponding to each preset pulse subdivision number, the current pulse subdivision number is obtained, whether the current pulse subdivision number is the same as the target pulse subdivision number or not is judged, when the current pulse subdivision number is different from the target pulse subdivision number, the current pulse subdivision number is adjusted to be the target pulse subdivision number, and the corresponding preset pulse subdivision variable is used for recording the target pulse subdivision number The corresponding number of pulses is used for controlling the stepping motor to change the speed, the total number of the current stroke subdivided pulses is calculated at intervals of preset time, whether the total number of the current stroke subdivided pulses exceeds a preset threshold value is judged, and if yes, a corresponding motor control command is generated by combining the rotating direction of the holder; if not, the cradle head is controlled to continue rotating, the cradle head pitching control method can control the stepping motor to rotate through a method of setting a plurality of preset pulse subdivision numbers and corresponding preset pulse subdivision variables, and through an accurate pulse subdivision step counting mode, so that the whole cradle head can not exceed a set pitching angle when pitching up and down, the periscope cradle head product is prevented from being damaged, and finally the safety of the whole cradle head is improved.

Drawings

In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.

Fig. 1 is a block diagram of a periscope pan/tilt head provided in an embodiment;

fig. 2 is a schematic flow chart of a pan-tilt pitch control method provided in an embodiment;

fig. 3 is a schematic flow chart of a pan/tilt control method according to another embodiment;

FIG. 4 is a flow chart illustrating a method for obtaining a total number of subdivided pulses for a current trip in one embodiment;

FIG. 5 is a flow diagram illustrating a method for generating motor control commands provided in one embodiment;

fig. 6 is a schematic flow chart of a pan/tilt control method according to still another embodiment;

fig. 7 is a block diagram of a structure of a pan/tilt control apparatus provided in an embodiment.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.

The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.

Various embodiments of the present disclosure will be described more fully hereinafter. The present disclosure is capable of various embodiments and of modifications and variations therein. However, it should be understood that: there is no intention to limit the various embodiments of the disclosure to the specific embodiments disclosed herein, but rather, the disclosure is to cover all modifications, equivalents, and/or alternatives falling within the spirit and scope of the various embodiments of the disclosure.

Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.

Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.

Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.

Fig. 1 is a block diagram of a periscope pan-tilt 100 provided in an embodiment, the periscope pan-tilt 100 is provided with a control main board 102, a stepping motor 104 and an optical zoom movement 106, the stepping motor 104 and the optical zoom movement 106 are respectively electrically connected with the control main board 102, the stepping motor 104 is connected with the periscope pan-tilt 100 through a linkage device, and is used for driving the periscope pan-tilt 100 to rotate in pitch through the linkage device, wherein a Main Controller (MCU) is provided on the control main board 102.

Fig. 2 is a perspective view of an embodiment of a pan/tilt head pitch control method applied to the periscope pan/tilt head shown in fig. 1, where the pan/tilt head pitch control method includes:

and step S110, acquiring the real-time zoom multiple of the optical zoom movement.

When the integral optical zoom movement of the periscope holder is zoomed, the corresponding focal length is changed, correspondingly, the image displayed by the control end of the periscope holder is enlarged or reduced, and if the periscope holder keeps the unchanged pitching speed all the time, the image displayed by the control end is easy to be unclear.

Therefore, the data of the optical zoom movement is read in real time through a Main Controller (MCU) in a control main board on the periscope holder, and then the data is converted into corresponding real-time zoom multiples.

And S120, determining a corresponding target pulse subdivision number according to the real-time variable magnification, wherein the target pulse subdivision number is one of a plurality of preset pulse subdivision numbers, and each preset pulse subdivision number is correspondingly provided with a preset pulse subdivision variable so as to record the pulse number corresponding to each preset pulse subdivision number.

The MCU main controller on the control mainboard sets different target pulse subdivision numbers aiming at different real-time variable magnification factors, namely, each target pulse subdivision number control mode of the stepping motor corresponds to the real-time variable magnification factor within a certain range, in other words, when the real-time variable magnification factor changes within the certain range, the target pulse subdivision number of the corresponding stepping motor is always the same and does not change.

In one embodiment, the target pulse subdivision number is one of two preset pulse subdivision numbers, 1/4 and 1/8 respectively, the default pulse subdivision number of the stepper motor is 1/4, and when the real-time zoom multiple is less than 11 times, the corresponding target pulse subdivision number is 1/4 at all times; when the real-time magnification factor is equal to or greater than 11 times and less than 15 times, the corresponding target subdivision number is always 1/8.

Wherein, the stepping motor switches the pulse subdivision number by setting the level of the subdivision setting pin of the stepping motor driver, for example, 1/4 subdivision: m _ M1 ═ 0, M _ M2 ═ 1, and M _ M3 ═ 0; 1/8, subdivision: m _ M1 ═ 1, M _ M2 ═ 1, and M _ M3 ═ 0; 1/16, subdivision: m _ M1 ═ 1, M _ M2 ═ 1, and M _ M3 ═ 1, where M _ M1, M _ M2, and M _ M3 are the subdivision setting pins of the stepper motor driver, respectively.

And each subdivision setting pin of the stepping motor driver is respectively connected with a corresponding pin of the MCU main controller.

The control method comprises the steps of setting a preset pulse subdivision variable for each preset pulse subdivision number, and recording the number of pulses of the stepping motor corresponding to the preset pulse subdivision number in a control mode corresponding to the preset pulse subdivision number.

And step S130, acquiring the current subdivision pulse number, and comparing whether the current subdivision pulse number is the same as the target subdivision pulse number to judge whether the stepping motor needs to change speed.

When the target pulse subdivision number corresponding to the real-time variable magnification multiple is obtained, the main controller obtains the current pulse subdivision number of the stepping motor, and compares the current pulse subdivision number with the target pulse subdivision number: if the real-time times are the same, the real-time times are still within a certain range, and the current pulse subdivision number does not need to be adjusted, in other words, the stepping motor does not need to change speed; if the real-time magnification change times are different, the real-time magnification change times are larger and exceed a certain range, in other words, the stepping motor needs to change the speed.

And step S140, when the current subdivision number and the target subdivision number are different, adjusting the current subdivision number to be the target subdivision number.

When the current subdivision number is different from the target subdivision number, the real-time magnification change multiple is larger, the stepping motor needs to change the speed, and at the moment, the main controller adjusts the subdivision number of the stepping motor to be the target subdivision number, in other words, the pulse subdivision mode corresponding to the current subdivision number is adjusted to be the pulse subdivision mode corresponding to the target subdivision number.

In one embodiment, when the current pulse subdivision number of the stepping motor is 1/4, and the real-time zoom multiple is 14 times, the corresponding target pulse subdivision number is 1/8 all the time, and at the moment, the current pulse subdivision number and the target pulse subdivision number are obviously different, and the current pulse subdivision number of the stepping motor needs to be adjusted from 1/4 to 1/8 corresponding to the target pulse subdivision number.

And S150, recording the pulse number corresponding to the target pulse subdivision number through the corresponding preset pulse subdivision variable so as to control the stepping motor to change the speed.

After the current subdivision number of the stepping motor is adjusted to the target subdivision number, the number of pulses corresponding to the target subdivision number needs to be recorded through corresponding preset pulse subdivision variables.

And step S160, calculating the total number of the current stroke subdivision pulses at preset time intervals.

For the pan-tilt, when the entire pan-tilt is pitching, there is always a certain pitch angle limit, in other words, there is always a certain limit position upward or downward, so to prevent the pan-tilt pitch stroke from exceeding the limit position, the total number of current stroke subdivision pulses needs to be calculated at preset time intervals.

In one embodiment, the current run-length sub-divided pulse total number is calculated every 100 ms.

When the total number of the current stroke subdivided pulses is calculated, the number of pulses corresponding to each preset pulse subdivided variable and the total number of the previous stroke subdivided pulses need to be considered at the same time.

And step S170, generating a corresponding motor control command according to the relation between the total number of the current stroke subdivision pulses and a preset total stroke pulse threshold value and the rotating direction of the holder.

In order to prevent the pan/tilt head from exceeding the respective limit position upwards or downwards, the total number of the pan/tilt head stroke pulses is provided with a certain threshold value, which is called as a preset total stroke pulse number threshold value, so that the total number of the current stroke subdivided pulses needs to be compared with the preset total stroke pulse number threshold value, and a corresponding motor control command is generated by combining the rotation direction of the pan/tilt head to control the stepping motor, so as to prevent the pan/tilt head stroke from exceeding the limit position.

According to the cloud deck pitching control method, the stepping motor can be controlled to rotate through the method of setting a plurality of preset pulse subdivision numbers and corresponding preset pulse subdivision variables and through an accurate pulse subdivision step counting mode, so that the set pitching angle can not be exceeded when the whole cloud deck is pitched up and down, the periscope cloud deck product is prevented from being damaged, and finally the safety of the whole cloud deck is improved.

In one embodiment, as shown in fig. 3, step S150 further includes, before:

step S180, judging whether the pulse number recorded by the corresponding preset pulse subdivision variable exceeds a corresponding counting threshold, if so, entering step S190; if not, the process proceeds to step S150.

Wherein, to the stroke that every minute number of pulse subdivision of predetermineeing of step motor corresponds, also need set up certain stroke limit, correspondingly, the pulse number of corresponding minute variable record of predetermineeing also is provided with corresponding count threshold value, and then can restrict the stroke that every minute number of pulse subdivision of predetermineeing corresponds to prevent that step motor from driving whole cloud platform and surpassing the upwards or down spacing position that the cloud platform corresponds.

In one embodiment, the pulse subdivision control mode of the stepper motor is correspondingly provided with three preset pulse subdivision numbers 1/4, 1/8 and 1/16 respectively and three corresponding preset pulse subdivision variables, which are represented here by a first preset pulse subdivision variable, a second preset pulse subdivision variable and a third preset pulse subdivision variable respectively.

For convenience of illustration, PL1 represents a first preset pulse subdivision variable corresponding to a preset pulse subdivision number 1/4, PL2 represents a second preset pulse subdivision variable corresponding to the preset pulse subdivision number 1/8, PL3 represents a third preset pulse subdivision variable corresponding to the preset pulse subdivision number 1/16, the first preset pulse subdivision variable PL1 is used for illustration (the pan-tilt up count is increased and the pan-tilt down count is decreased), the up count threshold corresponding to PL1 is generally set to be the full stroke number corresponding to 3/2 preset pulse subdivision numbers (1/4) (the full stroke number is the total number of pulses corresponding to the pan-tilt from the highest point to the lowest point when the preset pulse subdivision number 1/4 is adopted), and the corresponding down count threshold is generally set to be the full stroke number corresponding to-1/2 preset pulse subdivision numbers (1/4).

And S190, stopping recording the pulse number corresponding to the target pulse subdivision number through the corresponding preset pulse subdivision variable, and proceeding to the step S160.

And when the pulse number recorded by the corresponding preset pulse subdivision variable exceeds the corresponding counting threshold, stopping recording the pulse number corresponding to the target pulse subdivision number by the corresponding preset pulse subdivision variable.

In one embodiment, the target pulse subdivision number is one of a first preset pulse subdivision number, a second preset pulse subdivision number and a third preset pulse subdivision number which are sequentially increased, the preset pulse subdivision variables include a first preset pulse subdivision variable, a second preset pulse subdivision variable and a third preset pulse subdivision variable, as shown in fig. 4, and the step S160 includes:

and S162, multiplying the numerical values of the first preset pulse subdivision variable, the second preset pulse subdivision variable and the third preset pulse subdivision variable with the corresponding preset scale factors respectively, and adding the products to obtain the current sum value.

And S164, calculating the difference value between the current summation value and the previous summation value corresponding to the previous preset time interval.

And S166, adding the difference value and the total number of the last stroke subdivision pulses corresponding to the last preset time interval to obtain the total number of the current stroke subdivision pulses.

In one embodiment, when the pan/tilt head is appointed to move upwards, the corresponding pulse subdivision variable count is increased, when the pan/tilt head is appointed to move downwards, the corresponding pulse subdivision variable count is decreased, PL1 represents a first preset pulse subdivision variable corresponding to a first preset pulse subdivision number of 1/4, PL2 represents a second preset pulse subdivision variable corresponding to a second preset pulse subdivision number of 1/8, PL3 represents a third preset pulse subdivision variable corresponding to a third preset pulse subdivision number of 1/16, when the first preset pulse subdivision number is 1/4, the corresponding whole-course pulse number is 13880 (expressed in absolute value and without considering the pan/tilt head movement direction), when the second preset pulse subdivision number is 1/8, the corresponding whole-course pulse number is 27760 (expressed in absolute value and without considering the movement direction), and when the third preset pulse subdivision number is 1/16, the corresponding whole-course pulse number is 55520 (expressed in absolute value and without considering the pan/tilt head movement direction) Regardless of the pan/tilt head motion direction), where the stroke pulse count variable is denoted PSum and the current sum is denoted by the variable Csum, the initial values of PL1, PL2, PL3, PSum, and Csum are set as follows:

PL10=-6304,PL20=-12608,PL30=-25216,Psum0=-25216,Csum0=PL30-*1+PL20*2+PL10*4=-75648;

the preset scale factor corresponding to the first preset pulse subdivision variable is 4, the preset scale factor corresponding to the second preset pulse subdivision variable is 2, and the preset scale factor corresponding to the third preset pulse subdivision variable is 1, that is, the third preset pulse subdivision variable is used as a reference to calculate the current summation value.

Starting from the initial state, the stepping motor moves downwards according to a first preset pulse subdivision number 1/4, and at a certain time t, the Csumt-80000 due to Csumt-80000, apparently, Csumt80000 and Csum0Different from-75648, the corresponding difference value-4352 is obtained, namely the pulse number corresponding to the downward movement is-4352, and Psum is calculatedtThe total number of the current stroke subdivision pulses is-25216-4352-29568.

In one embodiment, as shown in fig. 5, step S170 includes:

step S170, determining whether the total number of the current stroke subdivided pulses reaches a preset upper limit pulse threshold, if yes, going to step S171, and if not, going to step S172.

The cloud deck is limited to prevent damage to the cloud deck, the cloud deck can be prevented from running excessively upwards by setting a corresponding preset upper limit pulse threshold value for the total number of the current stroke subdivided pulses, and whether the preset upper limit pulse threshold value is reached or not needs to be judged after the total number of the current stroke subdivided pulses is obtained through calculation every time.

In step S171, the rotational direction of the pan/tilt head is determined, and when the pan/tilt head is rotated upward, the process proceeds to step S171a, and when the pan/tilt head is rotated downward, the process proceeds to step S171 b.

When the total number of the subdivided pulses of the current stroke of the pan/tilt head reaches the preset upper limit pulse threshold value, if the pan/tilt head rotates upwards, the step S171a is performed, and when the pan/tilt head rotates downwards, the step S171b is performed.

In step S171a, the stepping motor is controlled to stop.

In step S171b, the stepping motor is controlled to continue rotating.

S172, judging whether the total number of the current stroke subdivision pulses reaches a preset lower limit pulse threshold value, if so, entering a step S174; if not, the process proceeds to step S171 b.

When the total number of the current stroke subdivided pulses does not reach the preset upper limit pulse threshold, whether the total number of the current stroke subdivided pulses reaches the preset lower limit pulse threshold needs to be judged, and if yes, the step S174 is executed; if not, the process proceeds to step S171 b.

In step S174, the rotational direction of the pan/tilt head is determined, and when the pan/tilt head is rotated upward, the process proceeds to step S171b, and when the pan/tilt head is rotated downward, the process proceeds to step S171 a.

When the pan/tilt head rotates upwards, if the total number of the current stroke subdivided pulses reaches the preset lower limit pulse threshold value, the process does not need to be limited, and the process goes to step S171b, and when the pan/tilt head rotates downwards, the process goes to step S171 a.

In one embodiment, the linkage device employs a rotating gear, a magnet is disposed in a mounting hole of the rotating gear, and a single hall sensor is disposed on the control main board, as shown in fig. 6, the pan/tilt control method further includes:

and S200, when the holder rotates upwards to the highest point, receiving an induction signal output when the single Hall sensor and the magnet are subjected to Hall induction.

According to the cradle head, due to the fact that the single Hall sensor is adopted, the magnet is arranged in the mounting hole of the rotating gear, when the cradle head moves to the highest point, Hall sensing occurs on the magnet and the single Hall sensor arranged on the control main board, and a main controller on the control main board receives sensing signals output when the Hall sensing occurs on the single Hall sensor and the magnet.

And step S210, respectively initializing each preset pulse subdivision variable according to the induction signal, and clearing the total number of the current stroke subdivision pulse.

In one embodiment, the preset pulse subdivision variables comprise a first preset pulse subdivision variable, a second preset pulse subdivision variable and a third preset pulse subdivision variable, the first preset pulse subdivision variable, the second preset pulse subdivision variable and the third preset pulse subdivision variable are respectively subjected to initialization assignment setting, the total number of the current stroke subdivision pulses is reset, the cloud deck can be effectively prevented from exceeding the upward limit position of the cloud deck when the cloud deck moves to the highest point, and the safety of the cloud deck in the pitching movement process is improved.

In one embodiment, step S210 includes: and respectively setting the initial value of each preset pulse subdivision variable as the 1/2 full-range pulse number corresponding to each preset pulse subdivision variable in the whole stroke of the cradle head from the pitching highest point to the pitching lowest point according to the induction signal.

In one embodiment, initial values of the first preset pulse subdivision variable, the second preset pulse subdivision variable and the third preset pulse subdivision variable are respectively set to 1/2 full-range pulse numbers corresponding to the preset pulse subdivision variables in the whole process of the pan-tilt from the highest pitch rotation point to the lowest pitch rotation point, so that after the pan-tilt is initialized from the highest point, the pan-tilt can be effectively prevented from exceeding the corresponding upward limit position or downward limit position by combining with the respective counting threshold value of each preset pulse subdivision variable, and the safety of pan-tilt pitch control is improved.

In addition, as shown in fig. 7, still provide a cloud platform every single move controlling means 300, be applied to the periscope cloud platform, the periscope cloud platform is provided with step motor and optics zoom core, and step motor is connected through aggregate unit with the periscope cloud platform for drive periscope cloud platform every single move rotation through aggregate unit, cloud platform every single move controlling means includes:

a variable magnification times obtaining unit 310, configured to obtain real-time variable magnification times of the optical variable magnification movement;

the target subdivision number obtaining unit 320 is configured to determine a corresponding target subdivision number according to the real-time variable multiple, where the target subdivision number is one of a plurality of preset subdivision numbers, and each preset subdivision number is correspondingly provided with a preset pulse subdivision variable to record a pulse number corresponding to each preset subdivision number;

a speed change judging unit 330, configured to obtain a current subdivision pulse number, and compare whether the current subdivision pulse number is the same as a target subdivision pulse number to judge whether the stepping motor needs to change speed;

the speed change unit 340 is used for adjusting the current subdivision number to be the target subdivision number and recording the number of pulses corresponding to the target subdivision number through corresponding preset pulse subdivision variables so as to control the stepping motor to change the speed when the current subdivision number is different from the target subdivision number;

a stroke judging unit 350, configured to calculate the total number of current stroke subdivided pulses at preset time intervals, and judge whether the total number of current stroke subdivided pulses exceeds a preset threshold, if yes, generate a corresponding motor control command in combination with the rotation direction of the pan/tilt head; if not, the stepping motor is controlled to continue rotating.

In addition, a control main board is further provided, and the control main board comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the control main board to execute the holder pitch control method.

Furthermore, a readable storage medium is provided, which stores a computer program that, when executed by a processor, performs the above-described pan/tilt control method.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

In addition, each functional module or unit in each embodiment of the present invention 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.

The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:内窥镜光学系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!