CN105759258A - Method and device for detecting distance through use of distance sensor - Google Patents

Method and device for detecting distance through use of distance sensor Download PDF

Info

Publication number
CN105759258A
CN105759258A CN201610100934.1A CN201610100934A CN105759258A CN 105759258 A CN105759258 A CN 105759258A CN 201610100934 A CN201610100934 A CN 201610100934A CN 105759258 A CN105759258 A CN 105759258A
Authority
CN
China
Prior art keywords
voltage
magnitude
sample
determinand
distance
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.)
Granted
Application number
CN201610100934.1A
Other languages
Chinese (zh)
Other versions
CN105759258B (en
Inventor
彭灿辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Kohler Electronics Ltd
Original Assignee
Shanghai Kohler Electronics 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 Shanghai Kohler Electronics Ltd filed Critical Shanghai Kohler Electronics Ltd
Priority to CN201610100934.1A priority Critical patent/CN105759258B/en
Publication of CN105759258A publication Critical patent/CN105759258A/en
Application granted granted Critical
Publication of CN105759258B publication Critical patent/CN105759258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/12Systems for determining distance or velocity not using reflection or reradiation using electromagnetic waves other than radio waves

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Measurement Of Optical Distance (AREA)
  • Control Or Security For Electrophotography (AREA)
  • Image Analysis (AREA)

Abstract

The invention puts forward a method and a device for detecting distance through use of a distance sensor. The method comprises a comparison table acquiring step, a detection step, a calculation step, and a distance determining step. In the comparison table acquiring step, a distance semaphore comparison table is acquired, wherein the distance semaphore comparison table stores at least one group of distance semaphore data. In the detection step, a distance sensor detects a to-be-detected object to get the to-be-detected object voltage values of the to-be-detected object, wherein the to-be-detected object voltage values include a first to-be-detected object voltage value and a second to-be-detected object voltage value. In the calculation step, one group of distance semaphore data is acquired from the distance semaphore comparison table, and the reference voltage value of the to-be-detected object is calculated according to a formula. In the distance determining step, the distance between the to-be-detected object and the distance sensor is determined according to the difference between the reference voltage value and the second to-be-detected object voltage value. The problem of inaccurate distance measurement due to calculation error caused by PSD infrared sensing module processing and installing difference in the prior art is solved.

Description

A kind of method and apparatus utilizing range sensor detecting distance
Technical field
The present invention relates to sensor instrument distance field, particularly relate to a kind of method and apparatus utilizing range sensor detecting distance.
Background technology
The range measurement principle of traditional PS D (positionsensitivedetector) infrared induction module is mainly: rely on optical principle and trigonometric function relation to calculate the distance value of testee, so when utilizing the method to find range, the installation site of PSD infrared induction module is required very strict, the optical lens manufacturing procedure of PSD infrared induction module is required also very strict.And in reality batch production PSD infrared induction module process, the installation site of PSD infrared induction module and optical lens processing concordance are difficult to ensure that, ultimately result in the distance value between the distance value of the testee that PSD infrared induction module records and actual testee and PSD infrared induction module and produce deviation.When this deviation is bigger, process calibration standard need to be done before packaging in PSD infrared induction module, but the result of final calibration also can only ensure that distance value will not produce obvious deviation, it is impossible to make error amount be minimized.And calibration process is relatively cumbersome, and cannot accomplish to calibrate completely.
Therefore, it is necessary to overcome drawbacks described above.
Summary of the invention
Based on problem above, the present invention proposes a kind of method utilizing range sensor detecting distance, by obtaining distance signal amount synopsis, distance signal amount synopsis stores least one set distance signal amount data, and often group distance signal amount data include sample distance value and sample voltage value;Determinand is detected by range sensor, obtains the determinand magnitude of voltage of determinand, and determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;Distance signal amount synopsis obtains one group of distance signal amount data, calculates the reference voltage value of determinand according to formula;If the difference of reference voltage value and determinand the second magnitude of voltage is more than default voltage threshold, then from distance signal amount synopsis, obtains another group distance signal amount data, perform calculation procedure;If the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then the distance value in distance signal amount data is the mode of the determinand distance value between determinand and range sensor, solves PSD infrared induction module in prior art and finds range from inaccurate problem.This programme makes the manufacturing technique requirent to PSD infrared induction module reduce by new calculation, as long as the sensing chip installation site of PSD infrared induction module is relatively accurate, just can find range accurately by measuring targets, decrease the process to the correction of PSD infrared induction module, avoid the problem that the range measurement that the difference of production and processing brings has error, the production making PSD infrared induction module is more prone to, and range measurement is more accurate.The present invention also proposes a kind of device utilizing range sensor detecting distance.
On the one hand, the present invention proposes a kind of method utilizing range sensor detecting distance, including:
Obtain synopsis step, including: obtain distance signal amount synopsis, described distance signal amount synopsis stores least one set distance signal amount data, often organize described distance signal amount data and include sample distance value and sample voltage value, described sample distance value is the distance value being test between sample and described range sensor, described sample voltage value is that described range sensor is to being test for test sample gained magnitude of voltage, wherein, described sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, described sample includes the first sample and the second sample, described first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by described range sensor, described second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by described range sensor;
Detecting step, including: determinand is detected by described range sensor, obtains the determinand magnitude of voltage of described determinand, and described determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;
Calculation procedure, including: in described distance signal amount synopsis, obtain distance signal amount data described in a group, according to formula
Calculate the reference voltage value of described determinand;
Distance determines step, including: if the difference of described reference voltage value and described determinand the second magnitude of voltage is more than default voltage threshold, then from described distance signal amount synopsis, obtains another organize described distance signal amount data, perform described calculation procedure;
If the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then the described distance value in described distance signal amount data is the determinand distance value between described determinand and described range sensor.
Preferably, described distance determines that step also includes: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data, the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described first sample;Otherwise, it is determined that described determinand tends to the color of described second sample.
Preferably, described first sample is blackboard, described second sample is blank, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes blackboard the first magnitude of voltage and blank the first magnitude of voltage, and described sample the second magnitude of voltage includes blackboard the second magnitude of voltage and blank the second magnitude of voltage.
Preferably, sample described in described acquisition synopsis step also includes the 3rd sample, and described 3rd sample is carried out test and obtains the 3rd sample the first magnitude of voltage and the 3rd sample the second magnitude of voltage by described range sensor;At same described sample distance value place, described first sample the first magnitude of voltage is less than described 3rd sample the first magnitude of voltage, and described second sample the first magnitude of voltage is more than described 3rd sample the first magnitude of voltage;
Described calculation procedure specifically includes: obtain distance signal amount data described in a group in described distance signal amount synopsis, if described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand.
Preferably, described first sample is blackboard, described second sample is blank, described 3rd sample is green plate, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described green plate is carried out test and obtains green plate the first magnitude of voltage and green plate the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes described blackboard the first magnitude of voltage, green plate the first magnitude of voltage and blank the first magnitude of voltage, described sample the second magnitude of voltage includes described blackboard the second magnitude of voltage, green plate the second magnitude of voltage and blank the second magnitude of voltage.
Preferably, determine in step in described distance, also include: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to default voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data;
If described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described 3rd sample;Otherwise, it is determined that described determinand tends to the color of described first sample;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described second sample;Otherwise, it is determined that described determinand tends to the color of described 3rd sample.
Preferably, also included setting up synopsis step before described acquisition synopsis step, including: with the first default distance threshold or default second distance threshold value for starting point, between described first distance threshold and described second distance threshold value, every predeterminable range value, described sample is carried out once the measurement of described sample voltage value, and by the corresponding storage with described sample voltage value of the described sample distance value between sample described when measuring and described range sensor, form distance signal amount data described in a group, described distance signal amount synopsis includes distance signal amount data described in least one set.
On the other hand, the present invention proposes a kind of device utilizing range sensor detecting distance, including:
Obtain synopsis module, for: obtain distance signal amount synopsis, described distance signal amount synopsis stores least one set distance signal amount data, often organize described distance signal amount data and include sample distance value and sample voltage value, described sample distance value is the distance value being test between sample and described range sensor, described sample voltage value is that described range sensor is to being test for test sample gained magnitude of voltage, wherein, described sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, described sample includes the first sample and the second sample, described first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by described range sensor, described second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by described range sensor;
Detection module, is used for: determinand is detected by described range sensor, obtains the determinand magnitude of voltage of described determinand, and described determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;
Computing module, is used for: obtain distance signal amount data described in a group in described distance signal amount synopsis, according to formula
Calculate the reference voltage value of described determinand;
Distance determines module, is used for: if the difference of described reference voltage value and described determinand the second magnitude of voltage is more than default voltage threshold, then obtain another from described distance signal amount synopsis and organize described distance signal amount data, perform described calculation procedure;
If the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then the described distance value in described distance signal amount data is the determinand distance value between described determinand and described range sensor.
Preferably, described distance determines that module also includes: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data, the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described first sample;Otherwise, it is determined that described determinand tends to the color of described second sample.
Preferably, described first sample is blackboard, described second sample is blank, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes blackboard the first magnitude of voltage and blank the first magnitude of voltage, and described sample the second magnitude of voltage includes blackboard the second magnitude of voltage and blank the second magnitude of voltage.
Preferably, sample described in described acquisition synopsis module also includes the 3rd sample, and described 3rd sample is carried out test and obtains the 3rd sample the first magnitude of voltage and the 3rd sample the second magnitude of voltage by described range sensor;At same described sample distance value place, described first sample the first magnitude of voltage is less than described 3rd sample the first magnitude of voltage, and described second sample the first magnitude of voltage is more than described 3rd sample the first magnitude of voltage;
Described computing module includes: obtain distance signal amount data described in a group in described distance signal amount synopsis, if described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand.
Preferably, described first sample is blackboard, described second sample is blank, described 3rd sample is green plate, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described green plate is carried out test and obtains green plate the first magnitude of voltage and green plate the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes described blackboard the first magnitude of voltage, green plate the first magnitude of voltage and blank the first magnitude of voltage, described sample the second magnitude of voltage includes described blackboard the second magnitude of voltage, green plate the second magnitude of voltage and blank the second magnitude of voltage.
Preferably, determine in module in described distance, also include: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to default voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data;
If described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described 3rd sample;Otherwise, it is determined that described determinand tends to the color of described first sample;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described second sample;Otherwise, it is determined that described determinand tends to the color of described 3rd sample.
Preferably, described device also includes setting up synopsis module, for: with the first default distance threshold or default second distance threshold value for starting point, between described first distance threshold and described second distance threshold value, every predeterminable range value, described sample is carried out once the measurement of described sample voltage value, and by the corresponding storage with described sample voltage value of the described sample distance value between sample described when measuring and described range sensor, forming distance signal amount data described in a group, described distance signal amount synopsis includes distance signal amount data described in least one set.
By adopting technique scheme, have the advantages that
By obtaining distance signal amount synopsis, distance signal amount synopsis stores least one set distance signal amount data, often group distance signal amount data include sample distance value and sample voltage value, sample distance value is the distance value being test between sample and range sensor, and sample voltage value is that range sensor is to being test for test sample gained magnitude of voltage;Determinand is detected by range sensor, obtains the determinand magnitude of voltage of determinand, and determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;Distance signal amount synopsis obtains one group of distance signal amount data, calculates the reference voltage value of determinand according to formula;If the difference of reference voltage value and determinand the second magnitude of voltage is more than default voltage threshold, then from distance signal amount synopsis, obtains another group distance signal amount data, perform calculation procedure;If the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then the distance value in distance signal amount data is the mode of the determinand distance value between determinand and range sensor, solves PSD infrared induction module in prior art and finds range from inaccurate problem.This programme makes the manufacturing technique requirent to PSD infrared induction module reduce by new calculation, as long as the sensing chip installation site of PSD infrared induction module is relatively accurate, just can find range accurately by measuring targets, decrease the process to the correction of PSD infrared induction module, avoid the problem that the range measurement that the difference of production and processing brings has error, the production making PSD infrared induction module is more prone to, and range measurement is more accurate.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method utilizing range sensor detecting distance according to an embodiment of the invention;
Fig. 2 is the schematic diagram utilizing the Computing Principle in the method for range sensor detecting distance according to an embodiment of the invention;
Fig. 3 is the schematic diagram utilizing the Computing Principle in the method for range sensor detecting distance according to an embodiment of the invention;
Fig. 4 is the flow chart of the method utilizing range sensor detecting distance according to an embodiment of the invention;
Fig. 5 is the block diagram of the device utilizing range sensor detecting distance according to an embodiment of the invention.
Detailed description of the invention
Below in conjunction with specific embodiments and accompanying drawing, the present invention is further described in detail.It is only intended to elaborate specific embodiments of the present invention, and the present invention does not produce any restriction, and protection scope of the present invention is as the criterion with claims.
With reference to Fig. 1, the present invention proposes a kind of method utilizing range sensor detecting distance, including:
Obtain synopsis step, including: obtain distance signal amount synopsis, distance signal amount synopsis stores least one set distance signal amount data, often group distance signal amount data include sample distance value and sample voltage value, sample distance value is the distance value being test between sample and range sensor, sample voltage value is that range sensor is to being test for test sample gained magnitude of voltage, wherein, sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, sample includes the first sample and the second sample, first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by range sensor, second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by range sensor;
Detecting step, including: determinand is detected by range sensor, obtains the determinand magnitude of voltage of determinand, and determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;
Calculation procedure, including: in distance signal amount synopsis, obtain one group of distance signal amount data, according to formula (1-1)
Calculate the reference voltage value of determinand;
Distance determines step, including: if the difference of reference voltage value and determinand the second magnitude of voltage is more than default voltage threshold, then from distance signal amount synopsis, obtains another group distance signal amount data, perform calculation procedure;If the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then the distance value in distance signal amount data is the determinand distance value between determinand and range sensor.
Utilize range sensor that sample is once tested, one group of sample voltage value can be obtained: sample the first magnitude of voltage and sample the second magnitude of voltage.Sample is colour table, such as blackboard, blank, green plate etc..By sample being measured thus obtaining the sample voltage value that different sample distance value is corresponding apart from different distance value places from range sensor.Sample distance value and sample voltage value that these have corresponding relation are stored as distance signal amount data, such as storage in the nonvolatile memory, obtain comprising the distance signal amount synopsis of least one set distance signal amount data.
At same sample distance value place, second sample the first magnitude of voltage that the second sample records is more than first sample the first magnitude of voltage, and second sample the second magnitude of voltage is more than first sample the second magnitude of voltage.One group of distance signal amount data includes: first sample the first magnitude of voltage, first sample the second magnitude of voltage, second sample the first magnitude of voltage, second sample the second magnitude of voltage, sample distance value.Sample distance value represents the distance value between the first sample and range sensor, is also the distance value between the second sample and range sensor simultaneously.
With the first sample for blackboard, second sample is that blank is illustrated, here the rgb value of blackboard is (0,0,0), the rgb value of blank is (255,255,255), when blackboard is stored in distance signal amount synopsis from blank after the sample voltage value at different sample distance value places is recorded, so, the determinand distance value of the determinand of the random color between black and white all can pass through distance signal amount synopsis, is calculated obtaining according to formula (1-1).
Such as: determinand is recorded determinand the first magnitude of voltage and determinand the second magnitude of voltage by range sensor, one group of distance signal amount data: blackboard the first magnitude of voltage, blackboard the second magnitude of voltage, blank the first magnitude of voltage and blank the second magnitude of voltage, can be calculated reference voltage value by formula (1-2).
Reference voltage value and determinand the second magnitude of voltage are compared, if the two is equal, then it is assumed that the sample distance value in these group distance signal amount data now obtained is now determinand distance value between determinand and range sensor.
Go to calculate the principle of the distance value between object under test and range sensor according to distance signal amount data, illustrated by Fig. 2, with transverse axis for distance value, the longitudinal axis is magnitude of voltage, the distance signal amount Plotting data of different samples is become curve, can see intuitively, the relation between distance value and the sample voltage value recording sample between sample and range sensor.Citing, transverse axis is decremented to 65cm with 120cm, longitudinal axis magnitude of voltage is incremented by from 0 to 700, curve 201 is formed by connecting by multiple blank the first magnitudes of voltage, curve 202 is formed by connecting by multiple blank the second magnitudes of voltage, curve 203 is formed by connecting by multiple blackboard the first magnitudes of voltage, and curve 204 is formed by connecting by multiple blackboard the second magnitudes of voltage.Arbitrary coordinate figure at transverse axis takes a bit such as 90cm place, draw a vertical line 205, now can give an A1, A2, B1 and B2 respectively mutually with 204 with curve 201,202,203, if now object under test is also at and range sensor 90cm place just, range sensor detects that determinand the first magnitude of voltage is a, determinand the second magnitude of voltage is b, a value less than b value, then can be passed through blank the first magnitude of voltage, blank the second magnitude of voltage, blackboard the first magnitude of voltage and blackboard the second magnitude of voltage and calculate the reference voltage value obtaining determinand.
According to formula (1-2) by determinand the first magnitude of voltage a, blackboard the first magnitude of voltage, blackboard the second magnitude of voltage, blank the first magnitude of voltage and blank the second magnitude of voltage are brought into and are obtained equation (1-3), can be calculated the reference voltage value of determinand, reference voltage value is compared with determinand the second magnitude of voltage b, if both are identical, illustrate now to have have found in distance signal amount synopsis correct distance signal amount data, now the distance value in distance signal amount data is the distance value between object under test and range sensor, namely now the abscissa 90cm of vertical line 205 correspondence is the distance value between object under test and range sensor.
If reference voltage value and determinand the second magnitude of voltage b are not etc., in distance signal amount synopsis, so again take one group of distance signal amount data be calculated according to formula (1-2), till calculated reference voltage value is equal with determinand the second magnitude of voltage b
Determinand the second magnitude of voltage b, blackboard the first magnitude of voltage, blackboard the second magnitude of voltage, blank the first magnitude of voltage and blank the second magnitude of voltage can certainly be adopted to calculate the reference voltage value of determinand, citing obtains reference voltage value as calculated by equation (1-4), now compare reference voltage value whether equal with a, if it is equal, then representing and now have found correct distance signal amount data in distance signal amount synopsis, now the distance value in distance signal amount data is the distance value between object under test and range sensor.
Range sensor can be PSD infrared induction sensor.
By obtaining distance signal amount synopsis, distance signal amount synopsis stores least one set distance signal amount data, often group distance signal amount data include sample distance value and sample voltage value, sample distance value is the distance value being test between sample and range sensor, sample voltage value is that range sensor is to being test for test sample gained magnitude of voltage, wherein, sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, sample includes the first sample and the second sample, first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by range sensor, second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by range sensor;Determinand is detected by range sensor, obtains the determinand magnitude of voltage of determinand, and determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;Distance signal amount synopsis obtains one group of distance signal amount data, calculates the reference voltage value of determinand according to formula;If the difference of reference voltage value and determinand the second magnitude of voltage is more than default voltage threshold, then from distance signal amount synopsis, obtains another group distance signal amount data, perform calculation procedure;If the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then the distance value in distance signal amount data is the mode of the determinand distance value between determinand and range sensor, solves PSD infrared induction module in prior art and finds range from inaccurate problem.This programme makes the manufacturing technique requirent to PSD infrared induction module reduce by new calculation, as long as the sensing chip installation site of PSD infrared induction module is relatively accurate, just can find range accurately by measuring targets, decrease the process to the correction of PSD infrared induction module, avoid the problem that the range measurement that the difference of production and processing brings has error, the production making PSD infrared induction module is more prone to, and range measurement is more accurate.
In one of which embodiment, distance determines that step also includes: if the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then calculate the relative reflectance of determinand according to distance signal amount data, the formula calculating relative reflectance is:
If relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described first sample;Otherwise, it is determined that described determinand tends to the color of described second sample.
If the first sample is blackboard, the second sample is blank, then relative reflectance computing formula is (2-2),
When determinand is in distance signal amount synopsis, after calculating, according to formula (1-1), the determinand distance value obtaining between determinand and range sensor, then utilize the distance signal amount data calculating this determinand distance value to calculate relative reflectance.
Citing: if determinand the first magnitude of voltage is 100, blackboard the first magnitude of voltage is 60, blank the first magnitude of voltage is 300, then the relative reflectance of determinand is (100-60)/(300-60)=16%, if relative reflectance first threshold is 50%, then now determinand belongs to dark-coloured object.
By object being carried out the calculating of relative reflectance, it can be determined that the color of determinand tends to, and makes range sensor when the distance calculating between determinand and range sensor, can also judge that the color of determinand tends to simultaneously.If the first sample is black, the second sample is white, then can be determined that determinand trends towards white or black, and tend to the degree of white or black.
In one of which embodiment, first sample is blackboard, second sample is blank, blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by range sensor, blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by range sensor, sample the first magnitude of voltage includes blackboard the first magnitude of voltage and blank the first magnitude of voltage, and sample the second magnitude of voltage includes blackboard the second magnitude of voltage and blank the second magnitude of voltage.
Selecting blackboard is the first sample, blank is the second sample, the RGB of selected blackboard is (0,0,0), blank is (255,255,255), the different sample voltage values that different sample distance value is corresponding are obtained by blackboard and blank are tested, because the minimum of the rgb value respectively RGB color of blackboard and blank and peak, so, the color value of arbitrary determinand is all between blackboard and the RGB of blank, such as through being calculated obtaining determinand distance value by blackboard and blank are tested the distance signal amount synopsis obtained.Being the first sample by selecting blackboard, blank is the second sample, obtains so that the determinand distance value between the determinand of random color and range sensor calculates such as through formula (1-2).
In one of which embodiment, obtaining sample in synopsis step and also include the 3rd sample, the 3rd sample is carried out test and obtains the 3rd sample the first magnitude of voltage and the 3rd sample the second magnitude of voltage by range sensor;At same sample distance value place, first sample the first magnitude of voltage is less than the 3rd sample the first magnitude of voltage, and second sample the first magnitude of voltage is more than the 3rd sample the first magnitude of voltage;
Calculation procedure specifically includes: obtain one group of distance signal amount data in distance signal amount synopsis, if determinand the first magnitude of voltage is between first sample the first magnitude of voltage and the 3rd sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of determinand;
If determinand the first magnitude of voltage is between the 3rd sample the first magnitude of voltage and second sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of determinand.
By adding the 3rd sample between the first sample and the second sample, the distance signal amount data in distance signal amount synopsis are made to increase, namely color samples point data increases, so that the refinement more that the color of sample is divided, so the determinand distance value of calculating determinand is also more accurate.
With reference to Fig. 3, in one of which embodiment, first sample is blackboard, second sample is blank, 3rd sample is green plate, blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by range sensor, blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by range sensor, green plate is carried out test and obtains green plate the first magnitude of voltage and green plate the second magnitude of voltage by range sensor, sample the first magnitude of voltage includes blackboard the first magnitude of voltage, green plate the first magnitude of voltage and blank the first magnitude of voltage, sample the second magnitude of voltage includes blackboard the second magnitude of voltage, green plate the second magnitude of voltage and blank the second magnitude of voltage.
Selecting the rgb value that green plate is because green plate as the reason of the 3rd sample is (0,255,0), as the Neutral colour of whiteboards and chalkboards, so selecting green plate as the 3rd sample.Curve 207 is formed by connecting by multiple green plate the first magnitudes of voltage, and curve 208 is formed by connecting by multiple green plate the second magnitudes of voltage.By adding green plate as sample, the sampled point making distance signal amount data in distance signal amount synopsis is more, also the sampled point making distance signal amount data is more uniform, so that the distance value between calculated determinand and range sensor is more accurate, the judgement making the color to determinand is also more accurate.
In one of which embodiment, determine in step in distance, also include: if the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to default voltage threshold, then calculate the relative reflectance of determinand according to distance signal amount data;
If determinand the first magnitude of voltage is between first sample the first magnitude of voltage and the 3rd sample the first magnitude of voltage, then the formula calculating relative reflectance is:
If relative reflectance is more than default relative reflectance threshold value, then judge that determinand tends to the color of the 3rd sample;Otherwise, it is determined that determinand tends to the color of the first sample;
If determinand the first magnitude of voltage is between the 3rd sample the first magnitude of voltage and second sample the first magnitude of voltage, then the formula calculating relative reflectance is:
If relative reflectance is more than default relative reflectance threshold value, then judge that determinand tends to the color of the second sample;Otherwise, it is determined that determinand tends to the color of the 3rd sample.
If selecting the first sample is blackboard, the second sample is blank, and the 3rd sample is green plate, if then determinand the first magnitude of voltage is between blackboard the first magnitude of voltage and green plate the first magnitude of voltage, the formula calculating relative reflectance is (4-3),
If determinand the first magnitude of voltage is between green plate the first magnitude of voltage and blank the first magnitude of voltage, the formula calculating relative reflectance is
By adding green plate as sample, the judgement making the color to determinand is more accurate.
In one of which embodiment, also included setting up synopsis step before obtaining synopsis step, including: with the first default distance threshold or default second distance threshold value for starting point, between the first distance threshold and second distance threshold value, every predeterminable range value, sample is carried out the measurement of a sample voltage value, and by measure time sample and range sensor between sample distance value with sample voltage value corresponding store, forming one group of distance signal amount data, distance signal amount synopsis includes least one set distance signal amount data.
Set up synopsis step for setting up distance signal amount synopsis, by placing the mode of blank, blackboard and green plate in the position with range sensor certain distance value, obtain blank the first magnitude of voltage, blank the second magnitude of voltage, blackboard the first magnitude of voltage, blackboard the second magnitude of voltage, green plate the first magnitude of voltage and green plate these data of the second magnitude of voltage, and storing in distance signal amount synopsis by corresponding with distance value for these data, the data of each group of correspondence storage are one group of distance signal amount data.By the distance of the distance of constantly increase and range sensor or reduction and range sensor, thus obtaining the distance signal amount data of each sample of diverse location, ultimately form an a lot of distance signal amount synopsis of sampled point.
With reference to Fig. 4, as highly preferred embodiment of the present invention, by first setting up distance signal amount synopsis, formula is then adopted to calculate the determinand distance value obtaining between determinand and range sensor.
Step S401, set up distance signal amount synopsis: by placing the mode of blank, blackboard and green plate in the position with range sensor certain distance value, obtain blank the first magnitude of voltage, blank the second magnitude of voltage, blackboard the first magnitude of voltage, blackboard the second magnitude of voltage, green plate the first magnitude of voltage and green plate these data of the second magnitude of voltage, and storing in distance signal amount synopsis by corresponding with sample distance value for these sample voltage values, the data of each group of correspondence storage are one group of distance signal amount data.By the distance of the distance of constantly increase and range sensor or reduction and range sensor, thus obtaining the distance signal amount data of each sample of diverse location, ultimately form distance signal amount synopsis.
Step S402, determinand first magnitude of voltage of detection determinand and determinand the second magnitude of voltage.
Step S403, calculates reference voltage value: obtaining one group of distance signal amount data, if determinand the first magnitude of voltage is between blackboard the first magnitude of voltage and green plate the first magnitude of voltage, then the formula of the reference voltage value calculating determinand is:
If determinand the first magnitude of voltage is between green plate the first magnitude of voltage and blank the first magnitude of voltage, then the formula of the reference voltage value calculating determinand is:
Step S404, it is determined that the distance value between determinand and range sensor, if reference voltage value is unequal with determinand the second magnitude of voltage, then after changing one group of distance signal amount data in distance signal amount synopsis, continues to calculate;If reference voltage value is equal with determinand the second magnitude of voltage, then the distance value in distance signal amount data is the distance value between determinand and range sensor.
Step S405, calculate determinand relative reflectance, use the calculating in step S404 to obtain the reference voltage value distance signal amount data equal with determinand the second magnitude of voltage to go to calculate relative reflectance, if determinand the first magnitude of voltage is between blackboard the first magnitude of voltage and green plate the first magnitude of voltage, then the formula calculating relative reflectance is:
If relative reflectance is more than 50%, then it is assumed that the color of determinand trends towards green, otherwise it is assumed that trend towards black.
If determinand the first magnitude of voltage is between green plate the first magnitude of voltage and blank the first magnitude of voltage, then the formula calculating relative reflectance is:
If relative reflectance is more than 50%, then it is assumed that the color of determinand trends towards white, otherwise it is assumed that trend towards green.
The method can be used in tap, closet, bath appliance and other toilet and sanitary ware product to go the distance measured determinand and be arranged between the range sensor in the said goods.
As in closet product, operating point threshold value or operating point threshold interval can be stored in the nonvolatile memory of closet product, if calculating the distance obtaining between determinand and range sensor equal to operating point threshold value, or in operating point threshold interval, then closet product can perform the action such as water spray, bath.
With reference to Fig. 5, the present invention also proposes a kind of device utilizing range sensor detecting distance, including:
Obtain synopsis module 501, for: obtain distance signal amount synopsis, distance signal amount synopsis stores least one set distance signal amount data, often group distance signal amount data include sample distance value and sample voltage value, sample distance value is the distance value being test between sample and range sensor, sample voltage value is that range sensor is to being test for test sample gained magnitude of voltage, wherein, sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, sample includes the first sample and the second sample, first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by range sensor, second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by range sensor;
Detection module 502, is used for: determinand is detected by range sensor, obtains the determinand magnitude of voltage of determinand, and determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;
Computing module 503, is used for: obtain one group of distance signal amount data in distance signal amount synopsis, according to formula
Calculate the reference voltage value of determinand;
Distance determines module 504, is used for: if the difference of reference voltage value and determinand the second magnitude of voltage is more than default voltage threshold, then obtain another group distance signal amount data from distance signal amount synopsis, perform calculation procedure;If the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then the distance value in distance signal amount data is the determinand distance value between determinand and range sensor.
In one of which embodiment, distance determines that module 504 also includes: if the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to voltage threshold, then calculate the relative reflectance of determinand according to distance signal amount data, the formula calculating relative reflectance is:
If relative reflectance is more than default relative reflectance threshold value, then judge that determinand tends to the color of the first sample;Otherwise, it is determined that determinand tends to the color of the second sample.
In one of which embodiment, first sample is blackboard, second sample is blank, blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by range sensor, blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by range sensor, sample the first magnitude of voltage includes blackboard the first magnitude of voltage and blank the first magnitude of voltage, and sample the second magnitude of voltage includes blackboard the second magnitude of voltage and blank the second magnitude of voltage.
In one of which embodiment, obtaining sample in synopsis module 501 and also include the 3rd sample, the 3rd sample is carried out test and obtains the 3rd sample the first magnitude of voltage and the 3rd sample the second magnitude of voltage by range sensor;At same sample distance value place, first sample the first magnitude of voltage is less than the 3rd sample the first magnitude of voltage, and second sample the first magnitude of voltage is more than the 3rd sample the first magnitude of voltage;
Computing module 503 includes: obtain one group of distance signal amount data in distance signal amount synopsis, if determinand the first magnitude of voltage is between first sample the first magnitude of voltage and the 3rd sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of determinand;
If determinand the first magnitude of voltage is between the 3rd sample the first magnitude of voltage and second sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of determinand.
In one of which embodiment, first sample is blackboard, second sample is blank, 3rd sample is green plate, blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by range sensor, blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by range sensor, green plate is carried out test and obtains green plate the first magnitude of voltage and green plate the second magnitude of voltage by range sensor, sample the first magnitude of voltage includes blackboard the first magnitude of voltage, green plate the first magnitude of voltage and blank the first magnitude of voltage, sample the second magnitude of voltage includes blackboard the second magnitude of voltage, green plate the second magnitude of voltage and blank the second magnitude of voltage.
In one of which embodiment, determine in module 504 in distance, also include: if the difference of reference voltage value and determinand the second magnitude of voltage is less than or equal to default voltage threshold, then calculate the relative reflectance of determinand according to distance signal amount data;
If determinand the first magnitude of voltage is between first sample the first magnitude of voltage and the 3rd sample the first magnitude of voltage, then the formula calculating relative reflectance is:
If relative reflectance is more than default relative reflectance threshold value, then judge that determinand tends to the color of the 3rd sample;Otherwise, it is determined that determinand tends to the color of the first sample;
If determinand the first magnitude of voltage is between the 3rd sample the first magnitude of voltage and second sample the first magnitude of voltage, then the formula calculating relative reflectance is:
If relative reflectance is more than default relative reflectance threshold value, then judge that determinand tends to the color of the second sample;Otherwise, it is determined that determinand tends to the color of the 3rd sample.
In one of which embodiment, device also includes setting up synopsis module, for: with the first default distance threshold or default second distance threshold value for starting point, between the first distance threshold and second distance threshold value, every predeterminable range value, sample is carried out the measurement of a sample voltage value, and by measure time sample and range sensor between sample distance value with sample voltage value corresponding store, forming one group of distance signal amount data, distance signal amount synopsis includes least one set distance signal amount data.
Above-described is only principles of the invention and preferred embodiment.It should be pointed out that, for the person of ordinary skill of the art, on the basis of the principle of the invention, it is also possible to make other modification some, also should be regarded as protection scope of the present invention.

Claims (14)

1. the method utilizing range sensor detecting distance, it is characterised in that including:
Obtain synopsis step, including: obtain distance signal amount synopsis, described distance signal amount synopsis stores least one set distance signal amount data, often organize described distance signal amount data and include sample distance value and sample voltage value, described sample distance value is the distance value being test between sample and described range sensor, described sample voltage value is that described range sensor is to being test for test sample gained magnitude of voltage, wherein, described sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, described sample includes the first sample and the second sample, described first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by described range sensor, described second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by described range sensor;
Detecting step, including: determinand is detected by described range sensor, obtains the determinand magnitude of voltage of described determinand, and described determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;
Calculation procedure, including: in described distance signal amount synopsis, obtain distance signal amount data described in a group, according to formula
Calculate the reference voltage value of described determinand;
Distance determines step, including: if the difference of described reference voltage value and described determinand the second magnitude of voltage is more than default voltage threshold, then from described distance signal amount synopsis, obtains another organize described distance signal amount data, perform described calculation procedure;
If the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then the described distance value in described distance signal amount data is the determinand distance value between described determinand and described range sensor.
2. the method utilizing range sensor detecting distance according to claim 1, it is characterized in that, described distance determines that step also includes: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data, the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described first sample;Otherwise, it is determined that described determinand tends to the color of described second sample.
3. the method utilizing range sensor detecting distance according to claim 1, it is characterised in that:
Described first sample is blackboard, described second sample is blank, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes blackboard the first magnitude of voltage and blank the first magnitude of voltage, and described sample the second magnitude of voltage includes blackboard the second magnitude of voltage and blank the second magnitude of voltage.
4. the method utilizing range sensor detecting distance according to claim 1, it is characterised in that:
Sample described in described acquisition synopsis step also includes the 3rd sample, described 3rd sample is carried out test and obtains the 3rd sample the first magnitude of voltage and the 3rd sample the second magnitude of voltage by described range sensor, at same described sample distance value place, described first sample the first magnitude of voltage is less than described 3rd sample the first magnitude of voltage, and described second sample the first magnitude of voltage is more than described 3rd sample the first magnitude of voltage;
Described calculation procedure specifically includes: obtain distance signal amount data described in a group in described distance signal amount synopsis, if described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand.
5. the method utilizing range sensor detecting distance according to claim 4, it is characterised in that:
Described first sample is blackboard, described second sample is blank, described 3rd sample is green plate, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described green plate is carried out test and obtains green plate the first magnitude of voltage and green plate the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes described blackboard the first magnitude of voltage, green plate the first magnitude of voltage and blank the first magnitude of voltage, described sample the second magnitude of voltage includes described blackboard the second magnitude of voltage, green plate the second magnitude of voltage and blank the second magnitude of voltage.
6. the method utilizing range sensor detecting distance according to claim 4, it is characterized in that, determine in step in described distance, also include: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to default voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data;
If described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described 3rd sample;Otherwise, it is determined that described determinand tends to the color of described first sample;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described second sample;Otherwise, it is determined that described determinand tends to the color of described 3rd sample.
7. the method utilizing range sensor detecting distance according to any one of claim 1 to 6, it is characterised in that:
Also included setting up synopsis step before described acquisition synopsis step, including: with the first default distance threshold or default second distance threshold value for starting point, between described first distance threshold and described second distance threshold value, every predeterminable range value, described sample is carried out once the measurement of described sample voltage value, and by the corresponding storage with described sample voltage value of the described sample distance value between sample described when measuring and described range sensor, form distance signal amount data described in a group, described distance signal amount synopsis includes distance signal amount data described in least one set.
8. the device utilizing range sensor detecting distance, it is characterised in that including:
Obtain synopsis module, for: obtain distance signal amount synopsis, described distance signal amount synopsis stores least one set distance signal amount data, often organize described distance signal amount data and include sample distance value and sample voltage value, described sample distance value is the distance value being test between sample and described range sensor, described sample voltage value is that described range sensor is to being test for test sample gained magnitude of voltage, wherein, described sample voltage value includes: sample the first magnitude of voltage and sample the second magnitude of voltage, described sample includes the first sample and the second sample, described first sample is carried out test and obtains first sample the first magnitude of voltage and first sample the second magnitude of voltage by described range sensor, described second sample is carried out test and obtains second sample the first magnitude of voltage and second sample the second magnitude of voltage by described range sensor;
Detection module, is used for: determinand is detected by described range sensor, obtains the determinand magnitude of voltage of described determinand, and described determinand magnitude of voltage includes determinand the first magnitude of voltage and determinand the second magnitude of voltage;
Computing module, is used for: obtain distance signal amount data described in a group in described distance signal amount synopsis, according to formula
Calculate the reference voltage value of described determinand;
Distance determines module, is used for: if the difference of described reference voltage value and described determinand the second magnitude of voltage is more than default voltage threshold, then obtain another from described distance signal amount synopsis and organize described distance signal amount data, perform described calculation procedure;
If the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then the described distance value in described distance signal amount data is the determinand distance value between described determinand and described range sensor.
9. the device utilizing range sensor detecting distance according to claim 8, it is characterized in that, described distance determines that module also includes: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to described voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data, the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described first sample;Otherwise, it is determined that described determinand tends to the color of described second sample.
10. the device utilizing range sensor detecting distance according to claim 8, it is characterised in that:
Described first sample is blackboard, described second sample is blank, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes blackboard the first magnitude of voltage and blank the first magnitude of voltage, and described sample the second magnitude of voltage includes blackboard the second magnitude of voltage and blank the second magnitude of voltage.
11. the device utilizing range sensor detecting distance according to claim 8, it is characterised in that:
Sample described in described acquisition synopsis module also includes the 3rd sample, described 3rd sample is carried out test and obtains the 3rd sample the first magnitude of voltage and the 3rd sample the second magnitude of voltage by described range sensor, at same described sample distance value place, described first sample the first magnitude of voltage is less than described 3rd sample the first magnitude of voltage, and described second sample the first magnitude of voltage is more than described 3rd sample the first magnitude of voltage;
Described computing module includes: obtain distance signal amount data described in a group in described distance signal amount synopsis, if described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then according to formula
Calculate the reference voltage value of described determinand.
12. the device utilizing range sensor detecting distance according to claim 11, it is characterised in that:
Described first sample is blackboard, described second sample is blank, described 3rd sample is green plate, described blackboard is carried out test and obtains blackboard the first magnitude of voltage and blackboard the second magnitude of voltage by described range sensor, described blank is carried out test and obtains blank the first magnitude of voltage and blank the second magnitude of voltage by described range sensor, described green plate is carried out test and obtains green plate the first magnitude of voltage and green plate the second magnitude of voltage by described range sensor, described sample the first magnitude of voltage includes described blackboard the first magnitude of voltage, green plate the first magnitude of voltage and blank the first magnitude of voltage, described sample the second magnitude of voltage includes described blackboard the second magnitude of voltage, green plate the second magnitude of voltage and blank the second magnitude of voltage.
13. the device utilizing range sensor detecting distance according to claim 11, it is characterized in that, determine in module in described distance, also include: if the difference of described reference voltage value and described determinand the second magnitude of voltage is less than or equal to default voltage threshold, then calculate the relative reflectance of described determinand according to described distance signal amount data;
If described determinand the first magnitude of voltage is between described first sample the first magnitude of voltage and described 3rd sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described 3rd sample;Otherwise, it is determined that described determinand tends to the color of described first sample;
If described determinand the first magnitude of voltage is between described 3rd sample the first magnitude of voltage and described second sample the first magnitude of voltage, then the formula calculating described relative reflectance is:
If described relative reflectance is more than default relative reflectance threshold value, then judge that described determinand tends to the color of described second sample;Otherwise, it is determined that described determinand tends to the color of described 3rd sample.
14. according to Claim 8 to the device utilizing range sensor detecting distance described in 13 any one, it is characterised in that:
Described device also includes setting up synopsis module, for: with the first default distance threshold or default second distance threshold value for starting point, between described first distance threshold and described second distance threshold value, every predeterminable range value, described sample is carried out once the measurement of described sample voltage value, and by the corresponding storage with described sample voltage value of the described sample distance value between sample described when measuring and described range sensor, forming distance signal amount data described in a group, described distance signal amount synopsis includes distance signal amount data described in least one set.
CN201610100934.1A 2016-02-24 2016-02-24 A kind of method and apparatus using range sensor detecting distance Active CN105759258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610100934.1A CN105759258B (en) 2016-02-24 2016-02-24 A kind of method and apparatus using range sensor detecting distance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610100934.1A CN105759258B (en) 2016-02-24 2016-02-24 A kind of method and apparatus using range sensor detecting distance

Publications (2)

Publication Number Publication Date
CN105759258A true CN105759258A (en) 2016-07-13
CN105759258B CN105759258B (en) 2018-01-16

Family

ID=56331120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610100934.1A Active CN105759258B (en) 2016-02-24 2016-02-24 A kind of method and apparatus using range sensor detecting distance

Country Status (1)

Country Link
CN (1) CN105759258B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106842224A (en) * 2016-12-28 2017-06-13 北京小鸟看看科技有限公司 For the mounting structure detection method and device of the range sensor of electronic equipment
CN107930045A (en) * 2017-11-03 2018-04-20 杭州乾博科技有限公司 A kind of table tennis ball positioning method and system based on infrared induction
CN109254013A (en) * 2017-07-12 2019-01-22 上海宝钢工业技术服务有限公司 Non-contact type steel strip Online color-difference measurement system
CN111596302A (en) * 2020-05-21 2020-08-28 深圳市灵明光子科技有限公司 SiPM signal timing point-based distance measurement method and device
CN114063094A (en) * 2021-11-16 2022-02-18 上海索迪龙自动化有限公司 Photoelectric sensor based laser sensing distance method and photoelectric sensor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291262A (en) * 1989-03-27 1994-03-01 Dunne Jeremy G Laser surveying instrument
CN101634822A (en) * 2008-07-22 2010-01-27 佳能株式会社 Measuring apparatus, measuring method and image forming apparatus
CN103969655A (en) * 2014-05-22 2014-08-06 刘达 Accurate distance measurement device and method based on capacitor discharge voltage time difference
CN105227845A (en) * 2015-10-21 2016-01-06 广东欧珀移动通信有限公司 The calibration steps of the laser focusing device of mobile terminal and system
CN105277943A (en) * 2014-06-12 2016-01-27 德尔福国际运营卢森堡有限公司 Distance-measuring-device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291262A (en) * 1989-03-27 1994-03-01 Dunne Jeremy G Laser surveying instrument
CN101634822A (en) * 2008-07-22 2010-01-27 佳能株式会社 Measuring apparatus, measuring method and image forming apparatus
CN103969655A (en) * 2014-05-22 2014-08-06 刘达 Accurate distance measurement device and method based on capacitor discharge voltage time difference
CN105277943A (en) * 2014-06-12 2016-01-27 德尔福国际运营卢森堡有限公司 Distance-measuring-device
CN105227845A (en) * 2015-10-21 2016-01-06 广东欧珀移动通信有限公司 The calibration steps of the laser focusing device of mobile terminal and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106842224A (en) * 2016-12-28 2017-06-13 北京小鸟看看科技有限公司 For the mounting structure detection method and device of the range sensor of electronic equipment
CN109254013A (en) * 2017-07-12 2019-01-22 上海宝钢工业技术服务有限公司 Non-contact type steel strip Online color-difference measurement system
CN107930045A (en) * 2017-11-03 2018-04-20 杭州乾博科技有限公司 A kind of table tennis ball positioning method and system based on infrared induction
CN111596302A (en) * 2020-05-21 2020-08-28 深圳市灵明光子科技有限公司 SiPM signal timing point-based distance measurement method and device
CN114063094A (en) * 2021-11-16 2022-02-18 上海索迪龙自动化有限公司 Photoelectric sensor based laser sensing distance method and photoelectric sensor

Also Published As

Publication number Publication date
CN105759258B (en) 2018-01-16

Similar Documents

Publication Publication Date Title
CN105759258A (en) Method and device for detecting distance through use of distance sensor
RU2009115762A (en) COMPOSITION DEFINITION DEVICE, COMPOSITION DETERMINATION METHOD AND PROGRAM
CN105049602B (en) A kind of method and device for calibrating mobile terminal
CN102096057B (en) Calibration method and device of capacitance measurement circuit
WO2018121765A1 (en) Data processing method and apparatus for magnetometer calibration
CN104458597A (en) Camera-based method, device and system for detecting product color based on
TW201514441A (en) System and method for adjusting line laser probes of measurement machine
CN106482868A (en) Temperature difference calibration steps and its system
CN103969614A (en) Calibration method for digital multimeter
US7464579B2 (en) Calibration block
CN111198041A (en) Device and method for multi-dimensional non-contact high-precision detection of target temperature
CN103487692B (en) A kind of quality determining method of touch screen
CN108627103A (en) A kind of 2D laser measurement methods of parts height dimension
CN110133381A (en) A kind of determination method of pulse rise time uncertainty
CN105527420A (en) Detection system and method for colloidal gold quantometer
CN117372334A (en) Textile color difference detection method based on image data
CN111693176A (en) Method for cooking food by using intelligent food temperature probe
CN207779353U (en) Functional glass bending degree detecting device
CN102151128B (en) Column display pressure correction method
US10204407B2 (en) Measurement method and measurement device of critical dimension of sub-pixel
CN109579703B (en) Method and system for correcting measurement coordinates
JP6197261B2 (en) Calibration method and apparatus for measuring machine
CN108732631B (en) Wall measuring equipment and wall measuring method
CN115014241B (en) System and method for detecting three-coordinate mapping contour
TWI536224B (en) Background signal processing methods and systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant