CN116017130A - High-precision position comparison signal output method and device and fly shooting system - Google Patents

High-precision position comparison signal output method and device and fly shooting system Download PDF

Info

Publication number
CN116017130A
CN116017130A CN202211710146.6A CN202211710146A CN116017130A CN 116017130 A CN116017130 A CN 116017130A CN 202211710146 A CN202211710146 A CN 202211710146A CN 116017130 A CN116017130 A CN 116017130A
Authority
CN
China
Prior art keywords
motor
module
programmable gate
gate array
field programmable
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.)
Pending
Application number
CN202211710146.6A
Other languages
Chinese (zh)
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.)
Suzhou Linkhou Robot Co ltd
Original Assignee
Suzhou Linkhou Robot 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 Suzhou Linkhou Robot Co ltd filed Critical Suzhou Linkhou Robot Co ltd
Priority to CN202211710146.6A priority Critical patent/CN116017130A/en
Publication of CN116017130A publication Critical patent/CN116017130A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Control Of Position Or Direction (AREA)

Abstract

The invention discloses a high-precision position comparison signal output method and device and a fly shooting system. The method comprises the following steps: the micro control unit module polls and acquires the actual position of the motor in the current period according to the preset period, and calculates the actual position of the motor acquired in the next polling period by combining the actual speed of the motor; the micro control unit module compares the actual position of the motor acquired in the next polling period with a preset position, calculates delay time if the preset position is smaller than the actual position of the motor acquired in the next polling period, and sends out a delay control signal; and after receiving the delay control signal, the field programmable gate array module delays according to the delay time and outputs a pulse signal to trigger the photographing module after the delay is finished. The technical scheme of the embodiment of the invention can realize high-precision position comparison signal output, meet the real-time requirement of general application, and can not occupy more micro control unit modules and field programmable gate array module resources.

Description

High-precision position comparison signal output method and device and fly shooting system
Technical Field
The present invention relates to the field of aerial photographing technologies, and in particular, to a method and an apparatus for outputting a high-precision position comparison signal, and an aerial photographing system.
Background
The aerial photography is used for triggering the light source controller and the industrial camera, and the aerial photography is used for taking photos in the high-speed running process of the motor, and the application has certain requirements on the output precision of the position comparison signal.
A common method for outputting a position comparison signal is that a main Micro Control Unit (MCU) chip directly outputs the position comparison signal, the main MCU polls for obtaining the current actual position information in a fixed period (generally 62.5 us), compares the actual position with a user set position, and outputs a pulse signal to trigger a light source controller and an industrial camera once the actual position is detected to be more than or equal to the user set position. The method has simple and easy realization program, occupies only a small amount of MCU resources, and has lag in outputting pulse signals. The reason for the lag is that when the actual position reaches the user set position, the MCU cannot immediately acquire the actual position, must wait until the next polling period to acquire the actual position information, and then output a pulse signal to form the lag.
Another common method for outputting a position comparison signal is that a Field Programmable Gate Array (FPGA) chip directly outputs the position comparison signal, the FPGA obtains the current actual position information (applicable to an incremental encoder) in real time, compares the actual position with a user set position, and outputs a pulse signal to trigger a light source controller and an industrial camera once the actual position is detected to be greater than or equal to the user set position. The method has good real-time performance and high precision of the output pulse signals, but occupies more FPGA resources, because the FPGA calculates the current actual position at any moment, and meanwhile, the current actual position is compared with the position set by the user, the pulse signals are output according to the comparison result, and more FPGA resources are occupied.
Disclosure of Invention
The invention provides a high-precision position comparison signal output method, a high-precision position comparison signal output device and a fly shooting system, which are used for realizing high-precision position comparison signal output, meeting the real-time requirement of general application and not occupying more micro control unit modules and field programmable gate array module resources.
According to an aspect of the present invention, there is provided a high-precision position comparison signal output method, characterized by being performed by a high-precision position comparison signal output device including a field programmable gate array module and a micro control unit module, the method comprising:
the micro control unit module polls and acquires the actual position of the motor in the current period according to a preset period;
the micro control unit module calculates the actual position of the motor acquired in the next polling period according to the actual position of the motor in the current period and the actual speed of the motor;
the micro control unit module compares the actual position of the motor acquired in the next polling period with a preset position, if the preset position is smaller than the actual position of the motor acquired in the next polling period, the delay time is calculated according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and a delay control signal is sent to the field programmable gate array module;
and after receiving the delay control signal, the field programmable gate array module delays according to the delay time and outputs a pulse signal to trigger the photographing module after the delay is finished.
Optionally, before the micro control unit module polls to acquire the actual position of the motor in the current period in a preset period, the method further comprises:
the field programmable gate array module controls the encoder module to sample the current position of the motor; the sampling signal is a differential signal;
the field programmable gate array module controls the encoder module to convert the differential signals into TTL level signals and transmit the TTL level signals to the field programmable gate array module;
the field programmable gate array module calculates the current position information of the motor according to the TTL level signal and transmits the current position information to the micro control unit module.
Optionally, before the micro control unit module calculates the actual position of the motor acquired in the next polling period according to the actual position of the motor and the actual speed of the motor in the current period, the method further includes:
and the micro control unit module calculates the actual speed of the motor according to the actual position of the motor in the current period, the actual position of the motor acquired last time and the preset period.
Optionally, the photographing module comprises a camera and a light source controller; after receiving the delay control signal, the field programmable gate array module delays according to the delay time, and outputs a pulse signal to trigger the photographing module after the delay is finished, wherein the photographing module comprises:
after receiving the delay control signal, the field programmable gate array module delays according to the delay time;
the field programmable gate array module outputs pulse signals to the light source controller and the camera after the delay is finished, triggers the camera to take a picture, triggers the light source controller to shine when the camera takes a picture, and controls the light source controller to stop shining after the camera takes a picture.
Optionally, after the field programmable gate array module outputs a pulse signal to the light source controller and the camera after the delay is finished, triggering the camera to take a picture, triggering the light source controller to perform lighting when the camera takes a picture, and after the camera takes a picture, controlling the light source controller to stop lighting, further comprising:
and adjusting the delay time according to the definition of the picture photographed by the camera.
According to another aspect of the present invention, there is provided a high-precision position comparison signal output apparatus, characterized by comprising an encoder module, a micro control unit module, and a field programmable gate array module:
the encoder module is connected with the field programmable gate array module and is used for detecting the current position of the motor and outputting a motor position signal to the field programmable gate array module;
the micro-control unit module is connected with the field programmable gate array module and is used for acquiring the actual position of the motor in the current period through polling in a preset period; according to the actual position of the motor and the actual speed of the motor in the current period, calculating the actual position of the motor acquired in the next polling period; the method comprises the steps of acquiring the actual position of a motor in a next polling period, comparing the actual position of the motor acquired in the next polling period with a preset position, calculating delay time according to the preset position, the actual position of the motor in the current period and the actual speed of the motor if the preset position is smaller than the actual position of the motor acquired in the next polling period, and sending a delay control signal to a field programmable gate array module;
the field programmable gate array module is used for delaying according to delay time after receiving the delay control signal and outputting a pulse signal to trigger the photographing module after the delay is finished.
Optionally, the encoder module comprises:
the external encoder is connected with the power supply and the signal isolation protection circuit and is used for sampling the position information of the motor and converting the position information into differential signals to be output;
the power supply and signal isolation protection circuit is connected with the external encoder and the level signal conversion circuit and is used for electrically isolating the differential signals output by the external encoder from the internal sampling circuit so as to avoid mutual interference;
the level signal conversion circuit is connected with the field programmable gate array module and is used for converting the differential signals into TTL level signals and outputting the TTL level signals to the field programmable gate array module.
Optionally, the method further comprises:
the position comparison signal shaping circuit is connected with the field programmable gate array module and is used for level conversion and output filtering so as to reduce noise interference;
the position comparison signal output isolation circuit is connected with the position comparison signal shaping circuit and is used for isolating the internal signal output circuit from the external light source controller and the camera so as to avoid mutual interference;
and the position comparison signal output interface circuit is connected with the position comparison signal output isolation circuit and is used for being connected with an external light source controller and the camera.
Optionally, the position comparison signal output isolation circuit further includes:
the high-speed optical coupling isolation circuit is connected with the position comparison signal shaping circuit and the position comparison signal output interface circuit and is used for isolating the internal signal output circuit from the external light source controller and the camera so as to avoid mutual interference;
the signal loop detection circuit is connected with the position comparison signal shaping circuit and the position comparison signal output interface circuit and is used for judging and fine-tuning the delay time and detecting the on time of the high-speed optical coupler isolation circuit according to whether the photo shot by the camera is clear or not.
According to another aspect of the present invention, there is provided a fly-swatting system comprising a high-precision position comparison signal output device according to the second aspect of the present invention, further comprising: the photographing module and the motor are connected with the micro-control unit module; the photographing module is connected with the position comparison signal output interface circuit and further comprises a light source controller and a camera;
the light source controller is used for lighting while the camera takes a picture and extinguishing after the camera takes a picture;
and the camera is used for taking pictures at preset positions.
According to the technical scheme, the actual position of the motor in the current period is obtained through polling of the micro-control unit module, the actual position of the motor in the next polling period is calculated, whether the actual position of the motor in the current period reaches a preset position or not is judged, delay time is calculated, a delay control signal is sent to the field programmable gate array module, the field programmable gate array module delays, and a pulse signal is immediately output to trigger the camera module to take a picture at the preset position; the micro control unit module and the field programmable gate array module are matched together, the field programmable gate array module outputs pulse signals in real time, the insufficient precision caused by signal lag can not occur, the high-precision position comparison signal output can be realized, the real-time requirement of common application is met, and more micro control unit modules and field programmable gate array module resources can not be occupied.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a high-precision position comparison signal output method provided by an embodiment of the invention;
FIG. 2 is a flowchart of another method for outputting a high-precision position comparison signal according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for outputting a high-precision position comparison signal according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a high-precision position comparison signal output device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another high-precision position comparison signal output device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a fly-swatter system according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention provides a high-precision position comparison signal output method which can be executed by a high-precision position comparison signal output device and is suitable for snapshot photos in the high-speed running process of a motor. The high-precision position comparison signal output device comprises a field programmable gate array module and a micro-control unit module, can be realized in a hardware and/or software mode, and can be integrated in a processor. Fig. 1 is a flowchart of a high-precision position comparison signal output method provided by an embodiment of the present invention, referring to fig. 1, the method includes:
s101, the micro control unit module polls and acquires the actual position of the motor in the current period according to a preset period.
Specifically, the preset period is determined by the performance of the micro-control unit module and the motor control performance, and in general, the higher the performance of the micro-control unit module is, the shorter the period time can be, and the stronger the motor control performance is. And the polling or micro-control unit module sends out an inquiry to the field programmable gate array module according to the preset period, and acquires and updates the actual position of the motor in the current period.
S102, the micro-control unit module calculates the actual position of the motor acquired in the next polling period according to the actual position of the motor and the actual speed of the motor in the current period.
For example, the actual position of the motor in the current period is α, the actual speed of the motor is β, and the actual position γ=α+β×the preset period of the motor acquired in the next polling period may be calculated. When the motor is in a uniform motion state, the accuracy of the output signal of the method is higher, but when the motor is in an acceleration and deceleration motion state, the accuracy of the output signal is reduced, because the actual speed beta of the motor is continuously changed in the acceleration and deceleration state.
And S103, comparing the actual position of the motor acquired in the next polling period with a preset position by the micro-control unit module, if the preset position is smaller than the actual position of the motor acquired in the next polling period, calculating the delay time according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and sending a delay control signal to the field programmable gate array module.
Specifically, the preset position is a position where the motor needs to be photographed, and the preset position can be set according to photographing requirements. The micro control unit module compares the actual position of the motor acquired in the next polling period with a preset position, and if the preset position is smaller than the actual position of the motor acquired in the next polling period, the actual position of the motor can reach the preset position in the current period. And calculating a difference delta between the preset position and the actual position of the motor in the current period, and calculating delay time epsilon=delta/beta by combining the actual speed of the motor, wherein the delay time epsilon is calculated after the delay time epsilon from the moment that the preset position is detected to be smaller than the actual position gamma of the motor acquired in the next polling period, and the actual position of the motor in the current period can reach the preset position. And the micro control unit module sends a delay control signal to the field programmable gate array module after calculating the delay time to inform the field programmable gate array module of starting delay.
S104, after receiving the delay control signal, the field programmable gate array module delays according to the delay time, and outputs a pulse signal to trigger the photographing module after the delay is finished.
Specifically, after receiving the delay control signal, the field programmable gate array module delays according to the delay time epsilon, and immediately outputs a pulse signal to the photographing module after the delay is finished, and triggers the photographing module to photograph at a preset position.
According to the technical scheme, the actual position of the motor in the current period is obtained through polling of the micro-control unit module, the actual position of the motor in the next polling period is calculated, whether the actual position of the motor in the current period reaches a preset position in the current period is judged, delay time is calculated, a delay control signal is sent to the field programmable gate array module, the field programmable gate array module delays, and a pulse signal is immediately output to trigger the camera module to take a picture at the preset position; the micro control unit module and the field programmable gate array module are matched together, the field programmable gate array module outputs pulse signals in real time, the insufficient precision caused by signal lag can not occur, the high-precision position comparison signal output can be realized, and the real-time requirement of general application is met; the field programmable gate array module is selected to output pulse signals, and the micro control unit module is not selected to output pulse signals, because if the micro control unit module outputs pulse signals, at least 1 timer peripheral is needed to be added, 1 corresponding interrupt service function is needed to be added, the pulse output function can be realized, more micro control unit module resources are occupied, the field programmable gate array module is selected to output pulse signals instead, and for the field programmable gate array module, only 1 output pulse signal is added, so that more resources are not occupied, and more micro control unit modules and field programmable gate array module resources are avoided.
Fig. 2 is a flowchart of another high-precision position comparison signal output method according to an embodiment of the present invention, optionally, referring to fig. 2, the method includes:
s201, a field programmable gate array module controls an encoder module to sample the current position of a motor; wherein the sampling signal is a differential signal.
Specifically, the encoder module samples the current position of the motor and converts the sampled information into a differential signal for output.
S202, the field programmable gate array module controls the encoder module to convert the differential signals into TTL level signals and transmit the TTL level signals to the field programmable gate array module.
Specifically, the voltage range of the differential signal output by the encoder module is [ ±3v, ±6v ], which cannot be processed by the field programmable gate array module, so that the encoder module is required to convert the differential signal into a TTL level signal and then transmit the TTL level signal to the field programmable gate array module for processing.
S203, the field programmable gate array module calculates the current position information of the motor according to the TTL level signal and transmits the current position information to the micro-control unit module.
Specifically, the field programmable gate array module analyzes and calculates the current position information of the motor according to the TTL level signal and transmits the current position information to the micro control unit module in real time.
S204, the micro control unit module polls and acquires the actual position of the motor in the current period according to the preset period.
S205, the micro-control unit module calculates the actual speed of the motor according to the actual position of the motor in the current period, the actual position of the motor acquired last time and the preset period.
Specifically, the actual position of the motor acquired last time is the actual position of the motor acquired at the time of the last polling period. The actual speed of the motor may be obtained by dividing the difference between the actual position of the motor in the current period and the last acquired actual position of the motor by the preset period.
S206, the micro-control unit module calculates the actual position of the motor acquired in the next polling period according to the actual position of the motor and the actual speed of the motor in the current period.
S207, the micro-control unit module compares the actual position of the motor acquired in the next polling period with a preset position, if the preset position is smaller than the actual position of the motor acquired in the next polling period, the delay time is calculated according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and a delay control signal is sent to the field programmable gate array module.
S208, after receiving the delay control signal, the field programmable gate array module delays according to the delay time, and outputs a pulse signal to trigger the photographing module after the delay is finished.
According to the technical scheme, the actual position of the motor in the current period is obtained through polling of the micro-control unit module, the actual position of the motor in the next polling period is calculated, whether the actual position of the motor in the current period reaches a preset position in the current period is judged, delay time is calculated, a delay control signal is sent to the field programmable gate array module, the field programmable gate array module delays, and a pulse signal is immediately output to trigger the camera module to take a picture at the preset position; the micro control unit module and the field programmable gate array module are matched together, the field programmable gate array module outputs pulse signals in real time, the insufficient precision caused by signal lag can not occur, the high-precision position comparison signal output can be realized, the real-time requirement of common application is met, and more micro control unit modules and field programmable gate array module resources can not be occupied.
Fig. 3 is a flowchart of still another high-precision position comparison signal output method according to an embodiment of the present invention, optionally, the photographing module includes a camera and a light source controller, and referring to fig. 3, the method includes:
s301, the micro control unit module polls and acquires the actual position of the motor in the current period according to a preset period.
S302, the micro-control unit module calculates the actual position of the motor acquired in the next polling period according to the actual position of the motor and the actual speed of the motor in the current period.
S303, the micro-control unit module compares the actual position of the motor acquired in the next polling period with a preset position, if the preset position is smaller than the actual position of the motor acquired in the next polling period, the delay time is calculated according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and a delay control signal is sent to the field programmable gate array module.
S304, after receiving the delay control signal, the field programmable gate array module delays according to the delay time.
S305, the field programmable gate array module outputs pulse signals to the light source controller and the camera after the delay is finished, the camera is triggered to take a picture, meanwhile, the light source controller is triggered to shine when the camera takes a picture, and the light source controller is controlled to stop shining after the camera takes a picture.
Specifically, the light source controller comprises an LED lamp, and the light source controller is used for controlling the on and off of the LED lamp so as to shine when the camera shoots, so that the photos shot by the camera are clearer. The field programmable gate array module outputs pulse signals to the light source controller and the camera after the delay is finished, the camera is triggered to take a picture at a preset position, meanwhile, the light source controller is triggered to control the LED lamp to be turned on, the camera is used for taking a picture, and after the camera is finished, the light source controller is controlled to extinguish the LED lamp to stop the lighting.
S306, adjusting the delay time according to the definition of the photo photographed by the camera.
Specifically, the high-precision position comparison signal output device further comprises a signal loop detection circuit, and the delay time can be adjusted according to the definition of photographing of the camera through the signal loop detection circuit and a corresponding debugging program, namely the delay time epsilon is simply increased or reduced, so that the position comparison signal output precision is further improved.
According to the technical scheme, the actual position of the motor in the current period is obtained through polling of the micro-control unit module, the actual position of the motor in the next polling period is calculated, whether the actual position of the motor in the current period reaches a preset position in the current period is judged, delay time is calculated, a delay control signal is sent to the field programmable gate array module, the field programmable gate array module delays, and a pulse signal is immediately output to trigger the camera module to take a picture at the preset position; the micro control unit module and the field programmable gate array module are matched together, the field programmable gate array module outputs pulse signals in real time, the insufficient precision caused by signal lag can not occur, the high-precision position comparison signal output can be realized, the real-time requirement of common application is met, and more micro control unit modules and field programmable gate array module resources can not be occupied. In addition, the signal loop detection circuit is also arranged to adjust the delay time, so that the position comparison signal output precision is further improved, and the definition of the photo shot by the camera is higher.
The embodiment of the invention also provides a high-precision position comparison signal output device which is used for realizing the high-precision position comparison signal output method in any embodiment; fig. 4 is a schematic structural diagram of a high-precision position comparison signal output device provided by an embodiment of the present invention, referring to fig. 4, the device includes an encoder module 1, a micro control unit module 2 and a field programmable gate array module 3:
the encoder module 1 is connected with the field programmable gate array module 3, and the encoder module 1 is used for detecting the current position of the motor and outputting a motor position signal to the field programmable gate array module 3;
the micro control unit module 2 is connected with the field programmable gate array module 3, and the micro control unit module 2 is used for acquiring the actual position of the motor in the current period through polling in a preset period; according to the actual position of the motor and the actual speed of the motor in the current period, calculating the actual position of the motor acquired in the next polling period; the method is also used for comparing the actual position of the motor acquired in the next polling period with a preset position, if the preset position is smaller than the actual position of the motor acquired in the next polling period, calculating delay time according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and sending a delay control signal to the field programmable gate array module 3;
the field programmable gate array module 3 is used for delaying according to delay time after receiving the delay control signal, and outputting a pulse signal to trigger the photographing module after the delay is finished.
Specifically, the encoder module 1 is configured to detect a current position of the motor and output a motor position signal to the field programmable gate array module 3. The field programmable gate array module 3 analyzes and calculates the current position information of the motor according to the motor position signal and transmits the current position information to the micro-control unit module 2. The micro control unit module 2 is used for polling the field programmable gate array module 3 in a preset period to acquire the actual position of the motor in the current period. The micro control unit module 2 is further configured to calculate an actual speed of the motor, and calculate an actual position of the motor acquired in a next polling period according to the actual position of the motor in the current period and the actual speed of the motor. The micro control unit module 2 is further configured to compare the actual position of the motor obtained in the next polling period with a preset position, and if the preset position is smaller than the actual position of the motor obtained in the next polling period, indicate that the actual position of the motor in the current period will reach the preset position in the current period; the micro control unit module 2 calculates delay time according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and sends a delay control signal to the field programmable gate array module 3. The field programmable gate array module 3 is used for delaying according to delay time after receiving the delay control signal, and immediately outputting a pulse signal after the delay is finished to trigger the photographing module to photograph at a preset position. The micro control unit module 2 and the field programmable gate array module 3 are communicated in a parallel port bus mode, the frequency is 100MHz, nanosecond-level delay has little influence on photographing of a general camera, and the delay can be ignored.
According to the technical scheme, the micro control unit module and the field programmable gate array module are matched together, the micro control unit module is used for calculating and controlling a motor, the field programmable gate array module is used for processing output signals of the encoder module and outputting pulse signals in real time, high-precision position comparison signal output can be achieved, real-time requirements of general application are met, and more micro control unit modules and field programmable gate array module resources are not occupied.
Fig. 5 is a schematic structural diagram of another high-precision position comparison signal output device according to an embodiment of the present invention, optionally, referring to fig. 5, the encoder module 1 includes:
the external encoder 11, the external encoder 11 is connected with the power supply and signal isolation protection circuit 12, the external encoder 11 is used for sampling the motor position information and converting the motor position information into differential signals for output;
the power supply and signal isolation protection circuit 12, the power supply and signal isolation protection circuit 12 is connected with the external encoder 11 and the level signal conversion circuit 13, and the power supply and signal isolation protection circuit 12 is used for electrically isolating the differential signal output by the external encoder 11 from the internal sampling circuit so as to avoid mutual interference;
the level signal conversion circuit 13, the level signal conversion circuit 13 is connected with the field programmable gate array module 3, and the level signal conversion circuit 13 is used for converting the differential signal into a TTL level signal and outputting the TTL level signal to the field programmable gate array module 3.
Specifically, two factors of the running speed of the motor and the resolution of the encoder module 1 are comprehensively considered, and the circuit requirement rate of the encoder module 1 is not lower than 10Mbps, so that the requirements of most application scenes can be met; if the number is less than 10Mbps, the encoder module 1 may not correctly acquire the position information in a scene where the motor operates at a high speed or the resolution of the encoder module 1 is high, resulting in malfunction.
With continued reference to fig. 5, the high-precision position comparison signal output apparatus further includes:
the position comparison signal shaping circuit 4 is connected with the field programmable gate array module 3, and the position comparison signal shaping circuit 4 is used for level conversion and output filtering so as to reduce noise interference;
the position comparison signal output isolation circuit 5 is connected with the position comparison signal shaping circuit 4, and the position comparison signal output isolation circuit 5 is used for isolating the internal signal output circuit from the external light source controller and the camera so as to avoid mutual interference;
the position comparison signal output interface circuit 6 is connected with the position comparison signal output isolation circuit 5, and the position comparison signal output interface circuit 6 is used for being connected with an external light source controller and a camera.
Specifically, the position comparison signal shaping circuit 4 is used for level conversion, the output level of the field programmable gate array module 3 is generally 3.3V, and the output level is converted into 5V by the position comparison signal shaping circuit 4, so as to adapt to the power supply requirement of the peripheral electrical appliance. And the position comparison signal shaping circuit 4 is also used for increasing output RC filtering and reducing noise interference. The position comparison signal output isolation circuit 5 further includes a high-speed optocoupler isolation circuit 51 and a signal loop detection circuit 52. The high-speed optocoupler isolation circuit 51 is connected with the position comparison signal shaping circuit 4 and the position comparison signal output interface circuit 6, and the high-speed optocoupler isolation circuit 51 is used for isolating the internal signal output circuit from the external light source controller and the camera so as to avoid mutual interference. The signal loop detection circuit 52, the signal loop detection circuit 52 is connected with the position comparison signal shaping circuit 4 and the position comparison signal output interface circuit 6, and the signal loop detection circuit 52 is used for judging and fine tuning the delay time and detecting the on time of the high-speed optocoupler isolation circuit 51 according to whether the photo shot by the camera is clear or not. The signal output optocoupler isolation circuit 5 requires that the speed should not be lower than 1Mbps, and the consistency of the on-time delay of the optocoupler is good, so that the time delay of the optocoupler can be subtracted in advance in a program to obtain higher precision. The good consistency of the on-time delay of the optocouplers means that if the high-speed optocouplers adopted by the signal output optocoupler isolation circuit 5 receive signals from the primary side to the secondary side and the fixed time delay is 0.8us, when the field programmable gate array module 3 receives the time delay epsilon of the micro control unit module 2, pulse signals are output after the time delay epsilon-0.8 us immediately, the on-time delay of the optocouplers is counteracted, and the output pulse precision is higher; in the production process of each optocoupler, parameters cannot be completely consistent, conduction delay is different, at the moment, manufacturers are required to meet the consistency of the conduction delay of each optocoupler as much as possible when producing the optocouplers, and the parameters are fixed to be about 0.8us and cannot deviate too much. The position comparison signal output interface circuit 6 is used for being connected with an external light source controller and a camera, the position comparison signal output interface circuit 6 is a standard DB15 connector interface, external wiring is facilitated, and when the camera is used, only two wires are welded to be connected with the external light source and the camera.
The embodiment of the invention also provides a fly-swatting system, fig. 6 is a schematic structural diagram of the fly-swatting system provided by the embodiment of the invention, and referring to fig. 6, the apparatus includes the high-precision position comparison signal output device according to any embodiment, and further includes: the photographing module 7 and the motor 8, and the motor 8 is connected with the micro-control unit module 2; the photographing module 7 is connected with the position comparison signal output interface circuit 6, and the photographing module 7 further comprises a light source controller 71 and a camera 72;
a light source controller 71 for lighting while photographing by the camera 72 and extinguishing after photographing by the camera 72 is completed;
a camera 72 for taking a picture at a preset position.
Specifically, the light source controller 71 includes an LED lamp, and the light source controller 71 is configured to control the LED lamp to be turned on and off so as to shine when the camera 72 takes a picture, so that the picture taken by the camera 72 is clearer. When the camera 72 takes a picture at a preset position, the light source controller 71 controls the LED lamp to be turned on, lights the camera 72 when taking a picture, and controls the LED lamp to be turned off to stop lighting after the camera 72 takes a picture.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A high-precision position comparison signal output method, characterized by being performed by a high-precision position comparison signal output device including a field programmable gate array module and a micro control unit module, the method comprising:
the micro control unit module polls and acquires the actual position of the motor in the current period according to a preset period;
the micro control unit module calculates the actual position of the motor acquired in the next polling period according to the actual position of the motor and the actual speed of the motor in the current period;
the micro control unit module compares the actual position of the motor acquired in the next polling period with a preset position, if the preset position is smaller than the actual position of the motor acquired in the next polling period, the delay time is calculated according to the preset position, the actual position of the motor in the current period and the actual speed of the motor, and a delay control signal is sent to the field programmable gate array module;
and after receiving the delay control signal, the field programmable gate array module delays according to the delay time and outputs a pulse signal to trigger the photographing module after the delay is finished.
2. The method of claim 1, further comprising, prior to the microcontroller unit module polling for the actual position of the motor during the current period at a preset period:
the field programmable gate array module controls an encoder module to sample the current position of the motor; the sampling signal is a differential signal;
the field programmable gate array module controls the encoder module to convert the differential signals into TTL level signals and transmit the TTL level signals to the field programmable gate array module;
and the field programmable gate array module calculates the current position information of the motor according to the TTL level signal and transmits the current position information to the micro control unit module.
3. The method of claim 1, further comprising, before the micro control unit module calculates the actual position of the motor acquired in the next polling period from the actual position of the motor and the actual speed of the motor in the current period:
and the micro control unit module calculates the actual speed of the motor according to the actual position of the motor in the current period, the last acquired actual position of the motor and the preset period.
4. The method of claim 1, wherein the photographing module comprises a camera and a light source controller; after receiving the delay control signal, the field programmable gate array module delays according to the delay time, and outputs a pulse signal to trigger the photographing module after the delay is finished, wherein the photographing module comprises:
after receiving the delay control signal, the field programmable gate array module delays according to the delay time;
and the field programmable gate array module outputs pulse signals to the light source controller and the camera after the delay is finished, triggers the camera to take a picture, triggers the light source controller to shine when the camera takes a picture, and controls the light source controller to stop shining after the camera takes a picture.
5. The method of claim 4, wherein after the field programmable gate array module outputs a pulse signal to the light source controller and the camera after the delay is completed, triggering the camera to take a picture, simultaneously triggering the light source controller to shine when the camera takes a picture, and controlling the light source controller to stop shining after the camera takes a picture, further comprising:
and adjusting the delay time according to the definition of the photo photographed by the camera.
6. The high-precision position comparison signal output device is characterized by comprising an encoder module, a micro-control unit module and a field programmable gate array module:
the encoder module is connected with the field programmable gate array module and is used for detecting the current position of the motor and outputting a motor position signal to the field programmable gate array module;
the micro control unit module is connected with the field programmable gate array module and is used for acquiring the actual position of the motor in the current period in a polling way in a preset period; according to the actual position of the motor and the actual speed of the motor in the current period, calculating the actual position of the motor acquired in the next polling period; the method comprises the steps of acquiring the actual position of a motor in a next polling period, comparing the actual position of the motor acquired in the next polling period with a preset position, calculating delay time according to the preset position, the actual position of the motor in the current period and the actual speed of the motor if the preset position is smaller than the actual position of the motor acquired in the next polling period, and sending a delay control signal to a field programmable gate array module;
the field programmable gate array module is used for delaying according to the delay time after receiving the delay control signal and outputting a pulse signal to trigger the photographing module after the delay is finished.
7. The apparatus of claim 6, wherein the encoder module comprises:
the external encoder is connected with the power supply and the signal isolation protection circuit and is used for sampling the position information of the motor and converting the position information into differential signals to be output;
the power supply and signal isolation protection circuit is connected with the external encoder and the level signal conversion circuit and is used for electrically isolating the differential signals output by the external encoder from the internal sampling circuit so as to avoid mutual interference;
the level signal conversion circuit is connected with the field programmable gate array module and is used for converting the differential signal into a TTL level signal and outputting the TTL level signal to the field programmable gate array module.
8. The apparatus as recited in claim 6, further comprising:
the position comparison signal shaping circuit is connected with the field programmable gate array module and is used for level conversion and output filtering so as to reduce noise interference;
the position comparison signal output isolation circuit is connected with the position comparison signal shaping circuit and is used for isolating the internal signal output circuit from the external light source controller and the camera so as to avoid mutual interference;
the position comparison signal output interface circuit is connected with the position comparison signal output isolation circuit and is used for being connected with an external light source controller and a camera.
9. The apparatus of claim 8, wherein the position comparison signal output isolation circuit further comprises:
the high-speed optical coupler isolation circuit is connected with the position comparison signal shaping circuit and the position comparison signal output interface circuit and is used for isolating the internal signal output circuit from the external light source controller and the camera so as to avoid mutual interference;
the signal loop detection circuit is connected with the position comparison signal shaping circuit and the position comparison signal output interface circuit, and is used for judging and fine-tuning the delay time and detecting the conduction time of the high-speed optocoupler isolation circuit according to whether the photo shot by the camera is clear or not.
10. A fly-swatting system comprising a high precision position comparison signal output device as claimed in claims 6-9, further comprising: the shooting module and the motor are connected with the micro-control unit module; the photographing module is connected with the position comparison signal output interface circuit and further comprises a light source controller and a camera;
the light source controller is used for lighting while the camera takes a picture and extinguishing after the camera takes a picture;
and the camera is used for taking pictures at preset positions.
CN202211710146.6A 2022-12-29 2022-12-29 High-precision position comparison signal output method and device and fly shooting system Pending CN116017130A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211710146.6A CN116017130A (en) 2022-12-29 2022-12-29 High-precision position comparison signal output method and device and fly shooting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211710146.6A CN116017130A (en) 2022-12-29 2022-12-29 High-precision position comparison signal output method and device and fly shooting system

Publications (1)

Publication Number Publication Date
CN116017130A true CN116017130A (en) 2023-04-25

Family

ID=86026361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211710146.6A Pending CN116017130A (en) 2022-12-29 2022-12-29 High-precision position comparison signal output method and device and fly shooting system

Country Status (1)

Country Link
CN (1) CN116017130A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800246A (en) * 2023-06-09 2023-09-22 陕西星环聚能科技有限公司 Isolation circuit and fusion shooting device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800246A (en) * 2023-06-09 2023-09-22 陕西星环聚能科技有限公司 Isolation circuit and fusion shooting device
CN116800246B (en) * 2023-06-09 2024-04-09 陕西星环聚能科技有限公司 Isolation circuit and fusion shooting device

Similar Documents

Publication Publication Date Title
CN213092100U (en) Exposure system
US8326141B1 (en) Systems and methods for changing power states of a remote device using one or more camera body controls and a preset delay
CN104954692B (en) The method and device of camera shooting is controlled by terminal device
CN108781259B (en) Image shooting control method, control device and control system
CN116017130A (en) High-precision position comparison signal output method and device and fly shooting system
US9706096B2 (en) Method for taking photo with extension flash module of mobile device
JP2003274251A (en) System for capture many camera images at roughly the same time
EP2665252A2 (en) Image pickup apparatus, lens apparatus, and image pickup system
JP2000111790A (en) Autofocusing device
CN102457679A (en) Imaging apparatus and accessory, and method and system of the same
WO2017133087A1 (en) Photographing control apparatus and auxiliary flash control apparatus
JP2017506740A (en) Depth information extraction apparatus and method
EP3820140A1 (en) Time-division-multiplexing-based light-supplementing imaging apparatus and method
WO2015038047A1 (en) Method, transmission unit, system and computer program for wireless communication between a camera and at least one remote flash device
US10045009B2 (en) Imaging device and imaging control method with adjustable frame frequency
TW201735618A (en) Photography apparatus and adjusting method of brightness of exposure
JP2007318262A (en) Imaging apparatus
CN112019835A (en) Frame rate verification device and method for dynamic vision sensor module and storage medium
CN102804752B (en) The functional method and apparatus of Enhanced Timer for camera system
JP2010130348A (en) Signal processing device, camera module, mobile terminal device, and imaging method
CN103188447B (en) A kind of industrial aperture control system, device
JP5473538B2 (en) Strobe device and multi-flash strobe system
US11818447B2 (en) Master image sensor, slave image sensor, imaging system, and information processing method
CN110191279B (en) Depth camera, electronic device and image acquisition method
WO2020214078A1 (en) External light source for mobile devices

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