Summary of the invention
For the problems in the relevant technologies, the present invention proposes the control system and method for a kind of laser displacement sensor, energy
Enough while completing measurement, measuring device is controlled.
According to an aspect of the invention, there is provided a kind of control system of laser displacement sensor.
The control system of laser displacement sensor according to the present invention includes optical pickup module and control module, optical head mould
Block includes FPGA processing chip, laser driving circuit, the first communication interface;Control module includes that processor and the second communication connect
Mouthful, it is communicated between processor and FPGA processing chip by the first communication interface and the second communication interface;Wherein, at FPGA
Reason chip is used to determine shift value according to the picture signal from imaging sensor, and determining shift value is sent to processing
Device;And under the control of a processor, laser control signal to be exported to laser driving circuit;Laser driving electricity
Road according to running parameter of the laser control signal to laser for controlling;Processor is for controlling FPGA processing chip
Output laser controls signal, and receives the shift value from FPGA processing chip.
Wherein, laser driving circuit includes adder circuit, and FPGA processing chip is connected to the first of adder circuit
Input terminal, and FPGA processing chip under the control of a processor exports laser control signal to first input end;Adder
Second input terminal of circuit is connected to base-level signal, and the output end of adder circuit is connected to laser;Wherein, benchmark electricity
Ordinary mail number is constant signal.
Further, in processor control FPGA processing chip output laser control signal, processor can will swash
The operating mode of light device notify give FPGA processing chip, operating mode includes preset parameter mode and variable element mode;Its
In,
Under preset parameter mode, FPGA handles chip and stops output laser control signal;
Under variable element mode, FPGA processing chip analyzes the picture signal from imaging sensor, according to
It analyzes result output laser and controls signal.
Specifically, adder circuit can be used for that behaviour will be summed up from the signal of first input end and the second input terminal
Adduction consequential signal is obtained, and adduction consequential signal is exported to laser by output end, wherein adduction consequential signal is used for
Adjust the light intensity of laser;Under preset parameter mode, the adduction consequential signal of adder circuit output is benchmark level signal;
Under variable element mode, FPGA processing chip picture signal is analyzed when, obtain reflective object surface characteristic and/
Or the distance between laser and reflective object, and according to surface characteristic and/or apart from generation laser control signal;Adder
Circuit is used to laser control signal and base-level signal summing up operation and exports adduction consequential signal.
Further, above-mentioned control module can also include communication module, and processor is used to receive by communication module
Shift value report to management equipment;Also, control system according to the present invention may further include: display, for showing
Show that current operating mode, shift value and/or processor report the mode of shift value;Input equipment, finger for receiving input
It enables;Also, processor is used to report the mode of shift value to adjust operating mode and/or processor according to the instruction of input
It is whole, wherein it includes that single reports and concentration reports that processor, which reports the mode of shift value,.
In addition, above-mentioned optical pickup module may further include: temperature sensing module, for measuring temperature, and by temperature
Measurement result is supplied to FPGA processing chip;Also, FPGA processing chip is also used to according to temperature measurement result and predetermined benefit
Rule is repaid to be adjusted determining shift value;When sending shift value, FPGA processing chip sends shift value adjusted
To processor, wherein include multiple temperature value/temperature values and corresponding shift value variable quantity in predetermined backoff rule.
Optionally, in addition, above-mentioned first communication interface and the second communication interface are analog voltage signal coffret, optics
Head module further comprises D/A converter module, logical by first after D/A converter module converts determining shift value
Letter interface is sent to the second communication interface of processor;And/or above-mentioned first communication interface and the second communication interface are led to for RS232
Believe interface.
In addition, above-mentioned optical pickup module can be wrapped further in the case where imaging sensor is line scan image sensor
Low-pass filter is included, low-pass filter carries out low-pass filtering to the picture signal from line scan image sensor;Also, in FPGA
When processing chip determines shift value, FPGA processing chip based on the picture signal after low-pass filtering for being determined in image outline
Heart point position, and shift value is determined according to the position of center position and preset reference point.
Further, FPGA handles chip for determining the central point of image outline at least one of in the following manner
Position: the peak point of the picture signal after determining low-pass filtering, in the multiple points and root of peak point two sides selection picture signal
The central point of image outline is determined according to the point of peak point and selection;According to the peak value of the picture signal after low-pass filtering and in advance
Proportionate relationship between the lower limit value and peak value of configuration determines lower limit value, selects the image letter between peak value and lower limit value
Number, and determine according to selected picture signal the central point of image outline;To the waveform of the picture signal after low-pass filtering into
The peak point of row curve matching, the curve obtained according to fitting determines the central point of image outline.
In addition, above-mentioned FPGA processing chip can be also used for determining reflective object according to the picture signal from imaging sensor
The surface characteristic of body, and according to the time for exposure of surface characteristic adjustment imaging sensor.
Optionally, above-mentioned processor can be arm processor.
According to another aspect of the present invention, a kind of control method of laser displacement sensor is provided.
The control method of laser displacement sensor according to the present invention includes: FPGA processing chip according to from image sensing
The picture signal of device determines shift value, and determining shift value is sent to processor, wherein FPGA handles chip in processor
Control under, laser control signal is exported to laser driving circuit, also, laser driving circuit is according to laser control
Signal processed controls the running parameter of laser;Processor receives the shift value from FPGA processing chip.
Wherein, laser driving circuit includes adder circuit, and FPGA processing chip is connected to the first of adder circuit
Input terminal, and FPGA processing chip under the control of a processor exports laser control signal to first input end;Adder
Second input terminal of circuit is connected to base-level signal, and the output end of adder circuit is connected to laser;Wherein, benchmark electricity
Ordinary mail number is constant signal.
Further, in processor control FPGA processing chip output laser control signal, processor is by laser
Operating mode notify give FPGA processing chip, operating mode includes preset parameter mode and variable element mode;Wherein, exist
Under preset parameter mode, FPGA handles chip and stops output laser control signal;Under variable element mode, FPGA handles core
Piece analyzes the picture signal from imaging sensor, and output laser controls signal based on the analysis results.
Specifically, when the running parameter to laser controls, adder circuit will from first input end and
The signal of second input terminal sums up operation and obtains adduction consequential signal, and by output end output adduction consequential signal to sharp
Light device, wherein adduction consequential signal is used to adjust the light intensity of laser;Under preset parameter mode, adder circuit output
Adduction consequential signal is benchmark level signal;Under variable element mode, picture signal is analyzed in FPGA processing chip
When, obtain the surface characteristic and/or the distance between laser and reflective object of reflective object, and according to surface characteristic and/or
Distance generates laser control signal;Adder circuit is used to laser control signal and base-level signal summing up behaviour
Make and exports adduction consequential signal.
In addition, the control method may further include: shift value can be reported to pipe by communication module by processor
Manage equipment;Display come by way of showing that current operating mode, shift value and/or processor report shift value;Pass through
The instruction of input is received by input equipment, processor reports displacement to operating mode and/or processor according to the instruction of input
The mode of value is adjusted, wherein it includes that single reports and concentration reports that processor, which reports the mode of shift value,.
In addition, this method may further include: measuring temperature by temperature sensing module, and temperature measurement result is mentioned
It supplies FPGA and handles chip;FPGA handles chip also according to temperature measurement result and predetermined backoff rule to determining shift value
It is adjusted;When sending shift value, FPGA handles chip and shift value adjusted is sent to processor, wherein predetermined to mend
Repay includes multiple temperature value/temperature values and corresponding shift value variable quantity in rule.
Optionally, it is communicated between processor and FPGA processing chip by analog voltage signal coffret and/or RS232
Interface is communicated.
In addition, imaging sensor be line scan image sensor in the case where, FPGA processing chip determine shift value it
Before, low-pass filtering can be carried out to the picture signal from line scan image sensor by low-pass filter;Also, at FPGA
When reason chip determines shift value, FPGA processing chip can determine the center of image outline based on the picture signal after low-pass filtering
Point position, and shift value is determined according to the position of center position and preset reference point.
Specifically, FPGA handles chip can determine the center point of image outline at least one of in the following manner
It sets: the peak point of the picture signal after determining low-pass filtering, in the multiple points and basis of peak point two sides selection picture signal
Peak point and the point of selection determine the central point of image outline;Match according to the peak value of the picture signal after low-pass filtering and in advance
The proportionate relationship between lower limit value and peak value set determines lower limit value, selects the picture signal between peak value and lower limit value,
And the central point of image outline is determined according to selected picture signal;To the waveform march of the picture signal after low-pass filtering
The peak point of line fitting, the curve obtained according to fitting determines the central point of image outline.
In addition, control method according to the present invention may further include: FPGA handles chip according to from image sensing
The picture signal of device determines the surface characteristic of reflective object, and the time for exposure of imaging sensor is adjusted according to surface characteristic.
Optionally, above-mentioned processor can be arm processor.
The present invention can be realized it is following the utility model has the advantages that
(1) FPGA is controlled by processor and handles chip, and then control laser, laser displacement sensor can be allowed to locate
It manages and works under the control of device, to facilitate the factors such as the working environment according to laser, measurement object, laser is adjusted flexibly
Running parameter, to help to realize more accurate measurement;When control system according to the present invention is by distributed deployment,
The work that measuring device can be controlled according to the actual requirement of equipment under test, is suitable for large-scale production monitoring;Also, this hair
It is bright to obtain shift value and handling picture signal by FPGA, the process performance of FPGA processing chip can be given full play to, in nothing
It needs to ensure that the real-time of processing in locally-available displacement result, make system more succinct in the case where the equipment such as host computer, drop
Low cost and energy consumption;
(2) present invention proposes the work for controlling laser by adder circuit by FPGA processing chip, not only controls
Process is effective, and structure is simple in practical application, and cost and complexity are lower, convenient for safeguarding;
(3) present invention handles the work that chip controls laser in both modes, energy by allowing processor to control FPGA
Different measurement environment is enough adapted to, for example, the equipment more demanding for measurement accuracy, it can be using variable when measuring
Parameter mode, to improve the accuracy of displacement measurement;And lower equipment is required for measurement accuracy, then it can be using fixation
Parameter mode measures, to reduce the processing load and energy consumption of FPGA, helps to ensure that the real-time of processing;
(4) present invention is by adjusting laser at a distance from reflective object according to reflective object surface characteristic and laser
Device can accurately be adjusted laser according to actual measurement environment, to facilitate the quality of improvement picture signal, be guaranteed
The intensity of hot spot, to improve measurement accuracy;
(5) by display, operator can be allowed more easily to check the Working mould of each measuring device at the scene
Formula, measurement result and measurement result report situation, make the management of factory floor more intuitive;Changed by input equipment
Become working method and reporting schemes, operator can be allowed easily to control each measuring device, for example, for wanting
It seeks low measurement accuracy, the equipment that contraposition moves relative insensitivity, can be measured using preset parameter mode, and reported with concentration
Mode (disposably being reported the result of multi collect) uploads shift value;It is higher, non-to being displaced for requiring measurement accuracy
Often sensitive equipment, then can measure under variable element mode, and reported using single and (refer to and obtain shift value every time
Afterwards, all report this measure shift value) mode send shift value, in order to improve measurement accuracy, and monitored in real time;
(6) present invention according to shift value of the temperature to measurement by being adjusted, and to realize temperature-compensating, can allow measurement
As a result it is not influenced by environment temperature, improves the Stability and veracity of measurement;Also, since the object of adjustment is shift value,
Measuring device is adjusted so can be avoided, realization is more easier, is convenient;
(7) for line scan image sensor, the present invention uses the denoising scheme of low-pass filtering, can be due to laser light scattering
Intensity causes more by force picture caused by linear sensing chip (such as CMOS chip) to will form saturation distortion characteristic (that is, single-point swashs
Light deteriorated in cmos imaging by Gaussian waveform be intermediate recess bimodal waveform, and conventional median filtering, gaussian filtering,
Value filtering image processing method fails to the saturation wave distortion of cmos sensor) in the case where, effectively eliminate high-frequency noise and
Cmos sensor is saturated wave distortion, to significantly reduce noise so that original image contour smoothing, correctly to determine and
Profile center position is extracted, helps to obtain more accurate relative displacement;In addition, based on the central point of image outline come
It determines relative displacement, method used by image procossing is enabled to be effectively applicable to linear array sensing chip, to ensure that
The precision of displacement sensing;And since the complexity for the treatment of process is lower, the real-time of processing is further improved, figure is reduced
As processing is for the demand of hardware;
(8) in addition, the present invention proposes the central point for determining image outline by the way of center of gravity determination or curve matching,
Image processing method can be allowed to be effectively applicable to the picture signal of linear array chip acquisition, so that processing result meets high-precision and wants
It asks, and treatment process is simple and effective, complexity is lower, can be improved the efficiency of processing;
(9) present invention analyze to picture signal and adjusts imaging sensor based on analysis result by FPGA, can
Quality of image signals is advanced optimized, to further increase the accuracy of subsequent relative displacement detection.
Specific embodiment
The description of this illustrated embodiment should be combined with corresponding attached drawing, and attached drawing should be used as the one of complete specification
Part.In the accompanying drawings, the shape of embodiment or thickness can expand, and to simplify or facilitate mark.Furthermore it is respectively tied in attached drawing
The part of structure will be to describe to be illustrated respectively, it is notable that the member for being not shown in the figure or not being illustrated by text
Part is the form known to a person of ordinary skill in the art in technical field.
The description of embodiments herein, any reference in relation to direction and orientation, is merely for convenience of describing, and cannot manage
Solution is any restrictions to the scope of the present invention.Relational language, as " lower ", " higher ", " horizontal ", " vertical ", "
On ", " under ", "upper", "lower", " top " and " | bottom " and its derivative (such as " horizontally ", " down ", " upward "
Etc.) should all be interpreted that discussed orientation is shown described in explanation or in attached drawing.These relational languages are just to side
Just it describes, and is not considered as the explanation to instrument and equipment or the concrete operations in particular orientation.Term, it is such as " attached
It is upper ... " (attached), " being fixed on ... ", " connected " and " being connected with each other " refer to a kind of relationship, wherein tying
Another structure is fixed or be attached to structure by directly or indirectly through insert structure, unless there are specific description, the structure packet
It includes moveable or fixed or associated.In addition, the features and advantages of the invention are by referring to preferred reality
The scheme of applying is illustrated.It is therefore preferable that embodiment illustrates the combination of possible infinite feature, these features may be independent
In the presence of or combination exist, the present invention is not defined in preferred embodiment particularly.The scope of the present invention is by claim
Book is defined.
According to an embodiment of the invention, providing a kind of control system of laser displacement sensor.
As shown in Figure 1, the control system of laser displacement sensor according to an embodiment of the present invention includes 1 He of optical pickup module
Control module 2, optical pickup module include FPGA processing chip 11, laser driving circuit 12, the first communication interface 13;Control mould
Block 2 includes processor 21 and the second communication interface 22, passes through the first communication interface between processor 21 and FPGA processing chip 11
13 and second communication interface 22 communicated.Wherein, FPGA handles chip 11 and is used for according to the image letter from imaging sensor
It number determines shift value, and determining shift value is sent to processor 21.Wherein, imaging sensor can be cmos sensor,
It is also possible to ccd sensor, can be transmitted by the way of the transmission of 10 parallel-by-bits between imaging sensor and FPGA processing chip
Picture signal.
Moreover, FPGA handles chip 11 and is also used under the control of processor 21, and laser control signal is exported
To laser driving circuit 12.Laser driving circuit 12 be used for according to laser control signal to the running parameter of laser into
Row control;Processor 21 controls signal for controlling FPGA processing 11 output laser of chip, and receives and handle from FPGA
The shift value of chip 11.Further, processor 21 can be also used for reporting received shift value.
Optionally, above-mentioned processor 21 can be arm processor.
In one embodiment, laser driving circuit includes adder circuit 121, as shown in Fig. 2, FPGA handles chip
11 are connected to the first input end Input 1 of adder circuit 121, and FPGA processing chip 11 will under the control of processor 21
Laser control signal (for example, it may be the voltage of 8 DA output 0-5V, or also can choose the signal of other forms
Realize) it exports to first input end Input 1;Second input terminal Input 2 of adder circuit 121 is connected to reference level letter
Number, the output end Output of adder circuit 121 is connected to laser;Wherein, base-level signal be constant signal (for example,
It can be the constant voltage signal of level value, can adjust to obtain by potentiometer).
The present invention proposes the work for controlling laser by adder by FPGA processing chip, and not only control process has
Effect, and in practical application, structure is simple, and cost and complexity are lower, convenient for safeguarding.
In one embodiment, when processor 21 controls FPGA processing 11 output laser of chip control signal, processing
Device 21 by the operating mode of laser notify give FPGA handle chip 11, wherein operating mode include preset parameter mode and
Variable element mode;Processor 21 can select in above-mentioned operating mode, later by selected state notifying to FPGA at
Manage chip 11.
Specifically, FPGA handles chip 11 and stops output laser control signal under preset parameter mode;Variable
Under parameter mode, FPGA processing chip 11 analyzes the picture signal from imaging sensor, exports based on the analysis results
Laser control signal.
The present invention handles the work that chip controls laser in both modes, Neng Goushi by allowing processor to control FPGA
Different measurement environment is answered, for example, the equipment more demanding for measurement accuracy, variable element can be used when measuring
Mode, to improve the accuracy of displacement measurement;And lower equipment is required for measurement accuracy, then it can use preset parameter
Mode measures, to reduce the processing load and energy consumption of FPGA, helps to ensure that the real-time of processing.
In one embodiment, adder circuit will be for that will come from first input end Input 1 and the second input terminal Input
2 signal sums up operation and obtains adduction consequential signal, and passes through output end Output output adduction consequential signal to laser
Device, wherein adduction consequential signal is used to adjust the light intensity of laser.
Under preset parameter mode, since FPGA processing chip 11 does not provide laser control signal, so adder is electric
The adduction consequential signal that road 121 exports is still the base-level signal that the second input terminal Input 2 is received, at this point, laser
It will work under the control of base-level signal in some light intensity.Under variable element mode, 11 pairs of chip figures are handled in FPGA
When being analyzed as signal, the surface characteristic and/or the distance between laser and reflective object of reflective object can be obtained.FPGA
Handling chip 11 will be according to surface characteristic and/or apart from generation laser control signal;At this point, the level of laser control signal
It will be not zero, the waveform for the adduction consequential signal that adder circuit 121 obtains is by laser control signal and base-level signal
It is obtained after addition.At this point, the light intensity that laser control signal will only control in effective range, comparatively increases DA's
Digit improves the precision of light intensity variation.
In addition, FPGA handles chip 11 can be according to currently received picture signal with the continuous progress of measurement process
Constantly change laser control signal, therefore adder circuit 121 by the adduction changed as a result, laser adder electricity
Under the control on road 121, also can output intensity variation laser, the intensity of the laser with current testee at a distance from and surface spy
Property is consistent.
It, can be by means of laser triangulation algorithm when wherein, at a distance from determining laser between reflective object.Specifically
For, laser is by camera lens by laser directive body surface, and the laser after object reflects is by receiver camera lens, by image
Sensor (for example, it may be CMOS or ccd sensor) receives.According to different distances, imaging sensor can be at different angles
Degree is lower to be presented the luminous point for receiving light, and imaging sensor converts the signal into digital signal and is transmitted to FPGA processing chip, at FPGA
Reason chip can calculate distance according to this angle.
In other embodiments, adjustable running parameter is not limited to the light intensity of laser, for example, it is also possible to adjust
The angle of laser, position.The knot equally being connect based on above-mentioned FPGA processing chip 11 with an input terminal of adder 121
Another input terminal of structure, adder 121 receives base-level signal.When not adjusting the angles and positions of laser, FPGA
Handling chip 11, output laser does not control signal, and the adduction result that adder 121 exports at this time is still base-level signal,
Laser will work under base position and references angle.In the angle and/or position for needing to control laser, FPGA processing
Chip 11 can control signal with output laser, after adder sums up laser control signal and base-level signal,
Result after exporting adduction gives the driving mechanism of laser (motor that can be laser) for example, can export to laser,
Driving mechanism is according to adduction consequential signal movement, so that laser is rotated by a certain angle and/or be moved certain position.
The present invention by adjusting laser at a distance from reflective object according to reflective object surface characteristic and laser,
Dynamic can be carried out to laser according to actual measurement environment, accurately adjusted, thus facilitate the quality of improvement picture signal,
Guarantee forms the laser intensity of hot spot, to improve measurement accuracy.
In the embodiments described above, the control for laser is realized using adder, and the present invention is not limited to
This.In other embodiments, laser driving circuit can also be made up of other devices, FPGA processing chip can pass through it
His mode provides control signal to laser driving circuit, to be adjusted and to control to laser.
In addition, as shown in figure 3, in one embodiment of the invention, control system according to the present invention can be further
Include: display 3, connect with control module 2, for showing current operating mode (that is, showing currently employed variable element mould
Formula or preset parameter mode measure), shift value, in control module 2 (reporting process that can be controlled by processor 21)
The mode for reporting shift value can also combine and show these information;And input equipment 4, it is connect with control module 2, for receiving
The instruction of user's input;Also, processor 21 is used to report position to operating mode and/or control module 2 according to the instruction of input
The mode of shifting value is adjusted, wherein it includes that single reports and (refers to and be displaced every time that processor 21, which reports the mode of shift value,
Value, all reported) and concentration report and (with some cycles, all shift values obtained in this period once reported).It is optional
Ground, aforementioned display device can be numeral method device, be also possible to other kinds of display;Above-mentioned input equipment can be key
Disk etc..
By display, can allow operator more easily check at the scene each measuring device operating mode,
Measurement result and measurement result report situation, make the management of factory floor more intuitive;Change work by input equipment
Make mode and reporting schemes, operator can be allowed easily to control, for example, for requiring low measurement accuracy, right
The equipment for being displaced relative insensitivity can be measured using preset parameter mode, and (by multi collect in a manner of concentrating and report
As a result disposably reported) shift value is uploaded, the processing workload and energy consumption of FPGA are not only reduced, also reduction network load
And the processing load of management equipment;It, then can be variable for requiring the equipment that measurement accuracy is higher, very sensitive to displacement
It is measured under parameter mode, and is reported and (referred to after obtaining shift value every time, the displacement for all reporting this to measure using single
Value) mode send shift value, in order to improve measurement accuracy, and monitored in real time.
In addition, as shown in figure 4, in one embodiment, in a control system in accordance with the invention, optical pickup module 1 into
One step includes: temperature sensing module 14, is supplied at FPGA for measuring the temperature in current system, and by temperature measurement result
Manage chip 11;Also, FPGA processing chip 11 is also used to according to temperature measurement result and predetermined backoff rule to determining position
Shifting value is adjusted;When sending shift value, FPGA handles chip and shift value adjusted is sent to processor, wherein pre-
Determine to include multiple temperature value/temperature values and corresponding shift value variable quantity in offset rule.For example, it is assumed that optical head is logical
Normal operating temperature in 0-50 degree section, mend by the temperature that can be obtained by way of experiment in above-mentioned temperature range at this time
Curve, a reference axis corresponding temperature of curve are repaid, another reference axis corresponds to the variable quantity that shift value is adjusted when compensation.Pass through
The curve can carry out temperature-compensating to shift value according to current environmental temperature.
By being adjusted according to shift value of the temperature to measurement, to realize temperature-compensating, can allow measurement result not by
The influence of environment temperature improves the Stability and veracity of measurement;Also, since the object of adjustment is shift value, so can
It avoids that measuring device is adjusted, realization is more easier, is convenient.
As shown in figure 5, in one embodiment, the control module 2 in control system according to the present invention can be further
Including communication module 23, processor 21 can be communicated by communication module 23 with management equipment, for example, shift value can be reported
To management equipment.Optionally, processor 21 (control module 2) can be communicated with management equipment in several ways, for example,
Communication module 23 may include one or more modules for realizing communication, for example, may include at least one of: TCP/
IP communication module, wifi communication module, RS232 communication module, usb communication module, RS485 communication module.
In one embodiment, above-mentioned first communication interface and the second communication interface can be analog voltage signal transmission and connect
Mouthful, optical pickup module may further include D/A converter module (not shown), the position for determining FPGA processing chip 11
Shifting value is converted to analog signal, and the second communication interface of processor is sent to by the first communication interface.In another embodiment,
Above-mentioned first communication interface and the second communication interface are RS232 communication interface, are used for transmission shift value.
In addition, being line scan image sensor (for example, it may be Linear Array CCD Image Sensor or linear array in imaging sensor
Cmos image sensor) in the case where, optical pickup module may further include low-pass filter (not shown), be connected to image
Sensor for carrying out low-pass filtering to the picture signal from imaging sensor, and the picture signal after low-pass filtering is passed
It is defeated by FPGA processing chip and carries out image procossing.When FPGA processing chip determines shift value, FPGA processing chip is for being based on
Picture signal after low-pass filtering determines the center position of image outline, and according to the position of center position and preset reference point
Set determining shift value.
It can be due to laser scattering intensity by using the denoising scheme of low-pass filtering for line scan image sensor
Picture caused by linear sensing chip (such as CMOS chip) is caused to will form saturation distortion characteristic (that is, single-point laser exists more by force
The bimodal waveform for intermediate recess is deteriorated by Gaussian waveform in cmos imaging, and the median filtering of routine, gaussian filtering, mean value are filtered
Wave image processing method fails to the saturation wave distortion of cmos sensor) in the case where, effectively eliminate high-frequency noise and CMOS
Sensor is saturated wave distortion, so that noise is significantly reduced, so that original image contour smoothing, correctly to determine and to extract
Profile center position helps to obtain more accurate relative displacement.In addition, carrying out image procossing in FPGA processing chip
When, relative displacement is determined based on the central point of image outline, method used by image procossing is effectively applicable in
In linear array sensing chip, to ensure that the precision of displacement sensing;And since the complexity for the treatment of process is lower, further mention
The high real-time of processing, reduces image procossing for the demand of hardware.
In one embodiment, FPGA handles chip can determine image outline at least one of in the following manner
Center position:
(mode one) determines the peak point of the picture signal after low-pass filtering, in peak point two sides selection picture signal
Multiple points and the central point that image outline is determined according to the point of peak point and selection;
(mode two) is according between the peak value and preconfigured lower limit value and peak value of the picture signal after low-pass filtering
Proportionate relationship determine lower limit value, select the picture signal positioned at peak value and lower limit value between, and according to selected image letter
Number determine image outline central point;
(mode three) carry out curve fitting to the waveform of the picture signal after low-pass filtering, the curve obtained according to fitting
Peak point determines the central point of image outline.
Figure is determined by using the mode of center of gravity determining (corresponded manner one and two) or curve matching (corresponded manner three)
As the central point of profile, image processing method can be allowed to be effectively applicable to the picture signal of linear array chip acquisition, so that processing knot
Fruit meets high-precision requirement, and treatment process is simple and effective, and complexity is lower, can be improved the efficiency of processing.
It in other embodiments, can also be using other kinds of imaging sensor (for example, high pixel CMOS can be used
Imaging sensor etc.) acquire picture signal, FPGA processing chip can also handle picture signal using other methods, with must
To shift value, such as the variation of ohject displacement can be calculated by laser triangulation.
In addition, in one embodiment, FPGA processing chip is also used to true according to the picture signal from imaging sensor
Determine the surface characteristic of reflective object, and adjusts the time for exposure of imaging sensor according to surface characteristic.Image is believed by FPGA
It number carries out analyzing and based on analysis result adjustment imaging sensor, quality of image signals can be advanced optimized, thus further
Improve the accuracy of subsequent relative displacement detection.
Optionally, above-mentioned processor 21 can be arm processor.Between optical pickup module 1 and control module 2 of the invention
It can be electrically connected by 12 core Shielded Twisted Pairs, data transmission is communicated using RS232, is installed very flexible.Control module 2
It can be packaged by shell, therefore, control module can also be referred to as control cabinet.
Fig. 6 is the specific block diagram of control module in practical applications.As shown in fig. 6, in practical applications, control cabinet
It may include arm processor (corresponding to above-mentioned processor 21), clock circuit, EEPROM memory module, crystal oscillator, RS232 communication
Circuit, USB turn serial port circuit and key-press input and digital tube display, in addition, arm processor can also by UART with
Optical head communication, and arm processor can also receive the amount of opening the light input.In addition, it can include the extension communicated with optical head
Module, such as RS485 module, WIFI module, TCP/IP module.
With continued reference to Fig. 6, wherein multiple voltage conversion is also shown, specifically, in example shown in Fig. 6, it is external
Switching Power Supply can provide 24V power input, then converts to 6.8V, 6.8V to convert by 2 road LDO to 5V by DC-DC and distinguish
It works for control cabinet and optical head, Fig. 6 also shows 5.0V and turns 3.3V, and 6.8V turns+12V and 6.8V and turns -12V.
Control cabinet is using arm processor as key control unit, the communication being mainly responsible between optical head, and with service
Communication between device, the diversified communication modes such as RS232, USB, TCP/IP and WIFI can be used in communication between server,
The displacement data of measurement is transmitted to the management equipments such as server.
Control cabinet has numeral method, the shift value for display control command and currently measured.And it can be by pressing
Key input changes the value of control command, and the measuring state and data for reaching different upload state.For example it can change automatic Light
Perhaps data pattern or single upload data pattern can automatically continuously be uploaded by measuring under conditions of fixed light intensity value.
Control cabinet has the function of external switch amount input, the feelings that such as more laser displacement sensors are connected by RS485
Under condition, synchronous averaging may be implemented.External trigger control model can also be realized with outside connected switch, the equipment such as PLC.
Fig. 7 is the structure chart of optical pickup module in practical application.As shown in fig. 7, optical pickup module may include at FPGA
Device, 10 parallel-by-bit D/A conversion modules are managed, cmos sensor data acquisition module and has source crystal oscillator at digital temperature sensor.FPGA
Processor can be communicated by 10 parallel-by-bit D/A conversion modules or UART with control cabinet, and FPGA can pass through expansion module interface
Connect expansion module shown in fig. 6.
In addition, as described above, optical pickup module can be further attached to laser driving circuit, and optical pickup module
It may further include RS232 communication module (for being communicated with control cabinet).
Fixed luminous intensity measurement and variable intensity measurement may be implemented in laser driving circuit, and fixed voltage is adjusted through potentiometer
Production, variable intensity by FPGA control 8 Bits Serial DA export, the two signals can with the light intensity regulating of co- controlling laser,
To change light intensity according to the distance of object, material.
Cmos sensor acquisition laser injects to the reflected light of object, and converts thereof into digital signal and be transmitted to
FPGA processing, FPGA calculate the variation of ohject displacement by algorithm process.
The calculated shift value of FPGA is converted by 10 parallel-by-bit DA, the exportable analog quantity voltage for setting -10V to+10V,
It can also be communicated by RS232 and displacement data is transferred to control cabinet.
Digital temperature sensor is had inside optical head, system can make the data of measurement according to the variation of internal temperature
Compensation, to make up influence of the temperature drift to measurement accuracy.
Voltage conversion is also shown in Fig. 7, for example, may include following voltage conversion function: 5.0V turns 3.3V, 3.3V and turns
1.2V, 3.3V turn 2.5V.
According to an embodiment of the invention, additionally providing a kind of control method of laser displacement sensor.
As shown in figure 8, the control method of laser displacement sensor according to an embodiment of the present invention includes:
Step S801, FPGA handle chip and determine shift value according to the picture signal from imaging sensor, and will determine
Shift value be sent to processor, wherein FPGA handle chip under the control of a processor, by laser control signal export to
Laser driving circuit, also, laser driving circuit is controlled according to running parameter of the laser control signal to laser
System;
Step S802, processor receive the shift value from FPGA processing chip.
In one embodiment, processor can report received shift value, for example, reporting to management equipment.
In one embodiment, laser driving circuit includes adder circuit, and FPGA processing chip is connected to adder
The first input end of circuit, and FPGA processing chip under the control of a processor exports laser control signal to the first input
End;Second input terminal of adder circuit is connected to base-level signal, and the output end of adder circuit is connected to laser;Its
In, base-level signal is constant signal.
The present invention proposes the work for controlling laser by adder by FPGA processing chip, and not only control process has
Effect, and in practical application, structure is simple, and cost and complexity are lower, convenient for safeguarding.
In one embodiment, in processor control FPGA processing chip output laser control signal, processor will
The operating mode of laser notify give FPGA processing chip, operating mode includes preset parameter mode and variable element mode.
Wherein, under preset parameter mode, FPGA handles chip and stops output laser control signal;Under variable element mode,
FPGA processing chip analyzes the picture signal from imaging sensor, based on the analysis results output laser control letter
Number.
The present invention handles the work that chip controls laser in both modes, Neng Goushi by allowing processor to control FPGA
Different measurement environment is answered, for example, the equipment more demanding for measurement accuracy, variable element can be used when measuring
Mode, to improve the accuracy of displacement measurement;And lower equipment is required for measurement accuracy, then it can use preset parameter
Mode measures, to reduce the processing load and energy consumption of FPGA, helps to ensure that the real-time of processing.
In addition, in one embodiment, when the running parameter to laser controls, adder circuit will be from the
The signal of one input terminal and the second input terminal sums up operation and obtains adduction consequential signal, and exports adduction knot by output end
Fruit signal is to laser, wherein adduction consequential signal is used to adjust the light intensity of laser.Under preset parameter mode, adder
The adduction consequential signal of circuit output is benchmark level signal;And under variable element mode, in FPGA processing chip to image
When signal is analyzed, the surface characteristic and/or the distance between laser and reflective object of reflective object are obtained, and according to table
Face characteristic and/or apart from generate laser control signal;Adder circuit is used to believe laser control signal and reference level
It number sums up operation and exports adduction consequential signal.
The present invention by adjusting laser at a distance from reflective object according to reflective object surface characteristic and laser,
Laser can accurately be adjusted according to actual measurement environment, to facilitate the quality of improvement picture signal, guarantee light
The intensity of spot, to improve measurement accuracy.
In one embodiment, control method according to the present invention may further include:
Display come by way of showing that current operating mode, shift value and/or processor report shift value;
By receiving the instruction of input by input equipment, processor is according to the instruction of input to operating mode and/or place
Reason device reports the mode of shift value to be adjusted, wherein it includes that single is reported and concentrated that processor, which reports the mode of shift value,
Report.
By display, can allow operator more easily check at the scene each measuring device operating mode,
Measurement result and measurement result report situation, make the management of factory floor more intuitive;Change work by input equipment
Make mode and reporting schemes, operator can be allowed easily to control each measuring device, for example, for requiring to survey
The equipment that accuracy of measurement is lower, contraposition moves relative insensitivity can be measured using preset parameter mode, and in a manner of concentrating and report
(disposably being reported the result of multi collect) uploads shift value;It is higher, very quick to being displaced for requiring measurement accuracy
The equipment of sense can then measure under variable element mode, and reported using single (refer to after obtaining shift value every time,
All report this measure shift value) mode send shift value, in order to improve measurement accuracy, and monitored in real time.
In addition, in one embodiment, control method according to the present invention may further include:
Temperature is measured by temperature sensing module, and temperature measurement result is supplied to FPGA processing chip;
FPGA processing chip is adjusted determining shift value also according to temperature measurement result and predetermined backoff rule;
When sending shift value, FPGA handles chip and shift value adjusted is sent to processor, wherein wraps in predetermined backoff rule
Include multiple temperature value/temperature values and corresponding shift value variable quantity.
By being adjusted according to shift value of the temperature to measurement, to realize temperature-compensating, can allow measurement result not by
The influence of environment temperature improves the Stability and veracity of measurement;Also, since the object of adjustment is shift value, so can
It avoids that measuring device is adjusted, realization is more easier, is convenient.
In addition, shift value can be reported to management equipment by communication module by processor, optionally, communication module can be with
Including at least one of: TCP/IP communication module, wifi communication module, RS232 communication module, usb communication module, RS485
Communication module.
Optionally, in addition, between processor and FPGA processing chip by analog voltage signal coffret and/or
RS232 communication interface is communicated.
In addition, in one embodiment of the invention, in the case where imaging sensor is line scan image sensor,
Before FPGA processing chip determines shift value, the picture signal from line scan image sensor is carried out by low-pass filter low
Pass filter;
Also, when FPGA processing chip determines shift value, FPGA handles chip based on the picture signal after low-pass filtering
It determines the center position of image outline, and shift value is determined according to the position of center position and preset reference point.
It can be due to laser scattering intensity by using the denoising scheme of low-pass filtering for line scan image sensor
Picture caused by linear sensing chip (such as CMOS chip) is caused to will form saturation distortion characteristic (that is, single-point laser exists more by force
The bimodal waveform for intermediate recess is deteriorated by Gaussian waveform in cmos imaging, and the median filtering of routine, gaussian filtering, mean value are filtered
Wave image processing method fails to the saturation wave distortion of cmos sensor) in the case where, effectively eliminate high-frequency noise and CMOS
Sensor is saturated wave distortion, so that noise is significantly reduced, so that original image contour smoothing, correctly to determine and to extract
Profile center position helps to obtain more accurate relative displacement.In addition, carrying out image procossing in FPGA processing chip
When, relative displacement is determined based on the central point of image outline, method used by image procossing is effectively applicable in
In linear array sensing chip, to ensure that the precision of displacement sensing;And since the complexity for the treatment of process is lower, further mention
The high real-time of processing, reduces image procossing for the demand of hardware.
Further, in an embodiment of the present invention, FPGA handle chip can at least one of in the following manner
Determine the center position of image outline:
(mode one) determines the peak point of the picture signal after low-pass filtering, in peak point two sides selection picture signal
Multiple points and the central point that image outline is determined according to the point of peak point and selection;
(mode two) is according between the peak value and preconfigured lower limit value and peak value of the picture signal after low-pass filtering
Proportionate relationship determine lower limit value, select the picture signal positioned at peak value and lower limit value between, and according to selected image letter
Number determine image outline central point;
(mode three) carry out curve fitting to the waveform of the picture signal after low-pass filtering, the curve obtained according to fitting
Peak point determines the central point of image outline.
Figure is determined by using the mode of center of gravity determining (corresponded manner one and two) or curve matching (corresponded manner three)
As the central point of profile, image processing method can be allowed to be effectively applicable to the picture signal of linear array chip acquisition, so that processing knot
Fruit meets high-precision requirement, and treatment process is simple and effective, and complexity is lower, can be improved the efficiency of processing.
In other embodiments, the present invention can also be using other kinds of imaging sensor (for example, high picture can be used
Plain cmos image sensor etc.) acquire picture signal, FPGA processing chip can also handle image using other methods believes
Number, to obtain shift value, such as the variation of ohject displacement can be calculated by laser triangulation.
In addition, in one embodiment, control method according to the present invention may further include:
FPGA processing chip determines the surface characteristic of reflective object according to the picture signal from imaging sensor, and according to
The time for exposure of surface characteristic adjustment imaging sensor.
Picture signal analyze by FPGA and imaging sensor is adjusted based on analysis result, can be advanced optimized
Quality of image signals, to further increase the accuracy of subsequent relative displacement detection.
Optionally, above-mentioned processor can be arm processor, or be also possible to other processors.
By means of technical solution of the present invention, the precision of measurement can be effectively controlled, for example, 25mm ± 5mm may be implemented
The measurement of range shift value allows in measurement accuracy 10um.The solution of the present invention additionally provide such as RS232, USB, TCP/IP and
The diversified communication modes of WIFI for user select, help to realize big data management platform, user can according to oneself
Demand selects suitable communication modes, has considerable flexibility, is easy to use.Control module (control cabinet) of the invention can be with
The equipment such as outside connected switch, PLC realize external trigger control model, can also to realize data and external control command synchronized upload
Multiple devices co- controlling is realized to communicate by RS485.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.