CN111246077B - Identification method and device for control pin of stepping motor - Google Patents

Identification method and device for control pin of stepping motor Download PDF

Info

Publication number
CN111246077B
CN111246077B CN201811445483.0A CN201811445483A CN111246077B CN 111246077 B CN111246077 B CN 111246077B CN 201811445483 A CN201811445483 A CN 201811445483A CN 111246077 B CN111246077 B CN 111246077B
Authority
CN
China
Prior art keywords
pin
suspected
phase
brightness value
control pin
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.)
Active
Application number
CN201811445483.0A
Other languages
Chinese (zh)
Other versions
CN111246077A (en
Inventor
周洋
陈亚龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811445483.0A priority Critical patent/CN111246077B/en
Publication of CN111246077A publication Critical patent/CN111246077A/en
Application granted granted Critical
Publication of CN111246077B publication Critical patent/CN111246077B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means

Abstract

The embodiment of the invention provides a method and a device for identifying a control pin of a stepping motor. Respectively sending a first sequence pulse signal and a second sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of a preset stepping motor for adjusting the size of the aperture, and after sending the first sequence pulse signal and the second sequence pulse signal, collecting a first brightness value and a second brightness value of an image presented by the imaging plate corresponding to the position of the diaphragm, determining an actual first phase positive control pin, a first phase negative control pin, a second phase positive control pin and a second phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, the adjusting direction of the first sequence pulse signal and the adjusting direction of the second sequence pulse signal, and automatically identifying and determining the actual control pin of the stepping motor only by a controller.

Description

Identification method and device for control pin of stepping motor
Technical Field
The invention relates to the technical field of cameras, in particular to a method and a device for identifying a control pin of a stepping motor.
Background
With the development of society and the increasing living standard of people, image acquisition devices are applied more frequently and applied to more fields, wherein the application of cameras is especially wide, and cameras capable of automatically adjusting the size of an aperture according to the current light intensity are also widely applied. Such cameras often include a precision aperture (P-IRIS) lens and a precision aperture control device. The diaphragm of the camera lens is usually adjusted by controlling the driving of the stepping motor, but when assembled by different manufacturers, the control pins of the stepping motor are usually different.
At present, the camera lens and the camera body are assembled by workers according to product information introduction, the assembly is carried out in advance, the operation is inconvenient, time and labor are consumed, and if the product information introduction is carelessly lost, an effective solving means is lacked.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for identifying a control pin of a stepper motor.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for identifying a control pin of a stepper motor, including:
sending a first sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of a preset stepping motor for adjusting the size of the aperture;
after the first sequence of pulse signals are sent, acquiring a first brightness value of an image presented by an imaging plate corresponding to the position of the aperture;
sending a second sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of a preset stepping motor for adjusting the size of the aperture, wherein the second sequence pulse signal and the first sequence pulse signal are reverse signals;
after the second sequence of pulse signals is sent, acquiring a second brightness value of an image presented on the imaging plate corresponding to the position of the aperture;
and determining the actual first phase positive control pin, the first phase negative control pin, the second phase positive control pin and the second phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, the adjusting direction of the first sequence pulse signal and the adjusting direction of the second sequence pulse signal.
In a second aspect, an embodiment of the present invention further provides an apparatus for identifying a control pin of a stepper motor, including:
a signal transmission unit: the device comprises a step motor, a first sequence pulse signal generator, a second sequence pulse signal generator and a control circuit, wherein the step motor is used for sending a first sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of the preset step motor for adjusting the size of an aperture;
the brightness acquisition unit: the first sequence pulse signal is used for acquiring a first brightness value of an image presented by the imaging plate corresponding to the position of the light ring after the first sequence pulse signal is sent;
the signal sending unit is further configured to send a second sequence of pulse signals to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin, and a suspected second-phase negative pin of a preset stepper motor for adjusting the size of the aperture, where the second sequence of pulse signals and the first sequence of pulse signals are reverse signals;
the brightness acquisition unit is further used for acquiring a second brightness value of an image presented on the imaging plate corresponding to the position of the aperture after the second sequence pulse signal is sent;
and the pin determining unit is used for determining an actual first-phase positive control pin, a first-phase negative control pin, a second-phase positive control pin and a second-phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, the adjusting direction of the first sequence pulse signal and the adjusting direction of the second sequence pulse signal.
The identification method and the device for the control pin of the stepper motor have the advantages that: respectively sending a first sequence of pulse signals and a second sequence of pulse signals to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of a preset stepping motor for adjusting the size of the aperture, acquiring a first brightness value and a second brightness value of an image displayed by an imaging plate corresponding to the position of the aperture after sending the first sequence of pulse signals and the second sequence of pulse signals, determining an actual first-phase positive control pin, a first-phase negative control pin, a second-phase positive control pin and a second-phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, the adjusting direction of the first sequence of pulse signals and the adjusting direction of the second sequence of pulse signals, automatically identifying and determining the actual control pin of the stepping motor by a controller, and being convenient and fast, labour saving and time saving promotes user's experience and feels.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, 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, and for those skilled in the art, other relevant drawings can be obtained based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating an application environment of the identification method for a control pin of a stepper motor according to an embodiment of the present invention;
fig. 2 is a block diagram illustrating a circuit connection of a controller in the identification method for a control pin of a stepper motor according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating steps of a method for identifying a control pin of a stepper motor according to an embodiment of the present invention;
fig. 4 is a flow chart illustrating the sub-step of step S50 according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating another sub-step of step S50 according to an embodiment of the present invention;
fig. 6 is a functional unit diagram of an apparatus for controlling a pin of a stepper motor according to an embodiment of the present invention.
Icon: 10-a controller; 20-a stepper motor; 21-a suspected first phase positive pin; 22-suspected first phase negative pin; 23-suspected second positive pin; 24-a suspected second negative pin; 30-a brightness acquisition device; 40-a memory; 50-a human-computer interaction module; 60-aperture; 70-an imaging plate; 100-a stepper motor controls the identification device of the pin; 101-a signal transmitting unit; 102-a brightness acquisition unit; 103-pin determination unit.
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.
It is noted that 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The preferred embodiment of the invention provides a method for identifying a control pin of a stepping motor. As shown in fig. 1, the identification method of the control pin of the stepper motor is applied to a controller 10 in a video camera or a still camera. The video camera or the still camera includes an aperture 60, a stepping motor 20, and an imaging plate 70, the stepping motor 20 being used to adjust the size of the aperture 60, and the imaging plate 70 being used to image.
The identification method of the control pin of the stepping motor can be used for the controller 10 to identify each control pin of the two-phase four-wire stepping motor 20 in the lens. The two-phase four-wire stepper motor 20 includes a first phase positive control pin, a first phase negative control pin, a second phase positive control pin, and a second phase negative control pin. When the identity of each pin of the stepping motor 20 is unknown, the controller 10 randomly recognizes the four pins as a suspected first-phase positive pin 21, a suspected first-phase negative pin 22, a suspected second-phase positive pin 23, and a suspected second-phase negative pin 24.
As shown in fig. 2, the controller 10 is electrically connected to the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, the suspected second-phase negative pin 24, the memory 40, the human-computer interaction module 50, and the brightness acquisition device 30, respectively.
Typically, the rotor of the stepper motor 20 is a permanent magnet and the stator windings generate a vector magnetic field when current flows through the stator windings. The magnetic field drives the rotor to rotate for an angle, so that the directions of a pair of magnetic fields of the rotor are consistent with the direction of a magnetic field of the stator. When the vector field of the stator rotates an angle. The rotor also rotates an angle with the magnetic field. Every time an electric pulse is input, the motor rotates one angle and advances one step.
The suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23 and the suspected second-phase negative pin 24 are used for receiving an electric pulse signal sent by the controller 10. When the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23 and the suspected second-phase negative pin 24 respectively correspond to the first-phase positive control pin, the first-phase negative control pin, the second-phase positive control pin and the second-phase negative control pin, and receive the electric pulse signals sent according to the established sequence, the stepping motor 20 rotates in a certain direction, so that the size of the lens aperture 60 is adjusted. Wherein the predetermined sequence comprises: the pulse train for adjusting the aperture 60 to be larger and the pulse train for adjusting the aperture 60 to be smaller are opposite to each other.
The brightness acquisition device 30 is configured to acquire a brightness value of an image corresponding to the size of the aperture 60, and send the acquired brightness value to the controller 10. In one possible implementation, the brightness acquisition means 30 collects the brightness values of the images of the imaging plate 70 corresponding to the above-mentioned aperture 60.
The human-computer interaction module 50 is configured to collect the user start-up identification requirement, and send the collected start-up identification requirement to the controller 10.
There are various options for the kind of controller 10, for example: a Digital Signal Processor (DSP), a Programmable Logic Device (CPLD), a Field Programmable Gate Array (FPGA), a single chip, etc., which are not limited herein. In this embodiment, a DSP is used.
The controller 10 is configured to send a predetermined electrical pulse sequence to the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24 after receiving a start identification request, and receive a brightness value transmitted by the brightness acquisition device 30, thereby determining a correspondence relationship between control pins of the stepping motor 20. The identification means 100 of the control pins of the stepper motor comprises at least one software functional module which can be stored in the memory 40 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the controller 10. The controller 10 is used to execute executable modules stored in the memory 40, such as software function modules and computer programs included in the identification device 100 for identifying control pins of the stepper motor 20, so as to identify the control pins of the stepper motor 20.
After the controller 10 identifies the control pins of the stepping motor 20, the controller 10 may automatically send pulse signals to the control pins of the stepping motor 20 according to the current light intensity, so as to drive the stepping motor 20 to adjust the size of the lens aperture 60.
Fig. 3 shows the specific steps of the identification method applied to the stepper motor control pin of the controller 10:
step S10: and sending a first sequence pulse signal to a suspected first-phase positive pin 21, a suspected first-phase negative pin 22, a suspected second-phase positive pin 23 and a suspected second-phase negative pin 24 of a preset stepping motor 20 for adjusting the size of the diaphragm 60.
Specifically, when the controller 10 is electrically connected to 4 control pins of the stepping motor 20, the 4 control pins are preset as a suspected first-phase positive pin 21, a suspected first-phase negative pin 22, a suspected second-phase positive pin 23, and a suspected second-phase negative pin 24, respectively.
As shown in table 1, the controller 10 sends a preset first-sequence pulse signal to the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24 according to a predetermined sequence in the order from a to h or according to a predetermined sequence in the order from h to a. The first sequence of pulse signals at least includes a first column number of pulse signals, and the first column number may be preset according to the current environment, the lens device, and the like.
In Table 1, A, A-, B, B-represent the actual first phase positive control pin, first phase negative control pin, second phase positive control pin, and second phase negative control pin, respectively, of the stepper motor 20. Where a to h are in order the control diaphragm 60 is smaller, and h to a are in order the control diaphragm 60 is larger. Table 1 is for ease of understanding only and is not intended to be limiting.
Phase (C) a b c d e f g h
A H L L L L L H H
B L L L L H H H L
B- H H H L L L L L
A- L L H H H L L L
TABLE 1
Step S20: a first luminance value of the image corresponding to the aperture 60 is acquired.
Specifically, the controller 10 controls the brightness acquisition device 30 to acquire a first brightness value of an image presented on the video camera or camera imaging panel 70 after the first sequence of pulse signals is transmitted. The brightness value of the image on the imaging plate 70 may vary due to the size of the aperture 60, and when the aperture 60 becomes large, the light entering the lens increases, so that the brightness value of the image may become large; when the diaphragm 60 becomes small, light entering the lens decreases, and the luminance value of the image becomes small.
Step S30: and sending a second sequence pulse signal to a suspected first-phase positive pin 21, a suspected first-phase negative pin 22, a suspected second-phase positive pin 23 and a suspected second-phase negative pin 24 of a preset stepping motor 20 for adjusting the size of the diaphragm 60.
Specifically, the controller 10 sends a preset second sequence pulse signal to the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24.
For example, when the sequence of the first serial pulse signals from h to a is the direction that the control diaphragm 60 is enlarged, the sequence of the second serial pulse signals from a to h is the direction that the control diaphragm 60 is reduced, and the number of the first serial pulse signals and the second serial pulse signals may be equal. That is, if the control pin of the stepping motor 20 is identified without error, the number of steps of the rotation of the stepping motor 20 is the same after receiving the first serial pulse signal and the second serial pulse signal. Of course, the number of the columns of the first serial pulse signal and the second serial pulse signal may not be equal, and is not limited herein.
Step S40: a second luminance value of the image corresponding to the aperture 60 is acquired.
Specifically, the second luminance value of the image presented on the imaging panel 70 at this time is acquired, similarly to step S20.
Step S50: and determining the actual first-phase positive control pin, first-phase negative control pin, second-phase positive control pin and second-phase negative control pin of the stepping motor 20 according to the first brightness value, the second brightness value, the adjustment direction of the first sequence pulse signal and the adjustment direction of the second sequence pulse signal.
Specifically, step S50 includes the following two ways,
first, the first series of pulse signals is a series of pulse signals for adjusting the aperture 60 to be larger, the second series of pulse signals is a series of pulse signals for adjusting the aperture 60 to be smaller, and the sub-steps of step S50 are as shown in fig. 4:
step S501: and judging whether the difference value between the first brightness value and the second brightness value is smaller than a preset first threshold value. If yes, go to step S505; if not, go to step S502.
Specifically, since the brightness value of each frame of image has a certain fluctuation, a threshold needs to be set when determining the brightness change of the image, so as to distinguish whether the brightness change is caused by the change of the light ring 60 or in the normal fluctuation range. The first threshold may be set according to the ambient light intensity. The difference between the first brightness value and the second brightness value is greater than or equal to the preset first threshold, which indicates that the aperture 60 of the lens is changed when the first brightness value is obtained and the second brightness value is obtained, thereby indicating that the stepping motor 20 has a rotating action. The difference between the first brightness value and the second brightness value is smaller than the preset first threshold, which indicates that the aperture 60 is unchanged, the stepping motor 20 does not rotate, and the pin identity of the stepping motor 20 needs to be re-determined, that is, step S505 is executed.
Step S502: and judging whether the first brightness value is larger than the second brightness value. If yes, go to step S503; if not, go to step S504.
Specifically, if the first luminance value is greater than the second luminance value, it means that the lens aperture 60 at the time of acquiring the first luminance value is greater than the lens aperture 60 at the time of acquiring the second luminance value. It can be understood that after the second sequence pulse signals are sent to the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24, the step motor 20 drives the lens aperture 60 to be smaller, and the actual result is the same as the estimated effect, at this time, step S503 is executed.
If the first brightness value is smaller than the second brightness value, it means that the lens aperture 60 when the first brightness value is acquired is smaller than the lens aperture 60 when the second brightness value is acquired. It can be understood that after the second serial pulse signals are sent to the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24, the stepping motor 20 drives the lens aperture 60 to increase, and the actual result is opposite to the estimated effect, which indicates that the positive and negative of the first-phase control pin are reversed or the positive and negative of the second-phase control pin are reversed, and then step S504 is executed.
Step S503: the suspected first-phase positive pin 21 is determined as a first-phase positive control pin, the suspected first-phase negative pin 22 is determined as a first-phase negative control pin, the suspected second-phase positive pin 23 is determined as a second-phase positive control pin, and the suspected second-phase negative pin 24 is determined as a second-phase negative control pin.
Specifically, the actual result is the same as the estimated effect, and the suspected first-phase positive pin 21 is determined as a first-phase positive control pin, the suspected first-phase negative pin 22 is determined as a first-phase negative control pin, the suspected second-phase positive pin 23 is determined as a second-phase positive control pin, and the suspected second-phase negative pin 24 is determined as a second-phase negative control pin.
Step S504: the suspected first-phase positive pin 21 is determined as a first-phase positive control pin, the suspected first-phase negative pin 22 is determined as a first-phase negative control pin, the suspected second-phase positive pin 23 is determined as a second-phase negative control pin, and the suspected second-phase negative pin 24 is determined as a second-phase positive control pin.
Specifically, the actual result is opposite to the estimated effect, and the positive and negative inversion of the first-phase control pin or the positive and negative inversion of the second-phase control pin is explained. The suspected first-phase positive pin 21 is determined as a first-phase positive control pin, the suspected first-phase negative pin 22 is determined as a first-phase negative control pin, the suspected second-phase positive pin 23 is determined as a second-phase negative control pin, and the suspected second-phase negative pin 24 is determined as a second-phase positive control pin.
In one implementation, step S504 may be as shown in fig. 5:
step S504: the suspected first-phase positive pin 21 is determined as a first-phase negative control pin, the suspected first-phase negative pin 22 is determined as a first-phase positive control pin, the suspected second-phase positive pin 23 is determined as a second-phase positive control pin, and the suspected second-phase negative pin 24 is determined as a second-phase negative control pin.
With continuing reference to fig. 4 or 5, step S505: the suspected first phase positive pin 21, the suspected first phase negative pin 22, the suspected second phase positive pin 23, and the suspected second phase negative pin 24 of the pre-identified stepper motor 20 are reset.
Specifically, the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24 of the pre-determined stepping motor 20 are reset, for example, the original suspected first-phase positive pin, the original suspected first-phase negative pin, the original suspected second-phase positive pin, and the original suspected second-phase negative pin are respectively re-determined as a new suspected first-phase positive pin, a new suspected second-phase negative pin, a new suspected second-phase positive pin, and a new suspected first-phase negative pin; or the two pins are respectively re-determined to be a new suspected first-phase positive pin, a new suspected second-phase negative pin and a new suspected first-phase negative pin.
After the step S505 is executed, the step S10 is executed again until the difference between the first brightness value and the second brightness value is greater than or equal to the preset first threshold.
Secondly, the first sequence of pulse signals is a sequence of pulse signals for adjusting the aperture 60 to be smaller, and the second sequence of pulse signals is a sequence of pulse signals for adjusting the aperture 60 to be larger, which is the same as the first one and will not be described herein again.
When the ambient light is insufficient, an external light source is provided to increase the light intensity and to increase the magnitude of the difference between the first luminance value and the second luminance value.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating an apparatus 100 for identifying a control pin of a stepping motor according to a preferred embodiment of the invention. It should be noted that the basic principle and the generated technical effect of the identification apparatus 100 for controlling pins of a stepper motor provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments.
The identification apparatus 100 of the stepping motor control pin includes a signal transmission unit 101, a brightness acquisition unit 102, and a pin determination unit 103.
Signal transmission section 101: the controller is used for sending a first sequence pulse signal to a suspected first-phase positive pin 21, a suspected first-phase negative pin 22, a suspected second-phase positive pin 23 and a suspected second-phase negative pin 24 of a preset stepping motor 20 for adjusting the size of the diaphragm 60. Specifically, the signal transmission unit 101 may perform step S10.
The brightness acquisition unit 102: for acquiring a first luminance value of the image corresponding to the aperture 60 after the first sequence of pulse signals is transmitted. Specifically, the luminance collection unit 102 may perform step S20.
The signal sending unit 101 is further configured to send a second sequence of pulse signals to a suspected first-phase positive pin 21, a suspected first-phase negative pin 22, a suspected second-phase positive pin 23, and a suspected second-phase negative pin 24 of a preset stepper motor 20 for adjusting the size of the diaphragm 60, where the second sequence of pulse signals and the first sequence of pulse signals are inverse signals. Specifically, the signal transmission unit 101 may further perform step S30.
The brightness acquisition unit 102 is further configured to acquire a second brightness value of the image corresponding to the aperture 60 after transmitting the second sequence of pulse signals. Specifically, the luminance collection unit 102 may also perform step S40.
The pin determination unit 103 is configured to determine an actual first-phase positive control pin, a first-phase negative control pin, a second-phase positive control pin, and a second-phase negative control pin of the stepping motor 20 according to the first brightness value, the second brightness value, the adjustment direction of the first sequence pulse signal, and the adjustment direction of the second sequence pulse signal. Specifically, the pin determination unit 103 may perform step S50.
The pin determination unit 103 performs step S50, including the following two cases,
first, the first series of pulse signals is a series of pulse signals for adjusting the aperture 60 to be larger, and the second series of pulse signals is a series of pulse signals for adjusting the aperture 60 to be smaller;
the pin determination unit 103 includes a pin determination module and a reset module,
the pin determination module is configured to determine a suspected first-phase positive pin 21 as a first-phase positive control pin, determine a suspected first-phase negative pin 22 as a first-phase negative control pin, determine a suspected second-phase positive pin 23 as a second-phase positive control pin, and determine a suspected second-phase negative pin 24 as a second-phase negative control pin when a difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is greater than the second brightness value. Specifically, the pin determination module may perform step S503.
The pin determination module is further configured to determine a suspected first-phase positive pin 21 as a first-phase positive control pin, determine a suspected first-phase negative pin 22 as a first-phase negative control pin, determine a suspected second-phase positive pin 23 as a second-phase negative control pin, and determine a suspected second-phase negative pin 24 as a second-phase positive control pin when a difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is smaller than the second brightness value. Specifically, the pin determination module may perform step S504.
The pin determination module may also be configured to determine the suspected first-phase positive pin 21 as a first-phase negative control pin, determine the suspected first-phase negative pin 22 as a first-phase positive control pin, determine the suspected second-phase positive pin 23 as a second-phase positive control pin, and determine the suspected second-phase negative pin 24 as a second-phase negative control pin when a difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is smaller than the second brightness value.
The reset module is configured to reset the suspected first-phase positive pin 21, the suspected first-phase negative pin 22, the suspected second-phase positive pin 23, and the suspected second-phase negative pin 24 of the pre-determined stepping motor 20 when the difference between the first brightness value and the second brightness value is smaller than the preset first threshold.
To sum up, the method and apparatus for identifying a control pin of a stepper motor according to the preferred embodiment of the present invention: sending a first sequence of pulse signals to a suspected first phase positive pin, a suspected first phase negative pin, a suspected second phase positive pin and a suspected second phase negative pin of a preset stepping motor for adjusting the size of the aperture, acquiring a first brightness value of an image presented by an imaging plate corresponding to the position of the aperture after sending the first sequence of pulse signals, sending a second sequence of pulse signals to the suspected first phase positive pin, the suspected first phase negative pin, the suspected second phase positive pin and the suspected second phase negative pin of the preset stepping motor for adjusting the size of the aperture, acquiring a second brightness value of the image presented on the imaging plate corresponding to the position of the aperture after sending the second sequence of pulse signals, and adjusting the direction of the first sequence of pulse signals and the adjusting direction of the second sequence of pulse signals according to the first brightness value, the second brightness value, the adjusting direction of the first sequence of pulse signals and the adjusting direction of the second sequence of pulse signals, confirm actual first looks positive control pin, first looks negative control pin, the positive control pin of second phase and the negative control pin of second phase of step motor, only confirm the actual control pin of step motor by controller automatic identification, convenient and fast, labour saving and time saving promotes user's experience and feels.
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 some 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, the functional modules in the embodiments 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 portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) 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 a preferred embodiment of the present invention and is not intended to limit the present invention, 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 invention shall be included in the protection scope of the present invention.

Claims (10)

1. A method for identifying a control pin of a stepping motor is characterized by comprising the following steps:
sending a first sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of a preset stepping motor for adjusting the size of the aperture;
after the first sequence of pulse signals are sent, acquiring a first brightness value of an image corresponding to the aperture;
sending a second sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of a preset stepping motor for adjusting the size of the aperture, wherein the second sequence pulse signal and the first sequence pulse signal are mutually reverse signals;
after the second sequence of pulse signals are sent, acquiring a second brightness value of the image corresponding to the aperture;
determining an actual first phase positive control pin, a first phase negative control pin, a second phase positive control pin and a second phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, the adjustment direction of the first sequence pulse signal and the adjustment direction of the second sequence pulse signal;
wherein the adjustment direction is a direction of change of the aperture size.
2. The identification method of a stepping motor control pin according to claim 1, wherein the first sequence of pulse signals is a sequence of pulse signals for adjusting the aperture to be larger, and the second sequence of pulse signals is a sequence of pulse signals for adjusting the aperture to be smaller;
the step of determining the actual first phase positive control pin, first phase negative control pin, second phase positive control pin and second phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, the adjustment direction of the first sequence pulse signal and the adjustment direction of the second sequence pulse signal comprises:
when the difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is greater than the second brightness value,
determining the suspected first-phase positive pin as the first-phase positive control pin, determining the suspected first-phase negative pin as the first-phase negative control pin, determining the suspected second-phase positive pin as the second-phase positive control pin, and determining the suspected second-phase negative pin as the second-phase negative control pin.
3. The method of claim 2, wherein the step of determining the actual first phase positive control pin, first phase negative control pin, second phase positive control pin and second phase negative control pin of the stepper motor based on the first brightness value, the second brightness value, the adjustment direction of the first sequence of pulse signals and the adjustment direction of the second sequence of pulse signals further comprises:
when the difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is less than the second brightness value,
determining the suspected first-phase positive pin as the first-phase positive control pin, determining the suspected first-phase negative pin as the first-phase negative control pin, determining the suspected second-phase positive pin as the second-phase negative control pin, and determining the suspected second-phase negative pin as the second-phase positive control pin.
4. The method of claim 2, wherein the step of determining the actual first phase positive control pin, first phase negative control pin, second phase positive control pin and second phase negative control pin of the stepper motor based on the first brightness value, the second brightness value, the adjustment direction of the first sequence of pulse signals and the adjustment direction of the second sequence of pulse signals further comprises:
when the difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is less than the second brightness value,
determining the suspected first-phase positive pin as the first-phase negative control pin, determining the suspected first-phase negative pin as the first-phase positive control pin, determining the suspected second-phase positive pin as the second-phase positive control pin, and determining the suspected second-phase negative pin as the second-phase negative control pin.
5. The method of claim 2, wherein the step of determining the actual first phase positive control pin, first phase negative control pin, second phase positive control pin and second phase negative control pin of the stepper motor based on the first brightness value, the second brightness value, the adjustment direction of the first sequence of pulse signals and the adjustment direction of the second sequence of pulse signals further comprises:
when the difference value between the first brightness value and the second brightness value is smaller than a preset first threshold value, resetting the suspected first-phase positive pin, the suspected first-phase negative pin, the suspected second-phase positive pin and the suspected second-phase negative pin of the step motor which are preset.
6. An apparatus for identifying a control pin of a stepping motor, comprising:
a signal transmission unit: the device comprises a step motor, a first sequence pulse signal generator, a second sequence pulse signal generator and a control circuit, wherein the step motor is used for sending a first sequence pulse signal to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin and a suspected second-phase negative pin of the preset step motor for adjusting the size of an aperture;
the brightness acquisition unit: the first sequence pulse signal is used for acquiring a first brightness value of an image corresponding to the aperture after the first sequence pulse signal is sent;
the signal sending unit is further configured to send a second sequence of pulse signals to a suspected first-phase positive pin, a suspected first-phase negative pin, a suspected second-phase positive pin, and a suspected second-phase negative pin of a preset stepper motor for adjusting the size of the aperture, where the second sequence of pulse signals and the first sequence of pulse signals are reverse signals;
the brightness acquisition unit is further used for acquiring a second brightness value of an image presented on the imaging plate corresponding to the position of the aperture after the second sequence pulse signal is sent;
a pin determination unit, configured to determine an actual first-phase positive control pin, a first-phase negative control pin, a second-phase positive control pin, and a second-phase negative control pin of the stepping motor according to the first brightness value, the second brightness value, an adjustment direction of the first sequence pulse signal, and an adjustment direction of the second sequence pulse signal;
wherein the adjustment direction is a direction of change of the aperture size.
7. The apparatus as claimed in claim 6, wherein the first series of pulse signals is a series of pulse signals for adjusting the aperture to be larger, and the second series of pulse signals is a series of pulse signals for adjusting the aperture to be smaller;
the pin determination unit includes a pin determination module,
the pin determination module is configured to determine the suspected first-phase positive pin as the first-phase positive control pin, determine the suspected first-phase negative pin as the first-phase negative control pin, determine the suspected second-phase positive pin as the second-phase positive control pin, and determine the suspected second-phase negative pin as the second-phase negative control pin when a difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is greater than the second brightness value.
8. The identification device of a stepping motor control pin according to claim 7,
the pin determination module is further configured to determine the suspected first-phase positive pin as the first-phase positive control pin, determine the suspected first-phase negative pin as the first-phase negative control pin, determine the suspected second-phase positive pin as the second-phase negative control pin, and determine the suspected second-phase negative pin as the second-phase positive control pin when a difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold value and the first brightness value is smaller than the second brightness value.
9. The apparatus according to claim 7, wherein the pin determination module is further configured to determine the suspected first positive pin as the first negative control pin, determine the suspected first negative pin as the first positive control pin, determine the suspected second positive pin as the second positive control pin, and determine the suspected second negative pin as the second negative control pin when a difference between the first brightness value and the second brightness value is greater than or equal to a preset first threshold and the first brightness value is smaller than the second brightness value.
10. The identification device of the stepping motor control pin according to claim 7, wherein the pin determination unit includes a reset module,
the reset module is configured to reset the pre-determined suspected first-phase positive pin, the pre-determined suspected first-phase negative pin, the pre-determined suspected second-phase positive pin, and the pre-determined suspected second-phase negative pin of the stepping motor when a difference between the first brightness value and the second brightness value is smaller than a preset first threshold.
CN201811445483.0A 2018-11-29 2018-11-29 Identification method and device for control pin of stepping motor Active CN111246077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811445483.0A CN111246077B (en) 2018-11-29 2018-11-29 Identification method and device for control pin of stepping motor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811445483.0A CN111246077B (en) 2018-11-29 2018-11-29 Identification method and device for control pin of stepping motor

Publications (2)

Publication Number Publication Date
CN111246077A CN111246077A (en) 2020-06-05
CN111246077B true CN111246077B (en) 2021-06-22

Family

ID=70877785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811445483.0A Active CN111246077B (en) 2018-11-29 2018-11-29 Identification method and device for control pin of stepping motor

Country Status (1)

Country Link
CN (1) CN111246077B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010078754A (en) * 2008-09-25 2010-04-08 Nippon Seimitsu Sokki Kk Diaphragm device
CN102472952A (en) * 2009-07-17 2012-05-23 Nec显示器解决方案株式会社 Diaphragm control circuit, projector device, diaphragm control program, and diaphragm control method
CN103200368A (en) * 2013-01-18 2013-07-10 北京中远通科技有限公司 Industrial diaphragm control method
CN205071151U (en) * 2015-11-10 2016-03-02 北京爱耳目科技有限公司 Wireless camera and wireless camera system
CN207075049U (en) * 2017-05-09 2018-03-06 北京旷视科技有限公司 A kind of auto iris drive circuit and electronic installation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09149694A (en) * 1995-11-27 1997-06-06 Ricoh Co Ltd Electronic device
DE102014111675A1 (en) * 2014-08-15 2016-02-18 Dspace Digital Signal Processing And Control Engineering Gmbh Simulation device and method for simulating a connectable to a control device peripheral circuitry
CN207518500U (en) * 2017-11-30 2018-06-19 深圳市安尼数字技术有限公司 The driving circuit of stepper motor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010078754A (en) * 2008-09-25 2010-04-08 Nippon Seimitsu Sokki Kk Diaphragm device
CN102472952A (en) * 2009-07-17 2012-05-23 Nec显示器解决方案株式会社 Diaphragm control circuit, projector device, diaphragm control program, and diaphragm control method
CN103200368A (en) * 2013-01-18 2013-07-10 北京中远通科技有限公司 Industrial diaphragm control method
CN205071151U (en) * 2015-11-10 2016-03-02 北京爱耳目科技有限公司 Wireless camera and wireless camera system
CN207075049U (en) * 2017-05-09 2018-03-06 北京旷视科技有限公司 A kind of auto iris drive circuit and electronic installation

Also Published As

Publication number Publication date
CN111246077A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN109166156B (en) Camera calibration image generation method, mobile terminal and storage medium
EP2645334B1 (en) System and method for performing depth estimation by utilizing an adaptive kernel
CN108280828B (en) Camera assembly position detection method and device
CN110784624B (en) Demisting control method and device
CN110865835A (en) Configuration file updating method and device, computer equipment and storage medium
WO2020019944A1 (en) Intelligent analysis system, method and apparatus
CN104580891A (en) Method for terminal to take images
EP3098705A1 (en) Information processing apparatus, control method of information processing apparatus, and computer program
CN111246077B (en) Identification method and device for control pin of stepping motor
CN112233196A (en) Live broadcast room green screen detection method, device, equipment and storage medium
CN110290201B (en) Picture acquisition method, mobile terminal, server and storage medium
CN110049257B (en) Method for determining semi-synchronous exposure parameters and electronic device
CN109901716B (en) Sight point prediction model establishing method and device and sight point prediction method
US20170017442A1 (en) Charging processing system, charging processing method, and recording medium
US20150009414A1 (en) Image output apparatus, image output system, and image output control program
CN113790874A (en) Lens test system
CN104092946A (en) Image collection method and device
CN115033469A (en) Website system performance test method and device, equipment and storage medium
CN106844474B (en) Method and device for searching questions by photographing
CN111507931B (en) Data processing method and device
CN114067246A (en) Video annotation method, video annotation device, video model testing method, video annotation model testing device, electronic equipment and storage medium
US10872019B2 (en) Load and save recovery partition using mobile device
CN112995254A (en) Method, equipment, system, device and assembly for transmitting heartbeat information
CN107871305B (en) Picture quality rating method and device and terminal equipment
JP2020008982A (en) Plant monitoring device

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