CN104677387B - Smart machine protective case detection method and device - Google Patents
Smart machine protective case detection method and device Download PDFInfo
- Publication number
- CN104677387B CN104677387B CN201510134424.1A CN201510134424A CN104677387B CN 104677387 B CN104677387 B CN 104677387B CN 201510134424 A CN201510134424 A CN 201510134424A CN 104677387 B CN104677387 B CN 104677387B
- Authority
- CN
- China
- Prior art keywords
- detection unit
- detected value
- detection
- protective case
- hall sensor
- 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.)
- Expired - Fee Related
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 700
- 230000001681 protective effect Effects 0.000 title claims abstract description 183
- 238000000034 method Methods 0.000 claims abstract description 19
- 238000009434 installation Methods 0.000 claims abstract description 8
- 238000007689 inspection Methods 0.000 claims description 27
- 230000006870 function Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical group [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 229910052742 iron Inorganic materials 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
Landscapes
- Measurement Of Length, Angles, Or The Like Using Electric Or Magnetic Means (AREA)
- Transmission And Conversion Of Sensor Element Output (AREA)
Abstract
The present invention is applied to technical field of intelligent equipment; there is provided smart machine protective case detection method and device, the smart machine includes digital hall sensor, and the digital hall sensor includes multiple detection units; the built-in magnet of protective case, methods described includes:After the smart machine installation protective case is detected, the detected value of multiple detection units in digital hall sensor is obtained;Calculate the absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements of neighbouring detecting elements;The absolute value of the difference of the detected value of detected value sum and neighbouring detecting elements according to the neighbouring detecting elements, obtains azimuth information of the magnet relative to the digital hall sensor;The type of the protective case is obtained according to the azimuth information, operation corresponding with the protective case type is performed.The present invention realizes the identification to various different types of protective cases, and reduces the cost of smart machine.
Description
Technical field
The invention belongs to technical field of intelligent equipment, more particularly to a kind of smart machine protective case detection method and device.
Background technology
With the popularization of smart machine, existing manufacturer is expired by producing various different types of smart machine protective cases
The demand of sufficient different user.Such as, some protective cases can detect blood sugar level, and some protective cases can be embedded in battery and loudspeaker
To provide endurance and acoustics etc..Prior art can only recognize a type of guarantor by a digital hall sensor
Sheath, to recognize during polytype protective case, it is necessary to multiple digital hall sensors, it is impossible to passed by a Digital Hall
Sensor detects various different types of protective cases, causes the high cost of smart machine.
The content of the invention
In consideration of it, the embodiment of the present invention provides a kind of smart machine protective case detection method and device, realize to various
The identification of different types of protective case, and reduce the cost of smart machine.
First aspect, there is provided a kind of smart machine protective case detection method, methods described includes:
After detecting smart machine and putting on protective case, four detections of detection unit in digital hall sensor are obtained
Value;
Calculate the absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements of neighbouring detecting elements;
The absolute value of the difference of the detected value of detected value sum and neighbouring detecting elements according to the neighbouring detecting elements
Obtain the relative bearing of the magnet and digital hall sensor on the protective case;
The type of the protective case is obtained according to the relative bearing, operation corresponding with the protective case type is performed;
Wherein, embedded magnet, the side of the magnet relative to digital hall sensor of different types of protective case on protective case
Position is different.
Further, four detection units are respectively detection unit A, detection unit B, detection unit C, detection unit
D, and be sequentially located on four drift angles of digital hall sensor, surround a rectangle;
The absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements for calculating neighbouring detecting elements
Including:
Calculate detection unit A and detection unit C detected value sum, detection unit B and detection unit D detected value it
With, and the inspection for calculating the absolute value, detection unit B and detection unit D of the difference of the detected value of detection unit A and detection unit C
The absolute value of the difference of measured value;And/or
Calculate detection unit A and detection unit B detected value sum, detection unit C and detection unit D detected value it
With, and the inspection for calculating the absolute value, detection unit C and detection unit D of the difference of the detected value of detection unit A and detection unit B
The absolute value of the difference of measured value.
Further, the detected value sum and the detected value of neighbouring detecting elements according to the neighbouring detecting elements
The magnet that obtains on the protective case of absolute value of difference include with the relative bearing of digital hall sensor:
Judge the absolute value of difference of the detected value of detection unit A and detection unit C whether less than the first predetermined threshold value, detection
Whether the absolute value of the difference of the detected value of unit B and detection unit D is less than the second predetermined threshold value;
If the absolute value of the difference of the detected value of detection unit A and detection unit C is less than the first predetermined threshold value, detection unit B
And the absolute value of the difference of the detected value of detection unit D is less than the second predetermined threshold value, judges the inspection of detection unit A and detection unit C
Whether measured value sum is more than the detected value sum of detection unit B and detection unit D;
Detection unit A and detection unit C detected value of the detected value sum more than detection unit B and detection unit D it
And when, the magnet is located at the left of the digital hall sensor;Otherwise, in the detected value of detection unit A and detection unit C
When sum is less than the detected value sum of detection unit B and detection unit D, the magnet is located at the right side of the digital hall sensor
Side;And/or
Judge that the absolute value of the difference of the detected value of detection unit A and detection unit B is less than the first predetermined threshold value, detection unit
The absolute value of the difference of the detected value of C and detection unit D is less than the second predetermined threshold value;
If the absolute value of the difference of the detected value of detection unit A and detection unit B is less than the first predetermined threshold value, detection unit C
And the absolute value of the difference of the detected value of detection unit D is less than the second predetermined threshold value, judges the inspection of detection unit A and detection unit B
Whether measured value sum is more than the detected value sum of detection unit C and detection unit D;
Detection unit A and detection unit B detected value of the detected value sum more than detection unit C and detection unit D it
And when, the magnet is located at the top of the digital hall sensor;Otherwise, in the detected value of detection unit A and detection unit B
When sum is less than the detected value sum of detection unit C and detection unit D, the magnet is located under the digital hall sensor
Side.
Further, the detected value sum and the detected value of neighbouring detecting elements according to the neighbouring detecting elements
Difference absolute value, obtain the magnet includes relative to the azimuth information of the digital hall sensor:
Judge the absolute value of difference of the detected value of detection unit A and detection unit C whether less than the first predetermined threshold value and inspection
Whether the absolute value for surveying the difference of the detected value of unit B and detection unit D is less than the second predetermined threshold value;
If so, judging the detected value sum of detection unit A and detection unit C whether more than or less than detection unit B and inspection
Survey the detected value sum of cells D;
Detection unit A and detection unit C detected value of the detected value sum more than detection unit B and detection unit D it
And when, judge that the magnet is located at the right of the digital hall sensor;In the detected value of detection unit A and detection unit C
When sum is less than the detected value sum of detection unit B and detection unit D, judge that the magnet is located at the digital hall sensor
Left;And/or
Judge the absolute value of difference of the detected value of detection unit A and detection unit B whether less than the first predetermined threshold value and inspection
Whether the absolute value for surveying the difference of the detected value of unit C and detection unit D is less than the second predetermined threshold value;
If so, judging the detected value sum of detection unit A and detection unit B whether more than or less than detection unit C and inspection
Survey the detected value sum of cells D;
Detection unit A and detection unit B detected value of the detected value sum more than detection unit C and detection unit D it
And when, judge that the magnet is located at the lower section of the digital hall sensor;In the detected value of detection unit A and detection unit B
When sum is less than the detected value sum of detection unit C and detection unit D, judge that the magnet is located at the digital hall sensor
Top.
Further, the type that the protective case is obtained according to the relative bearing, performs and the protective case class
The corresponding operation of type includes:
Judge the positive and negative acquisition magnet of the detection unit A, detection unit B, detection unit C, the detected value of detection unit D
Polar orientation;
The type of the protective case is obtained according to the magnet polarities direction and the relative bearing, is performed and the protection
The corresponding operation of set type.
Further, the type that the protective case is obtained according to the relative bearing, performs and the protective case class
The corresponding operation of type includes:
Judge whether the detection unit A, detection unit B, detection unit C, the detected value of detection unit D are located at the first threshold
In the range of value;
When the detected value is respectively positioned in the range of first threshold, the class of the protective case is obtained according to the relative bearing
Type, performs operation corresponding with the protective case type;
Otherwise, whether the equal position of detected value of the detection unit A, detection unit B, detection unit C, detection unit D is judged
In the range of Second Threshold;
When the detected value is respectively positioned in the range of Second Threshold, the class of the protective case is obtained according to the relative bearing
Type, performs operation corresponding with the protective case type.
Second aspect, there is provided a kind of smart machine protective case detection means, described device includes:
First acquisition module, for after detecting smart machine and putting on protective case, obtaining four in digital hall sensor
The detected value of individual detection unit;
Computing module, the difference of the detected value of detected value sum and neighbouring detecting elements for calculating neighbouring detecting elements
Absolute value;
Second acquisition module, for the detected value sum according to the neighbouring detecting elements and the inspection of neighbouring detecting elements
The absolute value of the difference of measured value obtains the relative bearing of the magnet and digital hall sensor on the protective case;
3rd acquisition module, the type for obtaining the protective case according to the relative bearing, performs and the protection
The corresponding operation of set type;
Wherein, embedded magnet, the side of the magnet relative to digital hall sensor of different types of protective case on protective case
Position is different.
Further, four detection units are respectively detection unit A, detection unit B, detection unit C, detection unit
D, and be sequentially located on four drift angles of digital hall sensor, surround a rectangle;
The computing module includes:
First computing unit, detected value sum, detection unit B and detection for calculating detection unit A and detection unit C
The detected value sum of cells D, and calculate absolute value, the detection unit B of the difference of the detected value of detection unit A and detection unit C
And the absolute value of the difference of the detected value of detection unit D;And/or
Second computing unit, detected value sum, detection unit C and detection for calculating detection unit A and detection unit B
The detected value sum of cells D, and calculate absolute value, the detection unit C of the difference of the detected value of detection unit A and detection unit B
And the absolute value of the difference of the detected value of detection unit D.
Further, second acquisition module includes:
Whether the first judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit C is less than
Whether the absolute value of the difference of the detected value of the first predetermined threshold value, detection unit B and detection unit D is less than the second predetermined threshold value;
Second judging unit, it is pre- less than first for the absolute value in detection unit A and the difference of the detected value of detection unit C
If the absolute value of the difference of the detected value of threshold value, detection unit B and detection unit D is less than the second predetermined threshold value, judge that detection is single
Whether the detected value sum of first A and detection unit C is more than the detected value sum of detection unit B and detection unit D, if so, described
Magnet is located at the left of the digital hall sensor, and otherwise, the magnet is located at the right of the digital hall sensor;
And/or
3rd judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit B is less than first
The absolute value of the difference of the detected value of predetermined threshold value, detection unit C and detection unit D is less than the second predetermined threshold value;
4th judging unit, it is pre- less than first for the absolute value in detection unit A and the difference of the detected value of detection unit B
If the absolute value of the difference of the detected value of threshold value, detection unit C and detection unit D is less than the second predetermined threshold value, judge that detection is single
Whether the detected value sum of first A and detection unit B is more than the detected value sum of detection unit C and detection unit D, if so, described
Magnet is located at the top of the digital hall sensor, and otherwise, the magnet is located at the lower section of the digital hall sensor.
Further, second acquisition module includes:
Whether the first judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit C is less than
Whether the absolute value of the difference of the detected value of the first predetermined threshold value and detection unit B and detection unit D is less than the second predetermined threshold value;
Second judging unit, during for the judged result in the first judging unit to be, judges that detection unit A is single with detection
Whether the detected value sum of first C is more than or less than the detected value sum of detection unit B and detection unit D, if detection unit A and inspection
The detected value sum of the detected value sum more than detection unit B and detection unit D of unit C is surveyed, judges that the magnet is located at described
The right of digital hall sensor, if the detected value sum of detection unit A and detection unit C is single with detection less than detection unit B
The detected value sum of first D, judges that the magnet is located at the left of the digital hall sensor;And/or
Whether the 3rd judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit B is less than
Whether the absolute value of the difference of the detected value of the first predetermined threshold value and detection unit C and detection unit D is less than the second predetermined threshold value;
4th judging unit, during for the judged result in the 3rd judging unit to be, judges that detection unit A is single with detection
Whether the detected value sum of first B is more than or more than the detected value sum of detection unit C and detection unit D, if detection unit A and inspection
The detected value sum of the detected value sum more than detection unit C and detection unit D of unit B is surveyed, judges that the magnet is located at described
The lower section of digital hall sensor, if the detected value sum of detection unit A and detection unit B is single with detection less than detection unit C
During the detected value sum of first D, judge that the magnet is located at the top of the digital hall sensor.
Further, the 3rd acquisition module includes:
First acquisition unit, the inspection for judging the detection unit A, detection unit B, detection unit C, detection unit D
The positive and negative acquisition magnet polarities direction of measured value;
Second acquisition unit, the class for obtaining the protective case according to the magnet polarities direction and the relative bearing
Type, performs operation corresponding with the protective case type.
Further, the 3rd acquiring unit includes:
First judging unit, the inspection for judging the detection unit A, detection unit B, detection unit C, detection unit D
Whether measured value is located in the range of first threshold;
First kind acquiring unit, for when the detected value is respectively positioned in the range of first threshold, according to described relative
Orientation obtains the type of the protective case, performs operation corresponding with the protective case type;
Second judging unit, the inspection for judging the detection unit A, detection unit B, detection unit C, detection unit D
Whether measured value is respectively positioned in the range of Second Threshold;
Second Type acquiring unit, for when the detected value is respectively positioned in the range of Second Threshold, according to described relative
Orientation obtains the type of the protective case, performs operation corresponding with the protective case type.
Compared with prior art, the embodiment of the present invention sets digital hall sensor on smart machine, and the numeral is suddenly
Your sensor includes multiple detection units, and the protective case is built-in with magnet;The protective case is installed when smart machine is detected
Afterwards, the detected value of multiple detection units in the digital hall sensor is obtained;Calculate the detected value sum of neighbouring detecting elements
And the absolute value of the difference of the detected value of neighbouring detecting elements;Detected value sum according to the neighbouring detecting elements and adjacent
The absolute value of the difference of the detected value of detection unit, obtains azimuth information of the magnet relative to the digital hall sensor;
The type of the protective case is obtained according to the azimuth information, operation corresponding with the protective case type is performed.It is of the invention real
Diverse location of the example by digital hall sensor and magnet in protective case is applied to realize to various different types of protective cases
Identification;Further, it is that can detect various protective case types that methods described is based on a digital hall sensor, is greatly dropped
The low cost of smart machine.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also
Other accompanying drawings are obtained with according to these accompanying drawings.
Fig. 1 is that smart machine protective case detection method that the embodiment of the present invention one is provided first realizes flow chart;
Fig. 2 is the arrangement mode schematic diagram of four detection units that the embodiment of the present invention one is provided;
Fig. 3 is that step S103 implements stream in the smart machine protective case detection method that the embodiment of the present invention two is provided
Cheng Tu
Fig. 4 is the first realization stream of step S104 in the smart machine protective case detection method that the embodiment of the present invention three is provided
Cheng Tu;
Fig. 5 is that the magnetic field intensity that the embodiment of the present invention three is provided divides schematic diagram;
Fig. 6 is the second realization stream of step S104 in the smart machine protective case detection method that the embodiment of the present invention four is provided
Cheng Tu;
Fig. 7 is the composition structure chart of the smart machine protective case detection means that the embodiment of the present invention five is provided.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The embodiment of the present invention sets digital hall sensor on smart machine, and the digital hall sensor includes multiple
Detection unit, the protective case is built-in with magnet;After the smart machine installation protective case is detected, the numeral is obtained suddenly
The detected value of multiple detection units on your sensor;Calculate the detected value sum and neighbouring detecting elements of neighbouring detecting elements
The absolute value of the difference of detected value;The detected value of detected value sum and neighbouring detecting elements according to the neighbouring detecting elements it
Poor absolute value, obtains azimuth information of the magnet relative to the digital hall sensor;Obtained according to the azimuth information
The type of the protective case is taken, operation corresponding with the protective case type is performed.The present invention by digital hall sensor and
Diverse location of the magnet in protective case realizes the identification to various different types of protective cases;Further, methods described
It is that can detect various protective case types based on a digital hall sensor, significantly reduces the cost of smart machine.This hair
Bright embodiment additionally provides corresponding device, is described in detail individually below.
Embodiment one
Fig. 1 shows that the first of the smart machine protective case detection method that the embodiment of the present invention one is provided realizes flow, is
It is easy to explanation, illustrate only part related to the present invention.
In embodiments of the present invention, the smart machine includes but is not limited to mobile phone, pocket computer (Pocket
Personal Computer, PPC), palm PC, personal digital assistant (Personal Digital Assistant, PDA)
Deng preferably smart mobile phone.Digital hall sensor is provided with the smart machine, has many in the digital hall sensor
Individual detection unit, the protective case is built-in with magnet.
As shown in figure 1, methods described includes:
In step S101, after the smart machine installation protective case is detected, the digital hall sensor is obtained
The detected value of upper multiple detection units.
Preferably, the multiple detection unit is four detection units, is designated as detection unit A, detection unit B, detection list
First C, detection unit D.The detection unit A, detection unit B, detection unit C, detection unit D can obtain it and be presently in position
The magnetic field intensity put, and export the detected value of magnetic field intensity.
In step s 102, the difference of the detected value of the detected value sum and neighbouring detecting elements of neighbouring detecting elements is calculated
Absolute value.
For convenience of description, one of the invention given below is preferable to carry out example.If being located in digital hall sensor
Detection unit A, detection unit B, detection unit C, the arrangement mode of detection unit D be mode as shown in Figure 2.In fig. 2,
1 is magnet, and a magnet is only set on each protective case;2 is digital hall sensor, and the digital hall sensor is located at
On smart machine;Detection unit A, detection unit B, detection unit C, detection unit D are sequentially located at the four of digital hall sensor
On individual drift angle, to surround a square.If the detection unit A is adjacent with detection unit B, detection unit C, the detection is single
First D is adjacent with detection unit B, detection unit C, the detected value sum and neighbouring detecting elements for calculating neighbouring detecting elements
The absolute value of difference of detected value include:
Calculate detected value sum (A+C), the detection of detection unit B and detection unit D of detection unit A and detection unit C
Value sum (B+D), and calculate absolute value (| A-C |), the detection unit B of the difference of the detected value of detection unit A and detection unit C
And the absolute value (| B-D |) of the difference of the detected value of detection unit D;And/or
Calculate detected value sum (A+B), the detection of detection unit C and detection unit D of detection unit A and detection unit B
Value sum (C+D), and calculate absolute value (| A-B |), the detection unit C of the difference of the detected value of detection unit A and detection unit B
And the absolute value (| C-D |) of the difference of the detected value of detection unit D.
In step s 103, according to the neighbouring detecting elements detected value sum and the detected value of neighbouring detecting elements
Difference absolute value, obtain the azimuth information of the magnet relative to the digital hall sensor.
In step S104, the type of the protective case is obtained according to the azimuth information, performed and the protective case class
The corresponding operation of type.
In embodiments of the present invention, due to there is four detection units in digital hall sensor, respectively positioned at Digital Hall
On four drift angles of sensor, and embedded magnet on protective case, the magnet of different types of protective case is relative to Digital Hall
The orientation of sensor is different, therefore, the magnetic field intensity of four detection unit present positions is incomplete same, by relatively more adjacent inspection
Survey unit detected value sum and neighbouring detecting elements detected value difference absolute value, can obtain magnetic field intensity it is larger one
Side, and then determine azimuth information of the magnet relative to digital hall sensor on the protective case.Magnet is relative to numeral suddenly
The azimuth information of your sensor is corresponded with the type of protective case, gets orientation of the magnet relative to digital hall sensor
After information, you can identify the type of the protective case, and perform corresponding with protective case type operation (such as operation with
Corresponding UI interfaces of the protective case type etc.).Because magnet has various relative to the orientation of digital hall sensor, by this
Method may recognize that different azimuth information of the magnet relative to digital hall sensor, it is achieved thereby that being protected to various different types
The detection of sheath.
Above-mentioned steps S103 and step S104 will carry out detailed narration in subsequent embodiment, specifically refer to subsequent implementation
The narration of example, here is omitted.
The embodiment of the present invention sets digital hall sensor on smart machine, and the digital hall sensor includes multiple
Detection unit, the protective case is built-in with magnet;After the smart machine installation protective case is detected, the numeral is obtained suddenly
The detected value of multiple detection units on your sensor;Calculate the detected value sum and neighbouring detecting elements of neighbouring detecting elements
The absolute value of the difference of detected value;The detected value of detected value sum and neighbouring detecting elements according to the neighbouring detecting elements it
Poor absolute value, obtains azimuth information of the magnet relative to the digital hall sensor;Obtained according to the azimuth information
The type of the protective case is taken, operation corresponding with the protective case type is performed.The present invention by digital hall sensor and
Diverse location of the magnet in protective case realizes the identification to various different types of protective cases;Further, methods described
It is that can detect various protective case types based on a digital hall sensor, significantly reduces the cost of smart machine.
Embodiment two
Fig. 3 shows the specific reality of step S103 in the smart machine protective case detection method that the embodiment of the present invention two is provided
Existing flow, for convenience of description, illustrate only part related to the present invention.
As shown in figure 3, step S103 includes:
In step S301, judge the absolute value of difference of the detected value of detection unit A and detection unit C whether less than first
Whether the absolute value of the difference of the detected value of predetermined threshold value and detection unit B and detection unit D is less than the second predetermined threshold value.
In embodiments of the present invention, first predetermined threshold value and the second predetermined threshold value are whether four detection units are normal
The criterion of work.The detected value near two adjacent detection units of magnet side is identical in theory, away from magnetic
The detected value of two adjacent detection units of iron side is also that (such as magnet is in the left of digital hall sensor for identical
When, the detected value of detection unit A and detection unit C is identical, and the detected value of detection unit B and detection unit D is identical
), to prevent error, step-up error deviation range, i.e. the first predetermined threshold value and second caused by the non-normal work of detection unit
Predetermined threshold value, as four detection units whether the criterion of normal work.Exemplarily, first predetermined threshold value and
Two predetermined threshold values are 5.If the absolute value of the difference of the detected value of detection unit A and detection unit C less than the first predetermined threshold value 5 and
When the absolute value of the difference of the detected value of detection unit B and detection unit D is less than the second predetermined threshold value 5, show that smart machine is correct
Install protective case, exclude the irregular error caused by of protective case, and four detection units can normal works.This
When, perform step S302.Otherwise, step S305 is performed.
In step s 302, judge whether the detected value sum of detection unit A and detection unit C is single more than or less than detection
The detected value sum of first B and detection unit D.
As shown in Fig. 2 detection unit A and detection unit C is located at the left side of digital hall sensor, detection unit B and inspection
Survey the right side that cells D is located at digital hall sensor.By the detected value sum (A+C) of detection unit A and detection unit C and detection
Unit B is compared with the detected value sum (B+D) of detection unit D, and the side stronger to obtain magnetic field intensity, the magnetic field is strong
The stronger side of degree is orientation of the magnet on the protective case relative to digital hall sensor.
It is single with detection more than detection unit B in the detected value sum of detection unit A and detection unit C in step S303
During the detected value sum of first D, judge that the magnet is located at the left of the digital hall sensor.
In step s 304, it is single with detection less than detection unit B in the detected value sum of detection unit A and detection unit C
During the detected value sum of first D, judge that the magnet is located at the right of the digital hall sensor.
Then in execution step S104:The type of the protective case is obtained according to the azimuth information, it is achieved thereby that right
Two kinds of detections of protective case type.Wherein, magnet corresponds to inhomogeneity respectively positioned at the left or right of digital hall sensor
The protective case of type.
Preferably, magnet also includes that magnet is passed positioned at the Digital Hall relative to the azimuth information of digital hall sensor
The either above or below of sensor, similarly, the step S103 also includes.
In step S305, judge the absolute value of difference of the detected value of detection unit A and detection unit B whether less than first
Whether the absolute value of the difference of the detected value of predetermined threshold value and detection unit C and detection unit D is less than the second predetermined threshold value.
Exemplarily, first predetermined threshold value and the second predetermined threshold value are 5.If detection unit A and detection unit B's
The absolute value of the difference of detected value is less than the first predetermined threshold value 5 and the absolute value of the difference of the detected value of detection unit C and detection unit D
During less than the second predetermined threshold value 5, step S306 is performed.Otherwise, step S309 is performed.
In step S306, judge whether the detected value sum of detection unit A and detection unit B is single more than or less than detection
The detected value sum of first C and detection unit D.
As shown in figure 3, detection unit A and detection unit B is located at the top of digital hall sensor, detection unit C and inspection
Survey the lower section that cells D is located at digital hall sensor.By the detected value sum (A+B) of detection unit A and detection unit B and detection
The detected value sum (C+D) of unit C and detection unit D is compared, and the side stronger to obtain magnetic field intensity, the magnetic field is strong
The stronger side of degree is orientation of the magnet relative to digital hall sensor on protective case.
It is single with detection more than detection unit C in the detected value sum of detection unit A and detection unit B in step S307
During the detected value sum of first D, judge that the magnet is located at the top of the digital hall sensor.
It is single with detection less than detection unit C in the detected value sum of detection unit A and detection unit B in step S308
During the detected value sum of first D, judge that the magnet is located at the lower section of the digital hall sensor.
Then in execution step S104:The type of the protective case is obtained according to the relative bearing, it is achieved thereby that right
Two kinds of detections of protective case type.Wherein, magnet corresponds to inhomogeneity respectively positioned at the either above or below of digital hall sensor
The protective case of type.
In step S309, the prompt message of output protection set type detection failure.
In sum, step S301 to step S308 is by comparing phase in four detection units in digital hall sensor
The absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements of adjacent detection unit, it is larger to obtain magnetic field intensity
Side, it is determined that azimuth information of the magnet relative to digital hall sensor on current protective case, and then according to the orientation
Information obtains the type of protective case, it is achieved thereby that digital hall sensor detects the protective case of four types.
It should be noted that the detected value of aforementioned four detection unit is on the occasion of that is, produced by the magnet on protective case
The magnetic line of force in magnetic field is passed through from the front of digital hall sensor, and the magnet poles direction is designated as the first pole orientation.
When the magnetic line of force in magnetic field produced by the magnet on protective case is passed through from the reverse side of digital hall sensor, above-mentioned four
The detected value of individual detection unit is negative value, and the pole orientation of the magnet is designated as the second pole orientation.If the magnetic of the magnet
When extreme direction is the second pole orientation, in step S303, the detected value sum of detection unit A and detection unit C is more than detection
During the detected value sum of unit B and detection unit D, the correspondence magnet is located at the right of the digital hall sensor;Otherwise,
It is described when the detected value sum of detection unit A and detection unit C is less than the detected value sum of detection unit B and detection unit D
Magnet is located at the left of the digital hall sensor;In step S306, the detected value of detection unit A and detection unit B it
During with detected value sum more than detection unit C and detection unit D, the correspondence magnet is located at the digital hall sensor
Lower section;When the detected value sum of detection unit A and detection unit B is less than the detected value sum of detection unit C and detection unit D,
The magnet is located at the top of the digital hall sensor.
Embodiment three
Fig. 4 shows first reality of step S104 in the smart machine protective case detection method that the embodiment of the present invention three is provided
Existing flow, for convenience of description, illustrate only part related to the present invention.
As shown in figure 4, step S104 includes:
In step S401, according to the detection unit A, detection unit B, detection unit C, detection unit D detected value
Obtain magnet poles direction.
In embodiments of the present invention, it is described according to the detection unit A, detection unit B, detection unit C, detection unit D
Detected value to obtain magnet poles directions be to judge the detection unit A, detection unit B, detection unit C, the inspection of detection unit D
Measured value it is positive and negative.Magnetic field produced by the magnet that the detected value is on timing, i.e. protective case the magnetic line of force from Digital Hall
Through (magnet N poles towards digital hall sensor front), the magnet poles direction is the first magnetic pole side in the front of sensor
To;Otherwise, when the detected value is negative, i.e., the magnetic line of force in magnetic field produced by the magnet on protective case is from digital hall sensor
Reverse side through (magnet S poles towards digital hall sensor front), the magnet poles direction is the second pole orientation.
In step S402, the type of the protective case is obtained according to the pole orientation and the azimuth information, performed
Operation corresponding with the protective case type.
Exemplarily, when the magnet poles direction is the first pole orientation, magnet N poles are towards digital hall sensor
Front, the magnet that the detection in conjunction with four detection units is worth to relative to digital hall sensor four kinds of azimuth informations,
Four kinds of different types of protective cases can be determined;And when the magnet poles direction is the second pole orientation, magnet S poles direction
Digital hall sensor front, the magnet that the detection in conjunction with four detection units is worth to is relative to digital hall sensor
Four kinds of azimuth informations, can determine four kinds of different types of protective cases again, it is achieved thereby that a digital hall sensor differentiates
Eight kinds of different types of protective cases.
Example IV
Digital hall sensor is nearer apart from magnet the two poles of the earth, and the magnetic field intensity for detecting is bigger, more remote apart from magnet the two poles of the earth,
The magnetic field intensity for detecting is smaller.If in the case that position of the digital hall sensor on smart machine is constant, in protective case
On magnet it is relative far and near different from the orientation of digital hall sensor, the detected value size of digital hall sensor not phase
Together.Based on this, the embodiment of the present invention judges different types of always according to the magnitude of field intensity that digital hall sensor is detected
Protective case.Fig. 5 shows that magnetic field intensity provided in an embodiment of the present invention divides schematic diagram.Magnetic field intensity is marked off as shown in Figure 5
Two segment limits, respectively first threshold scope and Second Threshold scope, wherein, the magnetic field intensity in the range of the first threshold is equal
More than the magnetic field intensity in the range of the Second Threshold.The different distance of magnet the two poles of the earth and digital hall sensor respectively it is corresponding not
Same protective case type.Fig. 6 shows step S104 in smart machine protective case detection method provided in an embodiment of the present invention
Second realizes flow.
As shown in fig. 6, step S104 includes:
In step s 601, the detection unit A, detection unit B, detection unit C, the detected value of detection unit D are judged
Whether it is respectively positioned in the range of first threshold.
In step S602, if so, obtaining the type of the protective case according to the azimuth information, perform and the protection
The corresponding operation of set type.
If the detected value of the detection unit A, detection unit B, detection unit C, detection unit D is not in first threshold
In the range of value, step S603 is performed.
In step S603, the detection unit A, detection unit B, detection unit C, the detected value of detection unit D are judged
Whether it is respectively positioned in the range of Second Threshold.
In step s 604, when the detected value is respectively positioned in the range of Second Threshold, obtained according to the azimuth information
The type of the protective case, performs operation corresponding with the protective case type.
Exemplarily, it is respectively positioned in the range of first threshold in the detected value, would know that the two poles of the earth and the numeral of the magnet
Hall sensor it is closer to the distance, the magnet that the detection in conjunction with four detection units is worth to is relative to digital hall sensor
Four kinds of orientation, four kinds of different types of protective cases can be determined;And be respectively positioned in the range of Second Threshold in the detected value, can
Know that the two poles of the earth of the magnet are distant with digital hall sensor, what the detection in conjunction with four detection units was worth to
Magnet can determine four kinds of different types of protective cases again relative to four kinds of orientation of digital hall sensor, it is achieved thereby that
One digital hall sensor differentiates eight kinds of different types of protective cases.It should be noted that being detected described in the present embodiment single
First A, detection unit B, detection unit C, the detected value of detection unit D be on the occasion of.It is only this that magnetic field intensity shown in Fig. 5 is divided
One implementation example of invention, is not intended to limit the invention.In the detection unit A, detection unit B, detection unit C, inspection
The detected value of cells D is surveyed when being negative value, the first threshold scope and Second Threshold scope are negative value, its principle and step
It is identical with upper, i.e., with detection unit A, detection unit B, detection unit C, detection unit D detected value be on the occasion of when it is identical.
Preferably, if in combination with the detected value sum of neighbouring detecting elements in magnet poles direction, four detection units,
The absolute value and first threshold scope of the difference of the detected value of neighbouring detecting elements, Second Threshold scope, can at most detect 16
Plant different types of protective case.It is of course also possible to magnetic field intensity is divided into multiple threshold value models on the basis of it can clearly recognize
Enclose, so as to realize that a digital hall sensor detects more types of protective case.
Embodiment five
Fig. 7 shows the composition structure of the smart machine protective case detection means that the embodiment of the present invention five is provided, in order to just
In explanation, part related to the present invention is illustrate only.
In embodiments of the present invention, described device is used to realize the smart machine described in Fig. 1, Fig. 3, Fig. 4 or Fig. 6 embodiment
Protective case detection method, can be the unit of the software unit, hardware cell or the software and hardware combining that are built in smart machine.Institute
State smart machine including but not limited to mobile phone, pocket computer (Pocket personal Computer, PPC), palm
Computer, personal digital assistant (Personal Digital Assistant, PDA), etc., preferably smart mobile phone, panel computer
Deng.Digital hall sensor is provided with the smart machine, digital hall sensor includes multiple detection units, the protection
Set is built-in with magnet.
As shown in fig. 7, described device includes:
First acquisition module 71, for after the smart machine installation protective case is detected, obtaining the Digital Hall
The detected value of multiple detection units on sensor;
Computing module 72, for calculate neighbouring detecting elements detected value sum and neighbouring detecting elements detected value it
Poor absolute value;
Second acquisition module 73, for the detected value sum according to the neighbouring detecting elements and neighbouring detecting elements
The absolute value of the difference of detected value, obtains azimuth information of the magnet relative to the digital hall sensor;
3rd acquisition module 74, the type for obtaining the protective case according to the azimuth information, performs and the guarantor
The corresponding operation of sheathed-type.
Further, the digital hall sensor includes four detection units, and four detection units are respectively inspection
Unit A, detection unit B, detection unit C, detection unit D are surveyed, and is sequentially located on four drift angles of digital hall sensor, enclosed
Into a square, specific arrangement mode refers to Fig. 2.In fig. 2, the detection unit A and detection unit B, detection unit C
Adjacent, the detection unit D is adjacent with detection unit B, detection unit C.
The computing module 72 includes:
First computing unit 721, for calculate the detected value sum of detection unit A and detection unit C, detection unit B with
The detected value sum of detection unit D, and calculate the absolute value of the difference of the detected value of detection unit A and detection unit C, detection list
The absolute value of the difference of the detected value of first B and detection unit D;And/or
Second computing unit 722, for calculate the detected value sum of detection unit A and detection unit B, detection unit C with
The detected value sum of detection unit D, and calculate the absolute value of the difference of the detected value of detection unit A and detection unit B, detection list
The absolute value of the difference of the detected value of first C and detection unit D.
Further, second acquisition module 73 includes:
First judging unit 731, whether the absolute value of the difference of the detected value for judging detection unit A and detection unit C
Whether the absolute value less than the first predetermined threshold value and the difference of the detected value of detection unit B and detection unit D presets threshold less than second
Value;
Second judging unit 732, during for the judged result in the first judging unit to be, judges detection unit A with inspection
Whether the detected value sum for surveying unit C is more than or less than the detected value sum of detection unit B and detection unit D, if detection unit A
With the detected value sum of the detected value sum more than detection unit B and detection unit D of detection unit C, judge that the magnet is located at
The left of the digital hall sensor, if the detected value sum of detection unit A and detection unit C is less than detection unit B and inspection
The detected value sum of cells D is surveyed, judges that the magnet is located at the right of the digital hall sensor;And/or
3rd judging unit 733, whether the absolute value of the difference of the detected value for judging detection unit A and detection unit B
Whether the absolute value less than the first predetermined threshold value and the difference of the detected value of detection unit C and detection unit D presets threshold less than second
Value;
4th judging unit 734, during for the judged result in the 3rd judging unit to be, judges detection unit A with inspection
Whether the detected value sum for surveying unit B is more than or more than the detected value sum of detection unit C and detection unit D, if detection unit A
With the detected value sum of the detected value sum more than detection unit C and detection unit D of detection unit B, judge that the magnet is located at
The top of the digital hall sensor;If the detected value sum of detection unit A and detection unit B is less than detection unit C and inspection
When surveying the detected value sum of cells D, judge that the magnet is located at the lower section of the digital hall sensor.
Further, the 3rd acquisition module 74 includes:
First acquisition unit 7411, for according to the detection unit A, detection unit B, detection unit C, detection unit D
Detected value obtain magnet poles directions;
Second acquisition unit 7412, the class for obtaining the protective case according to the pole orientation and the azimuth information
Type, performs operation corresponding with the protective case type.
Exemplarily, when the magnet poles direction is the first pole orientation, with reference to four detected values of detection unit
The magnet for obtaining can determine four kinds of different types of protective cases relative to four kinds of orientation of digital hall sensor;And in institute
When stating magnet poles direction for the second pole orientation, with reference to four detection units the magnet that is worth to of detection relative to it is digital suddenly
Four kinds of orientation of your sensor, can determine four kinds of different types of protective cases again, it is achieved thereby that a digital hall sensing
Device differentiates eight kinds of different types of protective cases.
In the case that if position of the digital hall sensor on smart machine is constant, magnet on the protective sleeve relative to
The distance of digital hall sensor is different, and the detected value of digital hall sensor is also differed.The embodiment of the present invention is always according to number
The magnitude of field intensity that word Hall sensor is detected judges different types of protective case.Fig. 5 shows that the embodiment of the present invention is carried
The magnetic field intensity of confession divides schematic diagram.Magnetic field intensity marks off two segment limits, respectively first threshold scope and as shown in Figure 5
Two threshold ranges, wherein, the magnetic field that the magnetic field intensity in the range of the first threshold is all higher than in the range of the Second Threshold is strong
Degree.Magnet the two poles of the earth correspond to different protective case types respectively from the different distance of digital hall sensor.With magnet the two poles of the earth and number
The distance of word Hall sensor as protective case type factor of judgment when, the 3rd acquiring unit 74 may also include:
First judging unit 7421, for judging the detection unit A, detection unit B, detection unit C, detection unit D
Detected value whether be respectively positioned in the range of first threshold;
First kind acquiring unit 7422, for when the detected value is respectively positioned in the range of first threshold, according to described
Azimuth information obtains the type of the protective case, performs operation corresponding with the protective case type;
Second judging unit 7423, for judging the detection unit A, detection unit B, detection unit C, detection unit D
Detected value whether be respectively positioned in the range of Second Threshold;
Second Type acquiring unit 7424, for when the detected value is respectively positioned in the range of Second Threshold, according to described
Azimuth information obtains the type of the protective case, performs operation corresponding with the protective case type.
It can be seen that, it is respectively positioned in the range of first threshold in the detected value, would know that the two poles of the earth and the Digital Hall of the magnet
Sensor it is closer to the distance, the magnet that the detection in conjunction with four detection units is worth to is relative to the four of digital hall sensor
Orientation is planted, four kinds of different types of protective cases can be determined;And be respectively positioned in the range of Second Threshold in the detected value, would know that
The two poles of the earth of the magnet are distant with digital hall sensor, the magnet that the detection in conjunction with four detection units is worth to
Relative to four kinds of orientation of digital hall sensor, four kinds of different types of protective cases can be determined again, it is achieved thereby that one
Digital hall sensor differentiates eight kinds of different types of protective cases.
It should be noted that the device in the embodiment of the present invention can be used for realizing the whole skills in above method embodiment
Art scheme, the function of its each functional module can be implemented according to the method in above method embodiment, and it is implemented
Process can refer to the associated description in above-described embodiment, and here is omitted.
The embodiment of the present invention sets digital hall sensor on smart machine, and the digital hall sensor includes multiple
Detection unit, the protective case is built-in with magnet;After the smart machine installation protective case is detected, the numeral is obtained suddenly
The detected value of multiple detection units on your sensor;Calculate the detected value sum and neighbouring detecting elements of neighbouring detecting elements
The absolute value of the difference of detected value;The detected value of detected value sum and neighbouring detecting elements according to the neighbouring detecting elements it
Poor absolute value, obtains azimuth information of the magnet relative to the digital hall sensor;Obtained according to the azimuth information
The type of the protective case is taken, operation corresponding with the protective case type is performed.The embodiment of the present invention is passed by Digital Hall
The diverse location of sensor and magnet in protective case realizes the identification to various different types of protective cases;Further, institute
State method and be based on digital hall sensor and can detect various protective case types, significantly reduce smart machine into
This.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Unit and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel
Described function, but this realization can be realized it is not considered that exceeding using distinct methods to each specific application
The scope of the present invention.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can be by it
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can be tied
Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed
Coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLINGs or logical of device or unit by some interfaces
Letter connection, can be electrical, mechanical or other forms.
The unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be according to the actual needs selected to realize the mesh of this embodiment scheme
's.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.
If the function is to realize in the form of SFU software functional unit and as independent production marketing or when using, can be with
Storage is in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words
The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used to so that a computer equipment (can be individual
People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the invention.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.
Claims (12)
1. a kind of smart machine protective case detection method, it is characterised in that the smart machine includes digital hall sensor, institute
Stating digital hall sensor includes four detection units, and four detection units are sequentially located at four of digital hall sensor
On drift angle, the protective case is built-in with magnet, and methods described includes:
After the smart machine installation protective case is detected, the inspection of multiple detection units in the digital hall sensor is obtained
Measured value;
Calculate the absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements of neighbouring detecting elements;
The absolute value of the difference of the detected value of detected value sum and neighbouring detecting elements according to the neighbouring detecting elements, obtains
Azimuth information of the magnet relative to the digital hall sensor;
The type of the protective case is obtained according to the azimuth information, operation corresponding with the protective case type is performed.
2. smart machine protective case detection method as claimed in claim 1, it is characterised in that the digital hall sensor bag
Four detection units are included, four detection units are respectively detection unit A, detection unit B, detection unit C, detection unit D,
And be sequentially located on four drift angles of digital hall sensor;
If the detection unit A is adjacent with detection unit B, detection unit C, the detection unit D and detection unit B, detection are single
First C is adjacent, the absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements for calculating neighbouring detecting elements
Including:
The detected value sum of the detected value sum, detection unit B and detection unit D of detection unit A and detection unit C is calculated, with
And calculate detection unit A and detection unit C detected value difference absolute value, detection unit B and detection unit D detected value it
Poor absolute value;And/or
The detected value sum of the detected value sum, detection unit C and detection unit D of detection unit A and detection unit B is calculated, with
And calculate detection unit A and detection unit B detected value difference absolute value, detection unit C and detection unit D detected value it
Poor absolute value.
3. smart machine protective case detection method as claimed in claim 2, it is characterised in that described according to the adjacent detection
The absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements of unit, obtains the magnet relative to the number
The azimuth information of word Hall sensor includes:
Judge the absolute value of difference of the detected value of detection unit A and detection unit C whether less than the first predetermined threshold value and detection list
Whether the absolute value of the difference of the detected value of first B and detection unit D is less than the second predetermined threshold value;
If so, judging whether the detected value sum of detection unit A and detection unit C is single with detection more than or less than detection unit B
The detected value sum of first D;
When the detected value sum of detection unit A and detection unit C is more than the detected value sum of detection unit B and detection unit D,
Judge that the magnet is located at the left of the digital hall sensor;It is small in the detected value sum of detection unit A and detection unit C
When the detected value sum of detection unit B and detection unit D, judge that the magnet is located at the right side of the digital hall sensor
Side;And/or
Judge the absolute value of difference of the detected value of detection unit A and detection unit B whether less than the first predetermined threshold value and detection list
Whether the absolute value of the difference of the detected value of first C and detection unit D is less than the second predetermined threshold value;
If so, judging whether the detected value sum of detection unit A and detection unit B is single with detection more than or less than detection unit C
The detected value sum of first D;
When the detected value sum of detection unit A and detection unit B is more than the detected value sum of detection unit C and detection unit D,
Judge that the magnet is located at the top of the digital hall sensor;It is small in the detected value sum of detection unit A and detection unit B
When the detected value sum of detection unit C and detection unit D, judge that the magnet is located under the digital hall sensor
Side.
4. smart machine protective case detection method as claimed in claim 2, it is characterised in that described according to the adjacent detection
The absolute value of the difference of the detected value of the detected value sum and neighbouring detecting elements of unit, obtains the magnet relative to the number
The azimuth information of word Hall sensor includes:
Judge the absolute value of difference of the detected value of detection unit A and detection unit C whether less than the first predetermined threshold value and detection list
Whether the absolute value of the difference of the detected value of first B and detection unit D is less than the second predetermined threshold value;
If so, judging whether the detected value sum of detection unit A and detection unit C is single with detection more than or less than detection unit B
The detected value sum of first D;
When the detected value sum of detection unit A and detection unit C is more than the detected value sum of detection unit B and detection unit D,
Judge that the magnet is located at the right of the digital hall sensor;It is small in the detected value sum of detection unit A and detection unit C
When the detected value sum of detection unit B and detection unit D, judge that the magnet is located at a left side for the digital hall sensor
Side;And/or
Judge the absolute value of difference of the detected value of detection unit A and detection unit B whether less than the first predetermined threshold value and detection list
Whether the absolute value of the difference of the detected value of first C and detection unit D is less than the second predetermined threshold value;
If so, judging whether the detected value sum of detection unit A and detection unit B is single with detection more than or less than detection unit C
The detected value sum of first D;
When the detected value sum of detection unit A and detection unit B is more than the detected value sum of detection unit C and detection unit D,
Judge that the magnet is located at the lower section of the digital hall sensor;It is small in the detected value sum of detection unit A and detection unit B
When the detected value sum of detection unit C and detection unit D, judge that the magnet is located at the upper of the digital hall sensor
Side.
5. the smart machine protective case detection method as described in any one of claim 2 to 4, it is characterised in that described according to institute
The type that azimuth information obtains the protective case is stated, performing operation corresponding with the protective case type includes:
Detected value according to the detection unit A, detection unit B, detection unit C, detection unit D obtains magnet poles direction;
The type of the protective case is obtained according to the pole orientation and the azimuth information, is performed and the protective case type pair
The operation answered.
6. the smart machine protective case detection method as described in any one of claim 2 to 4, it is characterised in that described according to institute
The type that azimuth information obtains the protective case is stated, performing operation corresponding with the protective case type includes:
Judge whether the detection unit A, detection unit B, detection unit C, the detected value of detection unit D are respectively positioned on first threshold
In the range of;
If so, obtaining the type of the protective case according to the azimuth information, operation corresponding with the protective case type is performed;
Otherwise, judge whether the detection unit A, detection unit B, detection unit C, the detected value of detection unit D are respectively positioned on
In two threshold ranges;
When the detected value is respectively positioned in the range of Second Threshold, the type of the protective case is obtained according to the azimuth information,
Perform operation corresponding with the protective case type.
7. a kind of smart machine protective case detection means, it is characterised in that the smart machine includes digital hall sensor, institute
Stating digital hall sensor includes four detection units, and four detection units are sequentially located at four of digital hall sensor
On drift angle, the protective case is built-in with magnet, and described device includes:
First acquisition module, for after the smart machine installation protective case is detected, obtaining the digital hall sensor
The detected value of upper multiple detection units;
Computing module, the difference of the detected value of detected value sum and neighbouring detecting elements for calculating neighbouring detecting elements it is exhausted
To value;
Second acquisition module, for detected value sum and the detected value of neighbouring detecting elements according to the neighbouring detecting elements
Difference absolute value, obtain the azimuth information of the magnet relative to the digital hall sensor;
3rd acquisition module, the type for obtaining the protective case according to the azimuth information, performs and the protective case class
The corresponding operation of type.
8. smart machine protective case detection means as claimed in claim 7, it is characterised in that the digital hall sensor bag
Four detection units are included, four detection units are respectively detection unit A, detection unit B, detection unit C, detection unit D,
And be sequentially located on four drift angles of digital hall sensor;
If the detection unit A is adjacent with detection unit B, detection unit C, the detection unit D and detection unit B, detection are single
First C is adjacent, and the computing module includes:
First computing unit, detected value sum, detection unit B and detection unit for calculating detection unit A and detection unit C
The detected value sum of D, and the absolute value of the difference of the detected value of detection unit A and detection unit C, detection unit B are calculated with inspection
Survey the absolute value of the difference of the detected value of cells D;And/or
Second computing unit, detected value sum, detection unit C and detection unit for calculating detection unit A and detection unit B
The detected value sum of D, and the absolute value of the difference of the detected value of detection unit A and detection unit B, detection unit C are calculated with inspection
Survey the absolute value of the difference of the detected value of cells D.
9. smart machine protective case detection means as claimed in claim 8, it is characterised in that the second acquisition module bag
Include:
Whether the first judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit C is less than first
Whether the absolute value of the difference of the detected value of predetermined threshold value and detection unit B and detection unit D is less than the second predetermined threshold value;
Second judging unit, during for the judged result in the first judging unit to be, judges detection unit A and detection unit C
Detected value sum whether the detected value sum more than or less than detection unit B and detection unit D, if detection unit A and detection
Detected value sum of the detected value sum of unit C more than detection unit B and detection unit D, judges that the magnet is located at the number
The left of word Hall sensor, if the detected value sum of detection unit A and detection unit C is less than detection unit B and detection unit D
Detected value sum, judge that the magnet is located at the right of the digital hall sensor;And/or
Whether the 3rd judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit B is less than first
Whether the absolute value of the difference of the detected value of predetermined threshold value and detection unit C and detection unit D is less than the second predetermined threshold value;
4th judging unit, during for the judged result in the 3rd judging unit to be, judges detection unit A and detection unit B
Detected value sum whether be more than or the detected value sum more than detection unit C and detection unit D, if detection unit A and detection
Detected value sum of the detected value sum of unit B more than detection unit C and detection unit D, judges that the magnet is located at the number
The top of word Hall sensor, if the detected value sum of detection unit A and detection unit B is less than detection unit C and detection unit D
Detected value sum when, judge that the magnet is located at the lower section of the digital hall sensor.
10. smart machine protective case detection means as claimed in claim 8, it is characterised in that the second acquisition module bag
Include:
Whether the first judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit C is less than first
Whether the absolute value of the difference of the detected value of predetermined threshold value and detection unit B and detection unit D is less than the second predetermined threshold value;
Second judging unit, during for the judged result in the first judging unit to be, judges detection unit A and detection unit C
Detected value sum whether the detected value sum more than or less than detection unit B and detection unit D, if detection unit A and detection
Detected value sum of the detected value sum of unit C more than detection unit B and detection unit D, judges that the magnet is located at the number
The right of word Hall sensor, if the detected value sum of detection unit A and detection unit C is less than detection unit B and detection unit D
Detected value sum, judge that the magnet is located at the left of the digital hall sensor;And/or
Whether the 3rd judging unit, the absolute value of the difference of the detected value for judging detection unit A and detection unit B is less than first
Whether the absolute value of the difference of the detected value of predetermined threshold value and detection unit C and detection unit D is less than the second predetermined threshold value;
4th judging unit, during for the judged result in the 3rd judging unit to be, judges detection unit A and detection unit B
Detected value sum whether be more than or the detected value sum more than detection unit C and detection unit D, if detection unit A and detection
Detected value sum of the detected value sum of unit B more than detection unit C and detection unit D, judges that the magnet is located at the number
The lower section of word Hall sensor, if the detected value sum of detection unit A and detection unit B is less than detection unit C and detection unit D
Detected value sum when, judge that the magnet is located at the top of the digital hall sensor.
The 11. smart machine protective case detection means as described in any one of claim 8 to 10, it is characterised in that the described 3rd
Acquisition module includes:
First acquisition unit, for according to the detection unit A, detection unit B, detection unit C, detection unit D detected value
Obtain magnet poles direction;
Second acquisition unit, the type for obtaining the protective case according to the pole orientation and the azimuth information, performs
Operation corresponding with the protective case type.
The 12. smart machine protective case detection means as described in any one of claim 8 to 10, it is characterised in that the described 3rd
Acquisition module includes:
First judging unit, the detected value for judging the detection unit A, detection unit B, detection unit C, detection unit D
Whether it is respectively positioned in the range of first threshold;
First kind acquiring unit, for when the detected value is respectively positioned in the range of first threshold, according to the azimuth information
The type of the protective case is obtained, operation corresponding with the protective case type is performed;
Second judging unit, the detected value for judging the detection unit A, detection unit B, detection unit C, detection unit D
Whether it is respectively positioned in the range of Second Threshold;
Second Type acquiring unit, for when the detected value is respectively positioned in the range of Second Threshold, according to the azimuth information
The type of the protective case is obtained, operation corresponding with the protective case type is performed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510134424.1A CN104677387B (en) | 2015-03-25 | 2015-03-25 | Smart machine protective case detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510134424.1A CN104677387B (en) | 2015-03-25 | 2015-03-25 | Smart machine protective case detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104677387A CN104677387A (en) | 2015-06-03 |
CN104677387B true CN104677387B (en) | 2017-06-23 |
Family
ID=53312748
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510134424.1A Expired - Fee Related CN104677387B (en) | 2015-03-25 | 2015-03-25 | Smart machine protective case detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104677387B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446426B (en) * | 2015-11-12 | 2018-02-06 | 广东欧珀移动通信有限公司 | A kind of mobile terminal protective case and its detection method, detection means |
CN108173983A (en) * | 2016-12-07 | 2018-06-15 | 中兴通讯股份有限公司 | A kind of mobile terminal, terminal system and mobile terminal mode control method |
CN106596709B (en) * | 2016-12-30 | 2020-08-28 | 纳恩博(天津)科技有限公司 | Method and device for detecting workpiece with embedded magnet |
CN113268111B (en) * | 2021-05-08 | 2023-02-28 | 歌尔股份有限公司 | Intelligent wearable equipment with interactive watchband and watch dial |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1704723A (en) * | 2004-06-03 | 2005-12-07 | 威海华控电工有限公司 | Four-sensor style coding device |
CN101562657A (en) * | 2009-06-03 | 2009-10-21 | 宇龙计算机通信科技(深圳)有限公司 | Method for locally displaying prompt message according to terminal position in outer casing and system thereof |
CN201859138U (en) * | 2010-03-13 | 2011-06-08 | 中国海洋大学 | Nondestructive testing device for marine riser |
CN104023105A (en) * | 2014-06-13 | 2014-09-03 | 广东欧珀移动通信有限公司 | Detection device and detection method of angled rotation of camera of mobile terminal |
CN104301461A (en) * | 2014-09-26 | 2015-01-21 | 深圳市欧珀通信软件有限公司 | Method and device for detecting state of device leather case |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102030190B1 (en) * | 2013-08-22 | 2019-10-10 | 매그나칩 반도체 유한회사 | Method of sensing flip cover |
-
2015
- 2015-03-25 CN CN201510134424.1A patent/CN104677387B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1704723A (en) * | 2004-06-03 | 2005-12-07 | 威海华控电工有限公司 | Four-sensor style coding device |
CN101562657A (en) * | 2009-06-03 | 2009-10-21 | 宇龙计算机通信科技(深圳)有限公司 | Method for locally displaying prompt message according to terminal position in outer casing and system thereof |
CN201859138U (en) * | 2010-03-13 | 2011-06-08 | 中国海洋大学 | Nondestructive testing device for marine riser |
CN104023105A (en) * | 2014-06-13 | 2014-09-03 | 广东欧珀移动通信有限公司 | Detection device and detection method of angled rotation of camera of mobile terminal |
CN104301461A (en) * | 2014-09-26 | 2015-01-21 | 深圳市欧珀通信软件有限公司 | Method and device for detecting state of device leather case |
Also Published As
Publication number | Publication date |
---|---|
CN104677387A (en) | 2015-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104677387B (en) | Smart machine protective case detection method and device | |
CN106971610B (en) | Determine that object is in the method, parking management equipment and system of target area | |
CN101438131B (en) | Calibration method and electronic compass | |
CN103262127B (en) | Object display device and object display method | |
GB2462758A (en) | Azimuthal measurement-while-drilling (MWD)tool | |
CN106200965A (en) | A kind of screen display method, device and mobile terminal | |
CN105160019B (en) | Card display methods and device | |
CN102980535A (en) | Angle measurement method and device | |
CN104035321A (en) | Screen control method of smart watch and smart watch | |
CN104567652B (en) | Rotation angle of camera acquisition methods and device | |
CN106372491A (en) | Sensor access permission management method and equipment | |
CN103167166A (en) | Terminal compass calibrating method and terminal compass calibrating device | |
CN103279904A (en) | Mobile terminal and building information processing method thereof | |
CN105091847A (en) | Distance measurement method and electronic device thereof | |
CN104158962B (en) | Mobile terminal display screen control method and its system | |
CN106066707A (en) | The physical separation of detection portable set | |
CN103542807B (en) | A kind of length measurement method, device and electronic equipment | |
CN106528176A (en) | Address judgment method and terminal | |
CN105243136A (en) | Method and apparatus for mining point of interest (POI) data in internet | |
CN104567791A (en) | Method and device for detecting rotating angle of camera and mobile terminal | |
US20200103542A1 (en) | Structure safety detection system and method thereof | |
CN104780009B (en) | The white frequency spectrum optimization detection method in interior based on compressed sensing | |
CN103000161B (en) | A kind of method for displaying image, device and a kind of intelligent hand-held terminal | |
CN101894369A (en) | Real-time method for computing focal length of camera from image sequence | |
CN107632760A (en) | Handwriting circle selection method and device, touch equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CP03 | Change of name, title or address | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170623 |
|
CF01 | Termination of patent right due to non-payment of annual fee |