CN110429934A - A kind of jamproof adaptometer counting method - Google Patents

A kind of jamproof adaptometer counting method Download PDF

Info

Publication number
CN110429934A
CN110429934A CN201910711917.5A CN201910711917A CN110429934A CN 110429934 A CN110429934 A CN 110429934A CN 201910711917 A CN201910711917 A CN 201910711917A CN 110429934 A CN110429934 A CN 110429934A
Authority
CN
China
Prior art keywords
round
signal
ellipse
twice
counting
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
CN201910711917.5A
Other languages
Chinese (zh)
Other versions
CN110429934B (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.)
Xi'an Star Boat Tianqi Intelligent Equipment Co Ltd
Original Assignee
Xi'an Star Boat Tianqi Intelligent Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Star Boat Tianqi Intelligent Equipment Co Ltd filed Critical Xi'an Star Boat Tianqi Intelligent Equipment Co Ltd
Priority to CN201910711917.5A priority Critical patent/CN110429934B/en
Publication of CN110429934A publication Critical patent/CN110429934A/en
Application granted granted Critical
Publication of CN110429934B publication Critical patent/CN110429934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K21/00Details of pulse counters or frequency dividers
    • H03K21/08Output circuits
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K21/00Details of pulse counters or frequency dividers
    • H03K21/40Monitoring; Error detection; Preventing or correcting improper counter operation

Landscapes

  • Geophysics And Detection Of Objects (AREA)

Abstract

The invention discloses a kind of jamproof adaptometer counting methods, using adaptive method, the movement speed of round or approximate circle object on monolithic machine testing conveyer belt, two rows of transmitters send infrared light respectively and are irradiated to the round or approximate circle object on conveyer belt, receiver detects the light intensity value that corresponding two transmitters issue in different moments, the gap periods of single-chip microcontroller setting valley detection twice, clock cycle and round or ellipse object marker signal hold period between valley value twice inside real-time update, valley detection is carried out to voltage sample twice by receiver;If two rows of transmitters are in closed state, into the screening twice of round or ellipse object marker signal, single-chip microcontroller realizes the counting to round or ellipse object by step-by-step counting.The method of the present invention can be improved precision, and extend simply, easy to operate.

Description

A kind of jamproof adaptometer counting method
Technical field
The invention belongs to signal processing technology fields, and in particular to a kind of jamproof adaptometer counting method.
Background technique
With economic and science and technology rapid development, living standard is continuously improved, and is realized from simple function to deeper time Human oriented design, people require production automation degree higher and higher, and artificial intelligence becomes hot spot instantly.Tally function relates to And all trades and professions, become the necessity of our lives.The disadvantages of this method of artificial counting is time-consuming, and error is big, at high cost, not Meet people pursue " convenience ", " energy conservation ", " accurate " idea.The appearance of robot scaler solves these problems, " high The advantages that effect ", " low cost ", " practical ", meets the majority of consumers' demand, is widely used in the counting system of pile line operation In system.
In the transmission control of production process, counting device becomes required.Testee is located in transmission guide device, when When being moved to counting device detection zone, counting device carries out algorithm demodulation according to body surface provincial characteristics, calculates object number Amount.The conveyer belt used in production transmit process, runs, the speed control of operation is not very smart under the drive of the motor Really, opened loop control is generally used.Under different application purposes, the conveyor belt speed of setting is not also identical, even if in same occasion Under, when conveyer belt operation, with the variation loaded on conveyer belt, speed can also change therewith.With conveyor belt speed Variation, the mobile speed of round or ellipse object can also change therewith, so passing through the time of counting device detection zone Also different.If the speed of transmission is higher or lower than some value, it is not suitable with the periodic quantity of setting, beyond detection two in the set time The period of a valley has an impact counting device correctness, causes error count.
Summary of the invention
In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is that providing a kind of jamproof Adaptometer counting method, consistent with conveyor belt speed by detecting round or ellipse object movement speed, adjust automatically counts Periodicity in trough detection function in method solves original algorithm because transmission speed variation bring is missed by the way of adaptive Difference.
The invention adopts the following technical scheme:
A kind of jamproof adaptometer counting method, using adaptive method, it is round on monolithic machine testing conveyer belt or The movement speed of approximate circle object, conveyer belt top vertical spacing are provided with two rows of transmitters, are arranged between two rows of transmitters There is row's receiver, two rows of transmitters send infrared light respectively and are irradiated to the round or approximate circle object on conveyer belt, Receiver detects the light intensity value that corresponding two transmitters issue, the interval of single-chip microcontroller setting valley detection twice in different moments Period, clock cycle and round or ellipse object marker signal hold period between valley value twice inside real-time update lead to It crosses receiver and valley detection is carried out to voltage sample twice, if first row transmitter is in the open state, into for the first time Valley detection;If second row transmitter is in the open state, into second of valley detection;If two rows of transmitters are in Closed state, into the screening twice of round or ellipse object marker signal, single-chip microcontroller is realized by step-by-step counting to circle Or the counting of oblong object.
Specifically, the following steps are included:
S1, initiation parameter;
S2, two-way low level pulse signal is generated using timer interruption, two-way voltage pulse signal is exported respectively to two Discharge emitter both ends, the opening of control transmitter and shut-in time, low level width determine the time that transmitter is opened;
S3, valley detection process is started according to status indication signal in periodic signal;
S4, detection round or ellipse object movement speed, count the periodic inequality that trough occurs twice on the same channel, Update next valley detection cycle T 1 and round or ellipse object marker signal hold period T2;
S5, it is in closed state for two rows of transmitters in periodic signal flag state, when being in the phase III, to existing Untreated round or ellipse object marker signal carries out postsearch screening output judgement, judges whether to be round or oval object First effective marking signal that body is generated by counting device.
Further, in step S2, the timer of single-chip microcontroller generates the week of a width 3ms low level and 30ms high level Phase signal is exported to the transmitter both ends of first row, is then generated a same periodic signal and is exported to the transmitter of second row Both ends, the signal of second row transmitter are delayed 3ms than the signal of first row transmitter, and receiver marks following state respectively: The energized state of first row transmitter, the energized state of second row transmitter and two rows of lights are in the state of closing.
Further, in step S3, if the transmitter that flag state is first row is opened, first time trough inspection is carried out It surveys, A/D sampling is carried out to each receiver both end voltage, upper limit value is arranged and using five-spot successively to each to voltage signal Receiving channel carries out valley detection;0.6 times of maximum voltage is set as to the upper voltage limit of A/D sampling, after detecting trough, First time valley detection is carried out labeled as true to respective channel.
Further, in step S3, if flag state is second row transmitter opening, second of trough inspection is carried out It surveys, A/D sampling is carried out to the voltage at each receiver both ends and first judges same channels before carrying out second of valley detection Middle first time valley detection mark whether be it is true, if true, then in cycle T 1, using same method successively to it is each receive it is logical Road carries out second of valley detection, detects trough twice within the same receiving channel setting period, then it is assumed that be one and meet The round or ellipse object marker signal of condition;T2 period of caching, T2 period are carried out to round or ellipse object signal Cover two or three marking signal time of occurrence.
Further, time interval T is calculated such as between the trough twice that round or ellipse object is generated by counting device Under:
Wherein, L is distance between two rows of transmitters, and V is round or oval object movement speed.
Further, it in step S4, is opened when generating trough from the transmitter for detecting first row using count internal mode Begin to count, after same channels detect second of trough, the statistics periodic inequality that trough occurs twice;It is examined updating trough twice It surveys cycle T 1 simultaneously, updates 1.5 times that round or ellipse object marker signal hold period T2 is T1.
Further, such as in one cycle, the Air conduct measurement there are two or more is to trough twice, then reply is each The periodic inequality in channel carries out processing of averaging, and as final period difference, is updating next time valley detection cycle T 1 twice When should increase by 5 periods in the periodic quantity detected, expand boundary value.
Further, in step S5, there are round or ellipse object markers successively to be checked whether to each channel first Signal;If it does, checking whether processing marking signal;If untreated, into screening twice;
In first time screening process, to current untreated round or ellipse object marker signal, adjacency channel into Row differentiation processing, if adjacency channel is generated without marking signal, then it is assumed that current untreated round or ellipse object Marking signal is round or oval first effective marking signal of object generation;
Programmed screening is carried out after the completion of screening first time, in programmed screening, successively each channel is sentenced It is disconnected, if there are effective marking signals in some channel, then judge that the right with the presence or absence of marking signal, then exports circle if it does not exist Or oblong object counts pulse, judges into next channel.
Further, in first time screening process, if there are marking signals on right side, judge whether second, right side deposits In effective round or ellipse object marker signal, and if it exists, this significant notation is removed, is not handled then if it does not exist, it is defeated Round or ellipse object count pulse out carries out the pulse of round or ellipse object by pulse-scaling circuit;
During programmed screening, if there is the generation of round or ellipse object marker signal in the adjacent channel in right side, and Left side does not have, then judges second right;If there is round or ellipse object marker signal in the adjacent channel in left side It generates, and right side does not have, then judges second left;If left and right side has round or ellipse object marker Signal then needs to judge the signal of the left and right sides.
Compared with prior art, the present invention at least has the advantages that
A kind of jamproof adaptometer counting method of the present invention can be according to conveyer belt using adaptive method of counting Different parameters are arranged in speed, are applied to different occasions, have good external anti-interference.Velocity measuring is counted using the intercycle Number mechanism counts the clock cycle between valley value twice, statistical value was constantly updated to the period and is arranged on the same receiver Parameter, the method corrective measure is realized in inside, does not need to increase any equipment.Multiple round or ellipse objects pass through meter When counting apparatus, each receiver both end voltage waveform is more complex, and usually several envelopes link together.This algorithm can be according to week Parameter is arranged in phase, distinguishes the valley value that a round or ellipse object is generated in different moments, is further round or oval Shape object count algorithm provides foundation, improves while detecting the accuracy of multiple round or ellipse objects.It is different round or ellipse Circular object has size, comes in every shape, may be in one or two even three receivers when passing through counting device Qualified trough is generated in both end voltage.There are two kinds of situations for the case where three troughs generate: first is three receivers There is valley value simultaneously in both ends, and second is valley value occur in three receiver both ends different moments.Second situation is needed Consider to cache the marking signal of each receiver, and keep some cycles, in programmed screening, marking signal is carried out Judgement is chosen the marking signal that one occurs at first from all marking signals of round or ellipse object and is counted as effective Other signals are done invalidation by number signal.
Further, the two-way low level pulse signal generated by timer, output to two rows of transmitter both ends, timesharing control The switch of transmitter processed, first row transmitter turn off after opening 3ms, and and then second row transmitter turns off after opening 3ms, and second Discharge emitter service time is than first row delay 3ms.Two rows of transmitters are set, pass through inspection in the same round or ellipse object When surveying device, can detect voltage trough signal twice in the timesharing of receiver both ends, detection twice trough signal for object meter Number more accurate and effective.
Further, the light that detection first row transmitter issues is the inspection of first time trough in the voltage that receiver both ends generate It surveys, first time valley detection is the premise to object count, it is necessary to after detecting the valley value that first row transmitter generates, just open The detection of beginning second row, valley value twice must successively be detected by counting to the object by device, could correctly be counted Number.
Further, the light that detection second row transmitter issues is second of trough inspection in the voltage that receiver both ends generate It surveys, second of valley detection is in order to avoid a valley detection bring error, and valley detection is relative to a trough twice Detection, condition is tightened up, and false detection rate is lower, improves method of counting accuracy.
Further, difference is arranged according to conveyor width, different detection zones can be set.Can by increase or Detection lamp quantity is reduced to adapt to conveyor width, it is only necessary to modify sense channel number.
Further, marking signal retention cycle oblong or the variation of oblong object movement speed, are valley values twice Between 1.5 times of the period.Carry out automatic update mark letter according to the corresponding periodicity of detection round or ellipse object movement speed Number retention cycle is the postsearch screening for carrying out round or ellipse physical quantities statistics, excludes extra marking signal to count value It influences.
Further, the number of each discharge shot-light and reception lamp is determined by different conveyor widths, two neighboring lamp Distance (the vertical object direction of motion) is fixed, about 13mm, due to device mounting height, testee echo area size and shape State, the difference of valley detection voltage threshold may be examined when a testee passes through device in 1-3 adjacent channels Measure the marking signal of trough twice, it is necessary to handle these marking signals, i.e. postsearch screening, different channels need to be distinguished Whether marking signal is that the same object generates or different objects generate, and each object can only have an effective label Signal, other marking signals should not be used as count value.
In conclusion the present invention not only adapts to the friction speed of conveyer belt setting according to application difference, moreover it is possible to suitable It should be because of velocity variations caused by the variation that is loaded on conveyer belt.By the way of the detection of inside, do not need by any additional inspection Measurement equipment reduces cost, can accurately detect multiple round or ellipse objects continuously side by side by counting device, by mark Remember signal caching, carry out postsearch screening, improves precision, and extension is simple, it is easy to operate.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Fig. 1 is the method for the present invention counting device schematic diagram;
Fig. 2 is luminous intensity and voltage relationship figure;
Fig. 3 is that the present invention realizes hardware elementary diagram;
Fig. 4 is present invention demodulation square-wave cycle figure;
Fig. 5 is flow chart of the present invention.
Wherein: 1. transmitters;2. receiver;3. conveyer belt;4. object.
Specific embodiment
The present invention provides a kind of jamproof adaptometer counting methods, are solved by the way of adaptive because of transmission speed Change bring error, by detection circle or approximate circle object movement speed, the interval of automatic setting valley detection twice Period, to adapt to different transmission tape running speeds.
Referring to Fig. 5, a kind of jamproof adaptometer counting method of the present invention, to detect round or ellipse object automatically Based on movement speed, clock cycle and round or ellipse object marker signal are protected between valley value twice inside real-time update The period is held, is correctly counted to by the round or ellipse object of counting device, initialization, transmitter control, wave are divided into Paddy detection, velocity measuring and postsearch screening export five steps, the specific steps are as follows:
S1, initialization global parameter, and to peripheral hardware and interrupt progress Initialize installation;
Single-chip microcontroller pin is configured according to demand, parameter setting is carried out to timer, single-chip microcontroller inside A/D is sampled Module carries out parameter setting, configures interrupt register, opens global interrupt, after initialization is provided with, simultaneously into major cycle Respond associated timer interrupt signal.
S2, transmitter control generate two-way low level pulse signal, two-way voltage pulse signal point using timer interruption Transmitter Shu Chu not be determined to two rows of transmitter both ends, the switch of control transmitter and the time of opening, low level width The time of opening;
Timer inside single-chip microcontroller generates the period letter of the low level that a width is 3ms and the high level of 30ms first Number output then generates a same periodic signal and exports to second row transmitter to first row transmitter both ends, and second Than first signal delay 3ms of signal, as shown in figure 4, solid line represents two end signal of first row transmitter, dotted line represents second row Two end signal of transmitter.The different moments for controlling two rows of transmitters send infrared light, and receiver detects correspondence in different moments The light intensity value that transmitter issues has on each comb wave if the comb wave of different height is presented in receiver both end voltage signal Two steps, the corresponding light intensity for receiving the infrared light that different transmitters issue of each step.
Two-way pulse output control signal is not only generated, but also gives the status indication of each state, is marked respectively The energized state of first row transmitter out, the energized state of second row transmitter, two rows of lights are in the state of closing.
S3, valley detection are to start valley detection process according to status indication signal in periodic signal;
If flag state is that first row transmitter is in opening, first time valley detection is carried out.To each receiver two It holds voltage to carry out A/D sampling, voltage signal is arranged after upper limit value, wave is successively carried out to each receiving channel using five-spot Paddy detection.It is critically important to judge after the voltage setting upper limit value of A/D sampling, some interference signals can be filtered out.On voltage The setting of limit value is critically important, if setting is too small, it is likely that miss some effective round or ellipse object marker signals;If What is be arranged is too big, then qualified marking signal is excessive, increases algorithm complexity.According to many experiments as a result, by voltage Online 0.6 times for being set as maximum voltage.After upper voltage limit is set, it is possible to reduce the increased algorithm expense of interference signal.Work as inspection After measuring trough, first time valley detection is carried out labeled as true to respective channel.
If flag state is that second row transmitter is in opening, second of valley detection is carried out.Also to each receiver Both end voltage, which carries out A/D sampling, will first judge first time valley detection in same channels before carrying out second of valley detection Mark whether to be true, if true, then in cycle T 1, the second subwave is successively carried out to each receiving channel using same method Paddy detection detects trough twice within the same receiving channel setting period, then it is assumed that is one qualified round or ellipse Circular object marking signal, there may be one, two even three continuous labels for the same round or ellipse object Signal.The marking signal of different number, two or three may occur in synchronization, it is also possible in different moments.It needs pair Round or ellipse object signal carries out the T2 period of caching, and the T2 period should cover two or three marking signal time of occurrence, It is generated in this case, two or three marking signals can be distinguished from the same round or ellipse object.
S4, velocity measuring are detection round or ellipse object movement speeds, count on the same channel that trough goes out twice Existing periodic inequality updates next valley detection cycle T 1 and round or ellipse object marker signal hold period T2;
Velocity measuring uses count internal mode, starts counting from the trough for detecting that first row transmitter generates, in phase After Air conduct measurement to second of trough, the statistics periodic inequality that trough occurs twice.Such as in one cycle, there are two or more Air conduct measurement to trough twice, then should the periodic inequality to each channel carry out processing of averaging, as final period difference, 5 periods should be increased in the periodic quantity detected when updating valley detection cycle T 1 twice next time, expand boundary value, prevented Only secondary trough check bit is on boundary, causing to detect the unstable imagination.
Simultaneously, round or ellipse object marker signal hold period T2 is updated updating valley detection cycle T 1 twice, It is 1.5 times of T1.It allows round or ellipse object marker signal to be kept for T2 period, there is great significance to subsequent algorithm.Energy To marking signal of each channel after detecting trough twice, the two neighboring channel around, the receiver at both ends only has one A adjacency channel, the judgement in T2 period before carrying out, this needs each round or ellipse object marker signal to be kept for T2 week Phase.
S5, postsearch screening output are to be in closed state in periodic signal flag state for two rows of transmitters, in the When three stages, secondary judgement twice is carried out to existing untreated round or ellipse object marker signal, judges whether it is round Or first effective marking signal that oblong object is generated by counting device.
There are round or ellipse object marker signals successively to be checked whether to each channel first;If it does, should look into See whether handle marking signal;If untreated, into screening process twice.
In first time screening process, to current untreated round or ellipse object marker signal, adjacency channel into Row differentiation processing, if adjacent by being generated without round or ellipse object marker signal, then it is assumed that current untreated Round or ellipse object marker signal is round or oval first effective marking signal of object generation;
If also there is the generation of round or ellipse object marker signal in the adjacent channel in right side, and left side does not have, then the right Second is also required to be judged;If also there is the generation of round or ellipse object marker signal in the adjacent channel in left side, and right Side does not have, then second left is also required to be judged;If left and right side has round or ellipse object marker signal, It then needs to judge the signal of the left and right sides.
Programmed screening is carried out after the completion of screening first time, in programmed screening, successively each channel is sentenced It is disconnected, if there are effective marking signals in some channel, then judge that the right with the presence or absence of marking signal, then exports circle if it does not exist Or oblong object counts pulse, judges into next channel;If right side there are marking signal, judges that second right is No there are effective round or ellipse object marker signals, and if it exists, should remove this significant notation, the two label letters It number should belong to a round or ellipse object to generate, only need to once be counted, then be not required to handle if it does not exist, it is directly defeated There are the circuit of pulse count in round or ellipse object count pulse out, outside, carry out to round or ellipse object pulse Statistics.
Principal function first carries out Initialize installation to parameter used and peripheral hardware, global interrupt is opened, at circulation process Reason, and response timing device interrupts.
Timer interruption exports two-way periodic signal, and second road signal postpones 3ms than the first via.It is different in each period Marking signal represent different conditions, different conditions determine that major cycle processing enters that branch.
If first row transmitter is in the open state, enter first time valley detection;
If second row transmitter is in the open state, enter second of valley detection;
If two rows of transmitters are in closed state, then enter the screening twice of round or ellipse object marker signal.
Valley detection is the basis that round or ellipse object marker signal screens twice, when some receiving channel detects Screening process twice can just be entered after trough signal twice.
When the state 1 in the period, into first branch, this branch mainly issues in first row transmitter red When outer smooth, the valley value of receiver both end voltage is detected, keeps T1 period, the premise as second of valley detection;
When the state 2 in the period, into second branch, this branch is before first branch detection to trough It puts, carries out second of valley detection, after detecting second of trough, kept for T2 period, and count what trough twice occurred Period distances;
When the state 3 in the period, into third branch, to the round or ellipse object marker in each channel Signal is judged that premise is necessarily present round or ellipse object marker signal, if inspection in T1 period on a channel Trough twice is measured, then the marking signal generated as round or ellipse object, so the process flow of state 3 is by state 1 It is determined with state 2.Into after third branch, a round or ellipse object marker signal is screened twice, be protected A round or ellipse object is demonstrate,proved when passing through counting device, only one effective marking signal.
Referring to Fig. 3, method of counting of the present invention realizes that platform is the control circuit based on single-chip microcontroller, including monolithic Machine, crystal oscillator, power supply, transmitter, receiver and counting module, the emitted device control of transmitter are connect with single-chip microcontroller, single-chip microcontroller warp A/D conversion is connect with receiver, the pulse output connection step-by-step counting of single-chip microcontroller.
The method of the present invention solves error count caused by round or ellipse object movement speed changes, and examines from trough It surveys, elaborates algorithm principle in velocity measuring and screening function description twice.By way of Built-In Self-Test, weight in real-time update Cycle parameter is wanted, updates middle cycle parameter with velocity variations, there is the automatic ability for adapting to external environment variation, algorithm Possess good interference free performance, solves the problems, such as application environment complexity.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.The present invention being described and shown in usually here in attached drawing is real The component for applying example can be arranged and be designed by a variety of different configurations.Therefore, below to the present invention provided in the accompanying drawings The detailed description of embodiment be not intended to limit the range of claimed invention, but be merely representative of of the invention selected Embodiment.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without creative efforts The every other embodiment obtained, shall fall within the protection scope of the present invention.
Referring to Fig. 1, the counting device that method of counting of the present invention uses includes transmitter 1 and receiver 2, two rows of transmitters 1 and one row's receiver 2 installed with fixed angle and distance, pass through controller programming, controller controls the work of two rows of transmitters 1 Make the period, infrared light is sent with fixed frequency, intermediate row's receiver 2 receives infrared light, according to round or ellipse object 4 The different reflection characteristic in surface, 2 both ends of receiver, which receive light intensity difference, makes voltage that different value be presented.
Counting device is installed on 3 top of conveyer belt, and 3 direction of motion of conveyer belt is arranged perpendicular to transmitter 1 and receiver 2 Direction.Round or ellipse object 4 on conveyer belt 3 passes through counting device with certain speed.
By the switch of controller programming control transmitter 1, when controlling first row and second row transmitter 1 with front and back difference Carve the infrared light for issuing fixed frequency.When round or ellipse object 4 is moved to the detection of counting device at different rates When region, the light intensity that receiver 2 receives changes, and different voltages value is presented in 2 both ends of receiver, generates the comb of fixed cycle Shape wave, there are two voltage step amounts for tool on every comb wave, respectively correspond infrared remote receiver in different moments and receive first respectively The light intensity that the infrared light that row and second row transmitter 1 issue generates is strong and weak.
Referring to Fig. 2, light intensity is stronger, the voltage at 2 both ends of receiver is smaller, otherwise light intensity is weaker, and voltage is bigger.Work as circle Or oblong object 4, when being moved to position 1 as shown in Figure 1, the infrared ray that first row transmitter 1 is sent passes through round or ellipse 4 surface highest point of object reflexes to receiving end, and the light intensity value generated this moment is maximum, and 2 both end voltage of receiver is worth smaller, corresponding diagram The valley value of first step amount in 2.When round or ellipse object 4 continuously moves to position 2, first row transmitter 1 is sent out The infrared ray sent reflexes to receiver 2 by 4 surface highest point of round or ellipse object, and the light intensity value generated this moment is maximum, 2 both end voltage of receiver is worth smaller, the valley value of second step amount in corresponding diagram 2.
First step corresponds to the voltage value that first row infrared transmitter 1 is sent to the generation of receiver 2, second step pair Second row infrared transmitter 1 is answered to be sent to the voltage value of the generation of receiver 2.Having detected that the generation of first row infrared transmitter 1 Voltage value valley value after, continue to test the voltage value valley value of the generation of second row infrared transmitter 1, generate trough twice Value, counting device confirmation have a round or ellipse object 4 to produce the two troughs by counting device.
From 4 counting algorithm principle of round or ellipse object it is found that transmitter 1 issue infrared light frequency be it is fixed, i.e., The frequency of comb wave is fixed, and the mounting distance of two rows of transmitters 1 is fixed.When 3 velocity variations of conveyer belt, round or ellipse object Body 4 is also different by the speed of counting device detection zone, and speed is different, and 2 both end voltage waveform envelope of receiver is caused to possess The comb wave of different number.When round or ellipse object 4 passes through counting device with friction speed, necessarily lead to first row and The voltage valley value of the infrared light that two discharge emitters 1 issue to receiver 2 differs different cycles number.
If not constraining the gap periods of the voltage valley value twice of receiver 2, the anti-interference of algorithm is poor, when multiple circles When shape or oblong object 4 continuously pass through counter device side by side, the light intensity that receiver 2 receives is simultaneously by multiple round or ellipse 4 surface reflection of circular object influences, and multiple continuous valley values are presented in 2 both end voltage of receiver, if not limiting one The period distances between two valley values that round or ellipse object 4 is generated by counting device, it is likely that detect two Valley value is not that a round or ellipse object 4 generates, or loses an equidirectional valley value, generates the meter of mistake Number.It needs to think there is one after successively detecting two troughs within the period of setting in the period distances of two valley values of middle setting A round or ellipse object 4 passes through counting device.
If setting a fixed value for period distances, when 3 speed of conveyer belt quickly when, round or ellipse object 4 is fast Speed is by counting device, within the fixed cycle of setting, may have 2 and the above round or ellipse object 4 passes through, but can only Detect that two valley values, other round or ellipse objects of missing inspection cause error count.
Conversely, if setting a fixed value for period distances, when 3 speed of conveyer belt is very slow, round or ellipse object Body 4 slow transits through counting device, within the fixed period, after having detected that first valley value, due to round or ellipse Object 4 is mobile, and slowly second valley value is also not detected within the period of setting, two continuous valley values are not detected, It is not counted correctly, causes missing inspection.
It is the basic of correct detection round or ellipse object count that suitable period distances, which are arranged, and middle fixed cycle value is not All velocity intervals of conveyer belt are adapted to, too fast or too slow conveyor belt speed may result in round or ellipse object count Mistake.Respective cycle, Lai Shiying can be arranged according to speed by the speed of self-test round or ellipse object movement in the present invention The demodulation of friction speed algorithm.
Time interval T is calculated as follows between the trough twice that round or ellipse object is generated by counting device:
Wherein, L is distance between two rows of transmitters, and V is round or oval object movement speed.
L is fixed value, and different speed corresponds to different time intervals, if speed is fast, the time is short, conversely, speed is slow, then Time is long.
Period trough twice is counted and saved, after detecting that round or ellipse object is counted, together The Shi Gengxin cycle parameter between trough twice, as the foundation of judgement of next period, different cycle parameters corresponds to different circles Or oblong object movement speed.
Infrared round or ellipse object count device is in a row located at the structure on device, Duo Geyuan using multiple transmitters Shape or oblong object are continuously more complex by counting device situation side by side, and corresponding receiver both end voltage forms several envelopes and connects Together the case where, a round or ellipse object may can generate twice on one, two even three receivers Voltage valley value.It in this case, is not the corresponding circle by counting device of valley value of different moments twice Shape or oblong object.According to design structure, a round or ellipse object at most may be at three not by counting device Totally six valley values are generated with receiver.Correct round or ellipse object number is resolved from all valley values, it is necessary to After detecting round or ellipse object marker signal (this signal is marked by the valley value of different moments twice for meeting condition) Some cycles are kept to be judged one by one after keeping some cycles all marking signals in this period.In counting side In method, round or ellipse object marker signal hold period value is to round or ellipse object demodulation method no less important.
Round or ellipse object marker signal hold period parameter is also related with round or ellipse object movement speed. For some receiver, on this receiver current round or ellipse object marker signal must next time another It is handled before round or ellipse object marker signal, is not so likely to result in false judgment.
The case where most limit is that a round or ellipse object generates trough twice on three continuous receivers Value, may be different at the time of the last one valley value occurs, and by round or ellipse article size and pass through the shape of counting device Depending on state.It is obtained by multiple test experiments, the round or ellipse object most multipotency of different size and form is continuous at three Receiver on generate trough twice, effective reflection width of round or ellipse object is the two of every two receiver spacing Times, about 24mm, when round or ellipse object central axes are in 45 ° with direction of motion angle, the trough of two end-receivers generation Value interval is maximum.Two rows of transmitter distance interval about 22mm, when a round or ellipse object passes through counting device, two subwaves The corresponding round or ellipse object effective distance of valley is 11mm.When round or ellipse object central axes and the direction of motion press from both sides Angle is in 45 °, when passing through counting device with 45 °, effective reflection width 16.96mm, corresponding round or oval for valley value twice 1.5 times of shape object effective distance.
By analyzing above, round or ellipse object marker signal hold period parameter should be the week for detecting valley value twice 1.5 times of period parameters.According to round or ellipse object marker signal hold period parameter, in the label that each receiver generates Signal should keep the cycle length of setting to obtain correct round or ellipse object count to carry out postsearch screening.
In conclusion reliable counting device plays irreplaceable role in terms of Animal husbandry production process control.It Actual production value can not only be counted, moreover it is possible to which the upgrowth situation for estimating animal has reference significance to the generation of disease.
The above content is merely illustrative of the invention's technical idea, and this does not limit the scope of protection of the present invention, all to press According to technical idea proposed by the present invention, any changes made on the basis of the technical scheme each falls within claims of the present invention Protection scope within.

Claims (10)

1. a kind of jamproof adaptometer counting method, which is characterized in that use adaptive method, monolithic machine testing conveyer belt The movement speed of upper round or approximate circle object, conveyer belt top vertical spacing are provided with two rows of transmitters, two rows of transmitters Between be provided with row's receiver, two rows of transmitters send respectively infrared light to the round or approximate circle object on conveyer belt into Row irradiation, receiver detect the light intensity value that corresponding two transmitters issue in different moments, and valley is examined twice for single-chip microcontroller setting The gap periods of survey, clock cycle and round or ellipse object marker signal are kept between valley value twice inside real-time update Period carries out valley detection to voltage sample twice by receiver, if first row transmitter is in the open state, enters First time valley detection;If second row transmitter is in the open state, into second of valley detection;If two rows of transmitters It is in closed state, into the screening twice of round or ellipse object marker signal, single-chip microcontroller is realized by step-by-step counting Counting to round or ellipse object.
2. jamproof adaptometer counting method according to claim 1, which comprises the following steps:
S1, initiation parameter;
S2, two-way low level pulse signal is generated using timer interruption, two-way voltage pulse signal is exported respectively to two discharges Emitter both ends, the opening of control transmitter and shut-in time, low level width determine the time that transmitter is opened;
S3, valley detection process is started according to status indication signal in periodic signal;
S4, detection round or ellipse object movement speed, count the periodic inequality that trough occurs twice on the same channel, update Next valley detection cycle T 1 and round or ellipse object marker signal hold period T2;
S5, it is in closed state for two rows of transmitters in periodic signal flag state, when being in the phase III, do not located to existing The round or ellipse object marker signal of reason carries out postsearch screening output judgement, judges whether that being round or oval object leads to Cross first effective marking signal of counting device generation.
3. jamproof adaptometer counting method according to claim 2, which is characterized in that in step S2, single-chip microcontroller Timer generates a width 3ms low level and the periodic signal of 30ms high level is exported to the transmitter both ends of first row, with It generates a same periodic signal afterwards to export to the transmitter both ends of second row, the signal of second row transmitter is than the first discharge The signal delay 3ms of emitter, receiver mark following state: the energized state of first row transmitter, second row transmitting respectively The energized state and two rows of lights of device are in the state of closing.
4. jamproof adaptometer counting method according to claim 2, which is characterized in that in step S3, if label shape State is that the transmitter of first row is opened, then carries out first time valley detection, carry out A/D sampling to each receiver both end voltage, Upper limit value is arranged to voltage signal and valley detection is successively carried out to each receiving channel using five-spot;To the electricity of A/D sampling The pressure upper limit is set as 0.6 times of maximum voltage, after detecting trough, carries out first time valley detection to respective channel and is labeled as Very.
5. jamproof adaptometer counting method according to claim 2 or 4, which is characterized in that in step S3, if label State is second row transmitter opening, then carries out second of valley detection, carries out A/D to the voltage at each receiver both ends and adopts Sample, before carrying out second of valley detection, first judge in same channels first time valley detection mark whether be it is true, if Very, then in cycle T 1, second of valley detection is successively carried out to each receiving channel using same method, is led in same receive Road detects trough twice in the setting period, then it is assumed that is a qualified round or ellipse object marker signal;It is right Round or ellipse object signal carries out the T2 period of caching, and the T2 period covers two or three marking signal time of occurrence.
6. jamproof adaptometer counting method according to claim 2, which is characterized in that round or ellipse object is logical Time interval T calculating is as follows between crossing the trough twice of counting device generation:
Wherein, L is distance between two rows of transmitters, and V is round or oval object movement speed.
7. jamproof adaptometer counting method according to claim 2, which is characterized in that in step S4, using inside Counting mode starts counting when generating trough from the transmitter for detecting first row, detects second of trough in same channels Afterwards, the statistics periodic inequality that trough occurs twice;Simultaneously, round or ellipse object is updated updating valley detection cycle T 1 twice Marking signal hold period T2 is 1.5 times of T1.
8. jamproof adaptometer counting method according to claim 7, which is characterized in that as in one cycle, have Two or more Air conduct measurements to trough twice, then should the periodic inequality to each channel carry out processing of averaging, as final Period difference, 5 periods should be increased in the periodic quantity detected when updating valley detection cycle T 1 twice next time, expand Big boundary value.
9. jamproof adaptometer counting method according to claim 2, which is characterized in that in step S5, first successively There are round or ellipse object marker signals to be checked whether to each channel;If it does, checking whether processing marking signal; If untreated, into screening twice;
In first time screening process, to current untreated round or ellipse object marker signal, adjacency channel is sentenced Other places reason, if adjacency channel is generated without marking signal, then it is assumed that current untreated round or ellipse object marker Signal is round or oval first effective marking signal of object generation;
Programmed screening is carried out after the completion of screening first time, in programmed screening, successively each channel is judged, if There are effective marking signals in some channel, then judge that the right with the presence or absence of marking signal, then exports round or ellipse if it does not exist Circular object counts pulse, judges into next channel.
10. jamproof adaptometer counting method according to claim 9, which is characterized in that in first time screening process, If right side there are marking signal, judges that second, right side whether there is effective round or ellipse object marker signal, if In the presence of, remove this significant notation, do not handle then if it does not exist, export the pulse of round or ellipse object count, pass through pulse Counting circuit carries out the pulse of round or ellipse object;
During programmed screening, if there is a generation of round or ellipse object marker signal in the adjacent channel in right side, and left side No, then second right is judged;If there is the generation of round or ellipse object marker signal in the adjacent channel in left side, And right side does not have, then judges second left;If left and right side has round or ellipse object marker signal, It then needs to judge the signal of the left and right sides.
CN201910711917.5A 2019-08-02 2019-08-02 Anti-interference self-adaptive counting method Active CN110429934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910711917.5A CN110429934B (en) 2019-08-02 2019-08-02 Anti-interference self-adaptive counting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910711917.5A CN110429934B (en) 2019-08-02 2019-08-02 Anti-interference self-adaptive counting method

Publications (2)

Publication Number Publication Date
CN110429934A true CN110429934A (en) 2019-11-08
CN110429934B CN110429934B (en) 2023-01-31

Family

ID=68412315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910711917.5A Active CN110429934B (en) 2019-08-02 2019-08-02 Anti-interference self-adaptive counting method

Country Status (1)

Country Link
CN (1) CN110429934B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102052900A (en) * 2009-11-02 2011-05-11 重庆工商大学 Peak valley motion detection method and device for quickly measuring sub-pixel displacement
CN102243093A (en) * 2010-05-13 2011-11-16 张继昌 Optical fiber weight sorting scale and weighing method thereof
US20110300851A1 (en) * 2010-06-04 2011-12-08 Qualcomm Incorporated Method and apparatus for wireless distributed computing
CN102829835A (en) * 2012-09-13 2012-12-19 苑颐萍 Optoelectronic data collection device of mechanical pointer counter and data processing method of optoelectronic data collection device of mechanical pointer counter
CN103426020A (en) * 2013-08-14 2013-12-04 北京凯森世纪科技发展有限公司 Exclusive infrared passenger flow counter
CN103760414A (en) * 2013-11-29 2014-04-30 成都亿盟恒信科技有限公司 Low-velocity pulse period collecting method based on anti-interference low-pass filtering
CN203719636U (en) * 2013-12-27 2014-07-16 杭州依镭科技有限公司 Inversion detecting device used for syringe needle
US20140356969A1 (en) * 2012-04-18 2014-12-04 Olympus Corporation Method for detecting a target particle
CN108226761A (en) * 2017-12-28 2018-06-29 合肥工大高科信息科技股份有限公司 A kind of rail traffic vehicles speed acquires the method with replacing self-test in real time
CN109729289A (en) * 2017-10-31 2019-05-07 欧姆龙株式会社 Optical sensor and detection method
CN110070558A (en) * 2019-04-11 2019-07-30 西安星舟天启智能装备有限责任公司 It is a kind of that method and device is sorted based on the statistics of image procossing and Subarea detecting

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102052900A (en) * 2009-11-02 2011-05-11 重庆工商大学 Peak valley motion detection method and device for quickly measuring sub-pixel displacement
CN102243093A (en) * 2010-05-13 2011-11-16 张继昌 Optical fiber weight sorting scale and weighing method thereof
US20110300851A1 (en) * 2010-06-04 2011-12-08 Qualcomm Incorporated Method and apparatus for wireless distributed computing
US20140356969A1 (en) * 2012-04-18 2014-12-04 Olympus Corporation Method for detecting a target particle
CN102829835A (en) * 2012-09-13 2012-12-19 苑颐萍 Optoelectronic data collection device of mechanical pointer counter and data processing method of optoelectronic data collection device of mechanical pointer counter
CN103426020A (en) * 2013-08-14 2013-12-04 北京凯森世纪科技发展有限公司 Exclusive infrared passenger flow counter
CN103760414A (en) * 2013-11-29 2014-04-30 成都亿盟恒信科技有限公司 Low-velocity pulse period collecting method based on anti-interference low-pass filtering
CN203719636U (en) * 2013-12-27 2014-07-16 杭州依镭科技有限公司 Inversion detecting device used for syringe needle
CN109729289A (en) * 2017-10-31 2019-05-07 欧姆龙株式会社 Optical sensor and detection method
CN108226761A (en) * 2017-12-28 2018-06-29 合肥工大高科信息科技股份有限公司 A kind of rail traffic vehicles speed acquires the method with replacing self-test in real time
CN110070558A (en) * 2019-04-11 2019-07-30 西安星舟天启智能装备有限责任公司 It is a kind of that method and device is sorted based on the statistics of image procossing and Subarea detecting

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAN I LAM等: "Far-Infrared and submillimeter properties of SDSS galaxies in the Herschel ATLAS science demonstration phase field", 《RESEARCH IN ASTRONOMY AND ASTROPHYSICS》 *
王耀东等: "用于机械系统瞬时目标的双视角高速视觉检测系统", 《光学精密工程》 *

Also Published As

Publication number Publication date
CN110429934B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CA2996102C (en) Seed counting sensor and method for detecting blockage of a seed conveying pipe
FI82984C (en) FOERFARANDE FOER TREDIMENSIONELL MAETNING AV FOEREMAOL.
CN205138431U (en) Material recognition device and transfer chain of transfer chain
SK279731B6 (en) Device for detecting faults in a textile web
CN102651086A (en) Counting device, counting method and infrared detection system
CN109933071A (en) A kind of robot returns the control method of seat
CN110320502A (en) A kind of scaling method of millimetre-wave radar array antenna
CN105655266A (en) DSP-based wafer eccentricity online detection apparatus and method
CN107782258A (en) Band centering detecting system and its detection method based on cmos sensor
CN202599969U (en) Device for measuring speed of conveyer belt
CN110429934A (en) A kind of jamproof adaptometer counting method
CN108562906A (en) Sound ranging method and device
CN201928484U (en) Pyroelectric infrared (PIR) sensor lamp controller
CN204501931U (en) A kind of transfusion system detection alarm circuit and system
CN205941584U (en) Nucket -wheel detection distance automatic regulating apparatus that tests speed
CN105425825B (en) A kind of plasterboard dynamic tracking apparatus and method
CN218917667U (en) AI intelligent security inspection contraband identification system
CN204649151U (en) Plank length intelligent device for measuring
CN110924121B (en) Detection device of clothing needle detector
CN2181672Y (en) Full-automatic yarn length meter
CN2414549Y (en) Digital type infrared ray intelligent sensor
CN203293208U (en) Assembly robot positioning device based on binocular infrared sensor
EP0392102B1 (en) Method for inspecting detecting and distinguishing sides of fabrics
CN108680761A (en) A kind of intelligence belt edges damaged detection and positioning system in real time
CN201309949Y (en) Furnace speed calibration device for steel tube heat treatment bright furnace

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