CN106846616B - A kind of dynamic correcting method and device of sensor - Google Patents

A kind of dynamic correcting method and device of sensor Download PDF

Info

Publication number
CN106846616B
CN106846616B CN201710072979.7A CN201710072979A CN106846616B CN 106846616 B CN106846616 B CN 106846616B CN 201710072979 A CN201710072979 A CN 201710072979A CN 106846616 B CN106846616 B CN 106846616B
Authority
CN
China
Prior art keywords
current
adjusted
value
class
setting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710072979.7A
Other languages
Chinese (zh)
Other versions
CN106846616A (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201710072979.7A priority Critical patent/CN106846616B/en
Publication of CN106846616A publication Critical patent/CN106846616A/en
Application granted granted Critical
Publication of CN106846616B publication Critical patent/CN106846616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D11/00Devices accepting coins; Devices accepting, dispensing, sorting or counting valuable papers
    • G07D11/20Controlling or monitoring the operation of devices; Data handling
    • G07D11/22Means for sensing or detection

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Amplifiers (AREA)

Abstract

The embodiment of the invention discloses a kind of dynamic correcting method of sensor and devices.The described method includes: obtaining the corresponding AD value of all the sensors in the first current output channels of constant-current source in real time;The target current grade of first current output channels is determined based on dichotomy, wherein the target current grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold.The effect for efficiently completing the dynamic calibration of sensor in constant current source current output channel may be implemented by using above-mentioned technical proposal in the embodiment of the present invention.

Description

A kind of dynamic correcting method and device of sensor
Technical field
The present embodiments relate to cash transaction technical field more particularly to the dynamic correcting methods and dress of a kind of sensor It sets.
Background technique
Cash transaction equipment can provide Self-Service for user, adapt to demand of the user to the life of convenient and efficient, institute It is found broad application with cash transaction equipment.
In cash transaction equipment, usually determine that banknote separating device and bank note collect dress by the state of sensor Set the residual condition of middle bank note, whether banknote path has bank note to be judged by sensor states by being also, so Can the stability of sensor and service life directly influence cash transaction equipment and work normally.It is used in existing cash transaction equipment The working principle of sensor be to be distributed multiple sensors in banknote path two sides, each sensor includes a transmitting terminal and one A receiving end, transmitting terminal are arranged in the current output channels of constant-current source, pass through the size of current in control current output channels (current class) controls the power for the optical signal that transmitting terminal issues;Receiving end is corresponding according to the strong and weak output for receiving optical signal Sensors A D value.Wherein, the output valve of AD value, that is, analog-digital converter (Analog-to-Digital Converter, ADC), letter Claim ADC value or AD value.Specifically, the optical signal received is stronger, the sensors A D value of output is just smaller, the optical signal received Weaker, the sensors A D value of output is bigger, can determine that the bank note between current transmitting terminal and receiving end blocks feelings according to AD value Condition.
In the operational process of equipment, since bank note and machinery can generate friction and bank note itself, there are the feelings of dust Condition causes sensor surface that can have the phenomenon that dust accretions.This phenomenon not only will affect the sensitivity of sensor, Er Qiehui Cause sensor to be mistaken for bank note in no bank note to block, needs that sensor is dynamically adjusted and corrected at this time.
Summary of the invention
The embodiment of the present invention provides the dynamic correcting method and device of a kind of sensor, may be implemented efficiently to complete constant-current source The effect of the dynamic calibration of sensor in current output channels.
In a first aspect, the embodiment of the invention provides a kind of dynamic correcting methods of sensor, this method comprises:
The corresponding AD value of all the sensors in the first current output channels of constant-current source is obtained in real time;
The target current grade of first current output channels is determined based on dichotomy, wherein described target current etc. Grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold;
The target current grade that first current output channels are determined based on dichotomy, comprising:
The initial current class to be adjusted of first current output channels is arranged in step a., wherein the electricity initially to be adjusted Stream grade is N/2, and N is the total number of current class, N=2n, n is positive integer;
Step b. is obtained currently wait adjust the corresponding AD value of all the sensors under current class, and calculates current adjusting step, Wherein, the current adjusting step is N/2(m+1), m is adjustment number;
Each AD value in acquired AD value is compared by step c. with setting corrected threshold respectively, any if it exists AD value is greater than the setting corrected threshold, then increases current adjusting step on the basis of currently current class to be adjusted, obtain down One current class to be adjusted;If all AD values are respectively less than the setting corrected threshold, on the basis of currently current class to be adjusted It is upper to reduce current adjusting step, obtain next current class to be adjusted;
Circulation executes step b and step c until when meeting the first preset condition, executes step d;Wherein, described first is pre- If condition includes: current adjusting step less than 1;
Each AD value in acquired AD value is compared by step d. with setting corrected threshold respectively, any if it exists AD value is greater than the setting corrected threshold, then increases by 1 on the basis of currently current class to be adjusted, obtain target current grade; If all AD values are respectively less than the setting corrected threshold, currently current class to be adjusted is determined as target current grade.
Further, further includes: during circulation executes step b and step c, when meeting the second preset condition, Execute step e;Second preset condition include: currently current class to be adjusted and current adjusting step and be greater than setting highest Threshold value, or, currently the difference of current class to be adjusted and current adjusting step is less than setting minimum threshold;
If step e. currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, will be described Setting highest threshold value is determined as next current class to be adjusted, and returns to step b;If currently current class to be adjusted with work as The difference of preceding adjusting step is less than setting minimum threshold, then the setting minimum threshold is determined as next electric current to be adjusted etc. Grade.
Further, the constant-current source includes multiple current output channels, and the multiple current output channels are corresponding logical Road ID be stored in correction queue in, it is described based on dichotomy determine first current output channels target current grade it Afterwards, further includes:
The corresponding channel ID of first current output channels is removed into the correction queue, and stops being first electricity It flows output channel and output electric current is provided.
Further, further includes:
When the channel ID quantity in the correction queue is 0, determine that the corresponding all electric current outputs of the constant-current source are logical Channel correction finishes.
Second aspect, the embodiment of the invention also provides a kind of dynamic correction device of sensor, which includes:
AD value obtains module, and all the sensors in the first current output channels for obtaining constant-current source in real time are corresponding AD value;
Target current level determination module, for determining the target current of first current output channels based on dichotomy Grade, wherein the target current grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold;
The target current level determination module includes first object current class determination unit, the first object electric current Level de-termination unit is specifically used for executing:
The initial current class to be adjusted of first current output channels is arranged in step a., wherein the electricity initially to be adjusted Stream grade is N/2, and N is the total number of current class, N=2n, n is positive integer;
Step b. is obtained currently wait adjust the corresponding AD value of all the sensors under current class, and calculates current adjusting step, Wherein, the current adjusting step is N/2(m+1), m is adjustment number;
Each AD value in acquired AD value is compared by step c. with setting corrected threshold respectively, any if it exists AD value is greater than the setting corrected threshold, then increases current adjusting step on the basis of currently current class to be adjusted, obtain down One current class to be adjusted;If all AD values are respectively less than the setting corrected threshold, on the basis of currently current class to be adjusted It is upper to reduce current adjusting step, obtain next current class to be adjusted;
Circulation executes step b and step c until when meeting the first preset condition, executes step d;Wherein, described first is pre- If condition includes: current adjusting step less than 1;
Each AD value in acquired AD value is compared by step d. with setting corrected threshold respectively, any if it exists AD value is greater than the setting corrected threshold, then increases by 1 on the basis of currently current class to be adjusted, obtain target current grade; If all AD values are respectively less than the setting corrected threshold, currently current class to be adjusted is determined as target current grade.
Further, the target current level determination module further includes the second target current level de-termination unit, described Second target current level de-termination unit is specifically used for executing:
During circulation executes step b and step c, when meeting the second preset condition, step e is executed;Described Two preset conditions include: currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, or, currently to The difference of current class and current adjusting step is adjusted to be less than setting minimum threshold;
If step e. currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, will be described Setting highest threshold value is determined as next current class to be adjusted, and returns to step b;If currently current class to be adjusted with work as The difference of preceding adjusting step is less than setting minimum threshold, then the setting minimum threshold is determined as next electric current to be adjusted etc. Grade.
Further, the constant-current source includes multiple current output channels, and the multiple current output channels are corresponding logical Road ID is stored in correction queue, and described device further includes correction queue control module, and the correction queue control module is specific For after the target current grade for determining first current output channels based on dichotomy:
The corresponding channel ID of first current output channels is removed into the correction queue, and stops being first electricity It flows output channel and output electric current is provided.
Further, described device further include:
Current output channels correction terminates module, for determining institute when the channel ID quantity in the correction queue is 0 The corresponding all current output channels corrections of constant-current source are stated to finish.
The embodiment of the present invention is based on dichotomy to this by obtaining the AD value of sensor in constant current source current output channel The electric current exported in current output channels adjusts, so that the AD value of all the sensors meets and is less than in the current output channels Set corrected threshold requirement, solve in the prior art because between sensor transmitting terminal and receiving end due to chaff interferents such as dusts The problem of blocking and influence the AD value of sensor, instrument or equipment is caused to can not work normally is realized and efficiently completes constant-current source The effect of the dynamic calibration of sensor in current output channels.
Detailed description of the invention
Fig. 1 is the flow chart of the dynamic correcting method for the sensor that the embodiment of the present invention one provides;
Fig. 2 is the flow chart of the dynamic correcting method of sensor provided by Embodiment 2 of the present invention;
Fig. 3 is the flow chart of the dynamic correcting method for the sensor that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram of the dynamic correction device for the sensor that the embodiment of the present invention four provides;
Fig. 5 is a kind of operation principle schematic diagram for sensor that the embodiment of the present invention one provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is the flow chart of the dynamic correcting method for the sensor that the embodiment of the present invention one provides, and the present embodiment is applicable Sensor calibration situation, the dynamic correction device of this method sensor provided by the embodiment of the present invention execute, should Device can be realized by the mode of software and/or hardware, and can be integrated in automatic teller machine.
As shown in Figure 1, the dynamic correcting method of the sensor includes:
S110, the in real time corresponding AD value of all the sensors in the first current output channels of acquisition constant-current source.
Wherein, constant-current source can be a kind of control chip, the current value transmitted for controlling current output channels, and one Constant-current source can control a current output channels, also can control multiple current output channels.First current output channels can To be the physical channel for transmitting constant current under the control of constant-current source.It can connect multiple sensings in one current output channels The transmitting terminal of device provides constant current for the transmitting terminal transmitting signal of sensor.
Sensor may include transmitting terminal and receiving end, and transmitting terminal can be connected with current output channels, export in electric current Under the constant current that channel provides, emit optical signal.Wherein the emissive porwer of optical signal can be with the size of constant current at just Proportionate relationship, for example, the electric current of constant current source current output channel is bigger, the intensity that transmitting terminal emits optical signal is bigger.It receives End can be correspondingly arranged with transmitting terminal, and the optical signal that transmitting terminal emits can be converted into electric signal by receiving end, receiving end according to The size of the light signal strength received forms corresponding electric signal, for example, the optical signal received is stronger, the electricity being converted into Signal is bigger.Amplifying circuit can be set in receiving end, and the electric signal that will convert into amplifies, and then obtains voltage output Value, wherein amplifying circuit can be realized by setting triode.Voltage output value is using biography available after analog-to-digital conversion The AD value of sensor.
It is worth noting that can control and receive end voltage output value according to circuit design situation and be converted with by optical signal At the variation incidence relation of electric signal be proportional relationship or inversely prroportional relationship, wherein proportional relationship refers to that voltage is defeated The voltage value of outlet output is directly proportional to the optical signal that receiving end receives, and the optical signal that receiving end receives is stronger, and voltage is defeated The voltage value of outlet output is bigger.The light that inversely prroportional relationship refers to that the voltage value of voltage output end output and receiving end receive is believed It number is inversely proportional, the optical signal that receiving end receives is stronger, and the voltage value of voltage output end output is smaller.It is adopted in the embodiment of the present invention The case where being the voltage output value of receiving end and light signal strength that receiving end receives inversely proportional relationship, this field Technical staff by simple transformation circuit design it is conceivable that can realize other situations.
Illustratively, Fig. 5 is a kind of operation principle schematic diagram for sensor that the embodiment of the present invention one provides.Such as Fig. 5 institute Showing, the transmitting terminal of sensor includes light emitting diode 30, and light emitting diode 30, first resistor 40 and constant-current source 10 are connected in series, Light emitting diode 30 emits optical signal after being connected.Sensor receiving end is equipped with the element for converting optical signals to electric signal, such as Obtained electric signal is input in the base stage of the triode 50 in sensor receiving end by photoelectric converter, triode 50, second Resistance 70 and DC source 80 are connected in series, and can obtain the electricity of U (DC source voltage)-U (amplification voltage) in voltage output end 60 Output valve is pressed, then voltage output value progress analog-to-digital conversion can be obtained by the AD value of sensor receiving end.Wherein, work as triode 50 when being in off state, and voltage output value is U (DC source voltage), and with being gradually increased for U (amplification voltage), voltage is defeated The voltage output value that outlet 60 obtains is gradually reduced, therefore the optical signal that the voltage output value of receiving end and receiving end receive is strong Spend inversely proportional relationship.
S120, the target current grade that first current output channels are determined based on dichotomy, wherein the target electricity Stream grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold.
Wherein, dichotomy is to halve a value interval, as needed, then will be obtained after bisection two One in section is halved again, so is halved always, be stopped until obtaining a target value or target interval Only.Current class can be the grade that constant-current source controls the size of electric current in current output channels by chip pin, for example, 0000 is expressed as 0 grade, and 0001 is expressed as 1 grade, and 0010 is expressed as 2 grades.The corresponding current value of each current class, example As every two adjacent current grade current differential be 5mA when, 0000 is expressed as 0mA, and 0001 is expressed as 5mA, and 0010 is expressed as 10mA。
The target current grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold.Its Described in corrected threshold can be understood as the highest AD value that sensor can work normally, when the AD value of sensor receiving end is greater than When this corrected threshold, it is believed that the transmitting terminal of sensor and receiving end have object to block, the optical signal for causing transmitting terminal to emit Can not receiving end receives or receiving end receives light signal strength be lower than a relatively low level.In conjunction with above-mentioned When the AD value of sensor receiving end and the inversely proportional relationship of the incidence relation of light signal strength, when AD value is higher than corrected threshold, then The optical signal for illustrating that sensor receiving end receives is weaker, if the objects such as no bank note by the transmitting terminal of sensor and In the case where receiving end, then there are the chaff interferents shielding light such as more dust letters between sensor emission end and receiving end for explanation Number transmission, need to be turned up the constant current of constant current source current output channel, so that the institute in same constant-current source output channel The AD value for having the receiving end of sensor to obtain can meet the requirement less than corrected threshold.
Therefore, based on making the AD value of sensor all in constant current source current output channel be respectively less than the mesh of corrected threshold , utilize the current class in dichotomy adjustment constant current source current output channel.During adjustment, if a certain current class Under, there are the AD value of sensor be greater than corrected threshold the case where, then need to increase current class, if under a certain current class, The case where being respectively less than corrected threshold there are the AD value of sensor, then need to reduce current class, until being adjusted to that all biographies can be made The AD value of sensor is respectively less than the minimum current grade of corrected threshold, to realize that dynamic adjusts the purpose of sensor, finally with minimum Current class work normally all the sensors can, reaching to improve energy utilization rate and extend sensor service life has Beneficial effect.
The technical solution of the present embodiment by obtaining the AD value of sensor in constant current source current output channel, and is based on two Point-score adjusts the electric current exported in the current output channels so that in the current output channels all the sensors AD value Meet be less than setting corrected threshold requirement, solve in the prior art because between sensor transmitting terminal and receiving end due to dust The problem of equal chaff interferents block and influence the AD value of sensor, and instrument or equipment is caused to can not work normally is realized efficiently complete At the effect of the dynamic calibration of sensor in constant current source current output channel.
Embodiment two
Fig. 2 is the flow chart of the dynamic correcting method of sensor provided by Embodiment 2 of the present invention.The present embodiment is above-mentioned On the basis of embodiment, S120 is advanced optimized.
As shown in Fig. 2, the dynamic correcting method of the sensor includes:
S201, the in real time corresponding AD value of all the sensors in the first current output channels of acquisition constant-current source.
The initial current class to be adjusted of S202, setting first current output channels, wherein the electric current initially to be adjusted Grade is N/2, and N is the total number of current class, N=2n, n is positive integer.
The total number N of current class can be determined by constant-current source, since the total number of current class is the core by constant-current source The level signal control of piece pin, so there is N=2n, n is positive integer.Illustratively, the total number of current class can be 64, correspondingly, initial current class to be adjusted is 32.
S203, it obtains currently wait adjust the corresponding AD value of all the sensors under current class, and calculates current adjusting step.
Wherein, current adjusting step is N/2(m+1), m is adjustment number.It is current to adjust as N=64 in conjunction with above-mentioned example Step-length is 64/2(m+1).When m is 1, when as adjusting for the first time, current adjusting step is 16;When m is 2, as second When adjustment, current adjusting step is 8;When m is 5, when as the 5th time adjustment, current adjusting step is 1.Sheet is being executed for the first time When step, currently current class to be adjusted is initial current class to be adjusted.
S204, the size relation for judging current adjusting step Yu 1 execute S205 if current adjusting step is not less than 1; If preceding adjusting step executes S216 less than 1.
Because current adjusting step cannot continue dichotomy to it if it is 1, thus current adjusting step whether It is 1, or current adjusting step and 1 size relation, can be used as the first preset condition.
It is any if it exists with the presence or absence of the AD value for being greater than the setting corrected threshold in AD value acquired in S205, judgement AD value is greater than the setting corrected threshold, then executes S206;If all AD values are respectively less than the setting corrected threshold, execute S210。
Illustratively, as when currently electric current to be adjusted is 32 grade, judging, which whether there is in acquired AD value, is greater than institute The AD value for stating setting corrected threshold then illustrates in current flow output channel if there is the AD value for being more than setting corrected threshold The electric current in face is insufficient to allow all the sensors all to work normally, so needing to increase current class;If there is no more than setting The AD value of corrected threshold then illustrates that the electric current above current flow output channel is enough to work normally all the sensors all, institute To need to reduce current class, to obtain the minimum current class that all the sensors can be made all to work normally.
Currently whether current class to be adjusted is highest threshold value for S206, judgement, if so, executing S207;If it is not, then executing S208。
Wherein, after highest threshold value refers to that the optical signal received is converted to electric signal by sensor receiving end, can make Current class of the amplifying circuit work of receiving end in the current output channels corresponding to the highest AD value in amplification section, accordingly , there may also be minimum thresholds.
S207, error information is returned.
When current class to be adjusted has been highest threshold value, still there is the AD value of sensor to be greater than setting corrected threshold When, then return to error information.The error information may include the sensor coding that AD value is greater than the setting corrected threshold.
S208, increase current adjusting step on the basis of currently current class to be adjusted, obtain next electric current to be adjusted etc. Grade.
If current current class to be adjusted is 32 grades, and when 32 grades are not the current classes of highest threshold value, because In S205 it is determined that under current current class to be adjusted, however it remains the AD value of sensor is greater than the setting and corrects threshold Value increases current step 16 then on the basis of currently current class to be adjusted, and obtaining next current class to be adjusted is 48.
S209, judgement currently current class to be adjusted and current adjusting step and whether be greater than setting highest threshold value, if It is greater than, then executes S210, and returns and execute S203;If being not more than, returns and execute S203.
Wherein, the highest critical point of the linear amplification region of amplifying circuit where highest threshold value can be sensor receiving end The current class of corresponding constant current source current output channel.In conjunction with above-mentioned example, when on the basis of currently current class to be adjusted On, increase current step 16, obtain next when adjusting current class is 48, needs to judge that whether current class is 48 greater than setting Determine highest threshold value, because if being greater than the setting highest threshold value, does not then anticipate with 48 for next current class to be measured Justice, so being judged before as next current class to be measured.
S210, the setting highest threshold value is determined as next current class to be adjusted.
In conjunction with above-mentioned example, when setting highest threshold value as 46, currently current class to be adjusted and current adjustment are walked for judgement It is long and 48 are greater than 46, then using 46 as next current class to be adjusted.
Currently whether current class to be adjusted is minimum threshold for S211, judgement, if so, executing S212;If it is not, then executing S213。
Wherein, the minimum critical point of the linear amplification region of amplifying circuit where minimum threshold can be sensor receiving end The current class of corresponding constant current source current output channel.
S212, determine that the minimum threshold is the target current grade.
Since judging result is that the AD value for being greater than the setting corrected threshold is not present in acquired AD value in S205, So when judging not needing then to reduce current class again, directly with minimum door currently when adjusting current class as minimum threshold Limit value is as target current grade.
S213, current adjusting step is reduced on the basis of currently current class to be adjusted, obtain next electric current to be adjusted etc. Grade.
In conjunction with above-mentioned example, currently, when adjusting current class 32, the AD value of all the sensors is both less than the setting school When the AD value of positive threshold value, then reduces current adjusting step 16 on the basis of currently current class 32 to be adjusted, obtain under 16 conducts One current class to be adjusted.
Currently whether the difference of current class to be adjusted and current adjusting step is less than setting minimum threshold for S214, judgement, if It is less than, then executes S215, and returns and execute S203;If being not less than, returns and execute S203.
S215, the setting minimum threshold is determined as next current class to be adjusted.
When currently whether the difference of current class to be adjusted and current adjusting step, will be described less than setting minimum threshold for judgement Setting minimum threshold is determined as next current class to be adjusted.
S216, respectively by acquired AD value each AD value with setting corrected threshold be compared, it is any if it exists AD value is greater than the setting corrected threshold, then increases by 1 on the basis of currently current class to be adjusted, obtain target current grade; If all AD values are respectively less than the setting corrected threshold, currently current class to be adjusted is determined as target current grade.
Illustratively, if judge overcurrent grade for 16 before, the AD value of all the sensors is both less than the setting Corrected threshold, when also judging overcurrent grade for 14, there are the AD values of sensor to be greater than the setting corrected threshold, and adjusts step A length of 1, then judge that current class is 15 at present, due to next step adjusting step is computed should be for 0.5, less than 1, then direct end Only cyclic process, when judge that current class is 15 at present, and working as current judging result is that there are the AD values of sensor greater than institute When stating setting corrected threshold, determine that current class is 16 for target current grade;When current judging result is all the sensors Then be 15 as target current grade using current class when AD value is respectively less than corrected threshold, and terminate sensor AD value it is dynamic State correction.
The present embodiment on the basis of the above embodiment 1, gives and determines that the first electric current output is logical based on dichotomy The specific implementation process of the target current grade in road can be quick, high by the method using dichotomy dynamic calibration sensor The completion of effect saves time cost and labour cost to the dynamic calibration of sensor.
Embodiment three
Fig. 3 is the flow chart of the dynamic correcting method for the sensor that the embodiment of the present invention three provides.The present embodiment is above-mentioned On the basis of each embodiment, advanced optimized.
As shown in figure 3, the dynamic correcting method of the sensor includes:
S310, the in real time corresponding AD value of all the sensors in the current flow output channel of acquisition constant-current source.Wherein, institute Stating constant-current source includes multiple current output channels, and the corresponding channel ID of the multiple current output channels is stored in correction queue In.
Wherein it is possible to multiple current output channels for constant-current source are arranged ID, and by multiple current output channels pair The channel ID answered is stored in correction queue, and correcting ID all in queue is current output channels to be corrected.
S320, the target current grade that the current flow output channel is determined based on dichotomy, wherein the target electricity Stream grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold.
S330, the corresponding channel ID of the current flow output channel is removed into the correction queue, and stops being described Current flow output channel provides output electric current.
After completing correction to the current output channels, the ID of the current output channels is removed into correction queue, and stop Continue to provide output electric current to the current output channels.
S340, when it is described correction queue in channel ID quantity be 0 when, determine that the corresponding all electric currents of the constant-current source are defeated Channel correcting finishes out.
When correcting the current output channels ID quantity in queue is 0, it is determined that complete to export all electric currents of constant-current source The correction in channel.
It is worth noting that sensor dynamic correcting method provided in this embodiment be can to the same current source or All current output channels of multiple current sources carry out correction simultaneously, as soon as every corrected a channel, by channel removal team Column, until when the current output channels ID quantity in correction queue is 0, that is, after the target current for determining each current output channels Complete correction.
The present embodiment provides the side to multiple current output channels while correction on the basis of the various embodiments described above Method can improve the dynamic school of the AD value of sensor to avoid to the repetition preparation before the correction of each current output channels Positive efficiency.
Example IV
Fig. 4 is the structural schematic diagram of the dynamic correction device for the sensor that the embodiment of the present invention four provides.As shown in figure 4, The dynamic correction device of the sensor, comprising:
AD value obtains module 410, all the sensors pair in the first current output channels for obtaining constant-current source in real time The AD value answered;
Target current level determination module 420, for determining the target of first current output channels based on dichotomy Current class, wherein the target current grade is to meet all AD values to be respectively less than the minimum current for setting corrected threshold Grade.
The technical solution of the present embodiment by obtaining the AD value of sensor in constant current source current output channel, and is based on two Point-score adjusts the electric current exported in the current output channels so that in the current output channels all the sensors AD value Meet be less than setting corrected threshold requirement, solve in the prior art because between sensor transmitting terminal and receiving end due to dust The problem of equal chaff interferents block and influence the AD value of sensor, and instrument or equipment is caused to can not work normally is realized efficiently complete At the effect of the dynamic calibration of sensor in constant current source current output channel.
On the basis of the various embodiments described above, the target current level determination module 420 includes first object electric current etc. Grade determination unit, the first object current class determination unit are specifically used for executing:
The initial current class to be adjusted of first current output channels is arranged in step a., wherein the electricity initially to be adjusted Stream grade is N/2, and N is the total number of current class, N=2n, n is positive integer;
Step b. is obtained currently wait adjust the corresponding AD value of all the sensors under current class, and calculates current adjusting step, Wherein, the current adjusting step is N/2(m+1), m is adjustment number;
Each AD value in acquired AD value is compared by step c. with setting corrected threshold respectively, any if it exists AD value is greater than the setting corrected threshold, then increases current adjusting step on the basis of currently current class to be adjusted, obtain down One current class to be adjusted;If all AD values are respectively less than the setting corrected threshold, on the basis of currently current class to be adjusted It is upper to reduce current adjusting step, obtain next current class to be adjusted;
Circulation executes step b and step c until when meeting the first preset condition, executes step d;Wherein, described first is pre- If condition includes: current adjusting step less than 1;
Each AD value in acquired AD value is compared by step d. with setting corrected threshold respectively, any if it exists AD value is greater than the setting corrected threshold, then increases by 1 on the basis of currently current class to be adjusted, obtain target current grade; If all AD values are respectively less than the setting corrected threshold, currently current class to be adjusted is determined as target current grade.
On the basis of the various embodiments described above, the target current level determination module 420 further includes the second target current Level de-termination unit, the second target current level de-termination unit are specifically used for executing:
During circulation executes step b and step c, when meeting the second preset condition, step e is executed;Described Two preset conditions include: currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, or, currently to The difference of current class and current adjusting step is adjusted to be less than setting minimum threshold;
If step e. currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, will be described Setting highest threshold value is determined as next current class to be adjusted, and returns to step b;If currently current class to be adjusted with work as The difference of preceding adjusting step is less than setting minimum threshold, then the setting minimum threshold is determined as next electric current to be adjusted etc. Grade.
On the basis of the various embodiments described above, the constant-current source includes multiple current output channels, and the multiple electric current is defeated The corresponding channel ID in channel is stored in correction queue out, and described device further includes correction queue control module, the calibration force Column control module is specifically used for after the target current grade for being determined first current output channels based on dichotomy:
The corresponding channel ID of first current output channels is removed into the correction queue, and stops being first electricity It flows output channel and output electric current is provided.
On the basis of the various embodiments described above, described device further include:
Current output channels correction terminates module, for determining institute when the channel ID quantity in the correction queue is 0 The corresponding all current output channels corrections of constant-current source are stated to finish.
Method provided by any embodiment of the invention can be performed in the said goods, has the corresponding functional module of execution method And beneficial effect.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (8)

1. a kind of dynamic correcting method of sensor characterized by comprising
The corresponding AD value of all the sensors in the first current output channels of constant-current source is obtained in real time;
The target current grade of first current output channels is determined based on dichotomy, wherein the target current grade is Meet all AD values and is respectively less than the minimum current grade for setting corrected threshold;
The target current grade that first current output channels are determined based on dichotomy, comprising:
The initial current class to be adjusted of first current output channels is arranged in step a., wherein described electric current initially to be adjusted etc. Grade is N/2, and N is the total number of current class, N=2n, n is positive integer;
Step b. is obtained currently wait adjust the corresponding AD value of all the sensors under current class, and calculates current adjusting step, wherein The current adjusting step is N/2(m+1), m is adjustment number;
Each AD value in acquired AD value is compared by step c. with setting corrected threshold respectively, if it exists any AD value Greater than the setting corrected threshold, then increase current adjusting step on the basis of currently current class to be adjusted, obtains next Current class to be adjusted;If all AD values are respectively less than the setting corrected threshold, subtract on the basis of currently current class to be adjusted Few current adjusting step, obtains next current class to be adjusted;
Circulation executes step b and step c until when meeting the first preset condition, executes step d;Wherein, the described first default item Part includes: current adjusting step less than 1;
Each AD value in acquired AD value is compared by step d. with setting corrected threshold respectively, if it exists any AD value Greater than the setting corrected threshold, then increase by 1 on the basis of currently current class to be adjusted, obtains target current grade;If institute There is AD value to be respectively less than the setting corrected threshold, then currently current class to be adjusted is determined as target current grade.
2. the method according to claim 1, wherein further include: the process of step b and step c are executed in circulation In, when meeting the second preset condition, execute step e;Second preset condition includes: current current class to be adjusted and current Adjusting step and be greater than setting highest threshold value, or, currently the difference of current class to be adjusted and current adjusting step is less than setting Minimum threshold;
If step e. currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, by the setting Highest threshold value is determined as next current class to be adjusted, and returns to step b;If currently current class to be adjusted and current tune The long difference of synchronizing is less than setting minimum threshold, then the setting minimum threshold is determined as next current class to be adjusted.
3. described the method according to claim 1, wherein the constant-current source includes multiple current output channels The corresponding channel ID of multiple current output channels is stored in correction queue, determines first electric current based on dichotomy described After the target current grade of output channel, further includes:
The corresponding channel ID of first current output channels is removed into the correction queue, and stops being that first electric current is defeated Channel provides output electric current out.
4. according to the method described in claim 3, it is characterized by further comprising:
When the channel ID quantity in the correction queue is 0, the corresponding all current output channels schools of the constant-current source are determined Just finish.
5. a kind of dynamic correction device of sensor characterized by comprising
AD value obtains module, the corresponding AD of all the sensors in the first current output channels for obtaining constant-current source in real time Value;
Target current level determination module, for determining the target current etc. of first current output channels based on dichotomy Grade, wherein the target current grade is to meet all AD values to be respectively less than the minimum current grade for setting corrected threshold;
The target current level determination module includes first object current class determination unit, the first object current class Determination unit is specifically used for executing:
The initial current class to be adjusted of first current output channels is arranged in step a., wherein described electric current initially to be adjusted etc. Grade is N/2, and N is the total number of current class, N=2n, n is positive integer;
Step b. is obtained currently wait adjust the corresponding AD value of all the sensors under current class, and calculates current adjusting step, wherein The current adjusting step is N/2(m+1), m is adjustment number;
Each AD value in acquired AD value is compared by step c. with setting corrected threshold respectively, if it exists any AD value Greater than the setting corrected threshold, then increase current adjusting step on the basis of currently current class to be adjusted, obtains next Current class to be adjusted;If all AD values are respectively less than the setting corrected threshold, subtract on the basis of currently current class to be adjusted Few current adjusting step, obtains next current class to be adjusted;
Circulation executes step b and step c until when meeting the first preset condition, executes step d;Wherein, the described first default item Part includes: current adjusting step less than 1;
Each AD value in acquired AD value is compared by step d. with setting corrected threshold respectively, if it exists any AD value Greater than the setting corrected threshold, then increase by 1 on the basis of currently current class to be adjusted, obtains target current grade;If institute There is AD value to be respectively less than the setting corrected threshold, then currently current class to be adjusted is determined as target current grade.
6. device according to claim 5, which is characterized in that the target current level determination module further includes the second mesh Current class determination unit is marked, the second target current level de-termination unit is specifically used for executing:
During circulation executes step b and step c, when meeting the second preset condition, step e is executed;Described second is pre- If condition include: currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, or, currently electricity to be adjusted The difference for flowing grade and current adjusting step is less than setting minimum threshold;
If step e. currently current class to be adjusted and current adjusting step and be greater than setting highest threshold value, by the setting Highest threshold value is determined as next current class to be adjusted, and returns to step b;If currently current class to be adjusted and current tune The long difference of synchronizing is less than setting minimum threshold, then the setting minimum threshold is determined as next current class to be adjusted.
7. device according to claim 5, which is characterized in that the constant-current source includes multiple current output channels, described The corresponding channel ID of multiple current output channels is stored in correction queue, and described device further includes correction queue control module, The correction queue control module is specifically used in the target electricity for being determined first current output channels based on dichotomy After stream grade:
The corresponding channel ID of first current output channels is removed into the correction queue, and stops being that first electric current is defeated Channel provides output electric current out.
8. device according to claim 7, which is characterized in that described device further include:
Current output channels correction terminates module, for determining the perseverance when the channel ID quantity in the correction queue is 0 The corresponding all current output channels corrections in stream source finish.
CN201710072979.7A 2017-02-10 2017-02-10 A kind of dynamic correcting method and device of sensor Active CN106846616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710072979.7A CN106846616B (en) 2017-02-10 2017-02-10 A kind of dynamic correcting method and device of sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710072979.7A CN106846616B (en) 2017-02-10 2017-02-10 A kind of dynamic correcting method and device of sensor

Publications (2)

Publication Number Publication Date
CN106846616A CN106846616A (en) 2017-06-13
CN106846616B true CN106846616B (en) 2019-06-11

Family

ID=59122924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710072979.7A Active CN106846616B (en) 2017-02-10 2017-02-10 A kind of dynamic correcting method and device of sensor

Country Status (1)

Country Link
CN (1) CN106846616B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111856616B (en) 2019-04-29 2023-10-27 威海新北洋数码科技有限公司 Correction method of sensor in vending machine and vending machine

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9723306D0 (en) * 1997-11-05 1998-01-07 Ncr Int Inc System for detecting superposed sheets
KR100503799B1 (en) * 2003-07-24 2005-07-26 삼성전자주식회사 Method and apparatus controlling a light power
US7289924B2 (en) * 2005-07-20 2007-10-30 Honeywell International Inc. Self-calibrating sensor
CN101350676B (en) * 2008-09-03 2011-05-04 烽火通信科技股份有限公司 Automatic average optical power control system for bursting light emission module
CN103528714B (en) * 2013-09-27 2016-11-02 上海贝岭股份有限公司 The temperature calibration instrument of integrated CMOS temperature sensor and method
CN105741413B (en) * 2015-08-05 2019-04-26 深圳怡化电脑股份有限公司 Withdrawal equipment and its dynamic calibration sensor and bearing calibration and device

Also Published As

Publication number Publication date
CN106846616A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN103364082B (en) Photodetector device and the method for biasing photomultiplier
TW200630892A (en) High speed analog envelope detector
CN104777475B (en) A kind of indoor visible light strength location system comprising error correction
TWI650963B (en) Optical receiver
WO2005078969A1 (en) Automatic bit rate control circuit
KR20100033526A (en) Sensor device and method for detecting the turbidity of wash liquor
CN106846616B (en) A kind of dynamic correcting method and device of sensor
CN110462846B (en) Light detector
CN105094461A (en) Apparatus and method for testing touch pressure
KR100946487B1 (en) Light receiver
WO2018211801A1 (en) Optical sensor and electronic device
KR101395330B1 (en) Single photon detector, photon number resolving detector and detecting method thereof
CN111093490B (en) Signal adjusting method and device and computer storage medium
CN105471505B (en) A kind of signal modulating method, device and visible light communication system
JP2011007618A (en) Light pulse test apparatus
US11076473B2 (en) Method for detecting a defect in an LED string and electronic circuit with at least one LED string
Binh et al. Demonstration of 300 Mbit/s free space optical link with commercial visible LED
US10365319B2 (en) Apparatus for determining deterioration of photocoupler
CN101770030A (en) Distance measuring device and control method thereof
US10969477B2 (en) Method to detect a signal and optoelectronic sensor
CN213986767U (en) Circuit for detecting light flicker
CN111698029B (en) Detection method, setting method and detection device of visible light communication system
EP1510828A1 (en) Photoelectric current and voltage converting circuit
US20100092094A1 (en) Brightness detection system
CN111766595B (en) Optical sensor device and method for operating an optical sensor device

Legal Events

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