CN104406542B - Rotation angle detecting method, device and equipment - Google Patents

Rotation angle detecting method, device and equipment Download PDF

Info

Publication number
CN104406542B
CN104406542B CN201410653307.1A CN201410653307A CN104406542B CN 104406542 B CN104406542 B CN 104406542B CN 201410653307 A CN201410653307 A CN 201410653307A CN 104406542 B CN104406542 B CN 104406542B
Authority
CN
China
Prior art keywords
infrared
intensity value
rotation
infrared intensity
anglec
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410653307.1A
Other languages
Chinese (zh)
Other versions
CN104406542A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410653307.1A priority Critical patent/CN104406542B/en
Publication of CN104406542A publication Critical patent/CN104406542A/en
Application granted granted Critical
Publication of CN104406542B publication Critical patent/CN104406542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention is applied to detection technique field there is provided a kind of rotation angle detecting method, device and equipment, and methods described includes:During whirligig rotates, if receiving angle detection instruction, the infrared intensity value that infrared receiving tube is collected is obtained;From the infrared intensity value prestored with obtaining the anglec of rotation corresponding with the infrared intensity value collected in the mapping table of the anglec of rotation.The above method realizes the detection to the anglec of rotation, and methods described is to judge the anglec of rotation by the infra-red intensity for judging to receive, and is not easily susceptible to the influence of external environment, improves the degree of accuracy of anglec of rotation detection.

Description

Rotation angle detecting method, device and equipment
Technical field
The invention belongs to detection technique field, more particularly to a kind of rotation angle detecting method, device and equipment.
Background technology
Magnet is generally provided with existing whirligig, during whirligig is rotated, magnet rotors will be driven, Magnet rotors will cause magnetic field intensity to change.Prior art detects whether the magnetic field intensity of magnet is sent out by Hall sensor Changing, so as to can determine that whether the whirligig rotates.
However, because Hall sensor is easily disturbed by external magnetic field, influenceing the accuracy rate of detection;And Hall is passed Sensor can only detect two states of whirligig, i.e. rotation can not detect the specific angle of whirligig rotation with not rotating Degree.
The content of the invention
In consideration of it, the embodiment of the present invention provides a kind of rotation angle detecting method, device and equipment, to detect whirligig The anglec of rotation and improve the anglec of rotation detection accuracy rate.
First aspect includes there is provided a kind of rotation angle detecting method, methods described:
During whirligig rotates, if receiving angle detection instruction, obtain what infrared receiving tube was collected Infrared intensity value;
What is obtained and collected from the infrared intensity value and the mapping table of the anglec of rotation that prestore is infrared strong The corresponding anglec of rotation of angle value.
Further, the infrared intensity value that the acquisition infrared receiving tube is collected is specifically included:
By infrared transmitting tube by the reflecting plate of infrared emitting to the whirligig, with the whirligig In rotary course, the infrared receiving tube is given by the infrared reflection by the reflecting plate;
The ultrared infrared intensity value received is obtained from the infrared receiving tube.
Further, the whirligig is cylinder, and the reflecting plate is arranged on the side surface of whirligig, its plane Expanded view is triangle;Or
The whirligig is cylinder, and the reflecting plate is arranged on the whirligig side vertical with rotating shaft, its shape Shape is crescent.
Further, it is described to be obtained from the infrared intensity value and the mapping table of the anglec of rotation that prestore with being adopted The corresponding anglec of rotation of infrared intensity value collected is specially:
Judge to whether there is the infrared intensity value identical infrared intensity value with being collected in the mapping table;
If so, obtaining the anglec of rotation corresponding with the infrared intensity value;
Otherwise, two infrared intensity values adjacent with the infrared intensity value collected in mapping table are obtained, are calculated The average value of adjacent infrared intensity value;
Judge that collected infrared intensity value is equal to the average value of the adjacent infrared intensity value;
If the infrared intensity value collected is equal to the average value of the adjacent infrared intensity value, two phases are obtained respectively The adjacent corresponding anglec of rotation of infrared intensity value, calculates the average value of the anglec of rotation, and the average value of the anglec of rotation is The corresponding anglec of rotation of infrared intensity value collected;
If the infrared intensity value collected is not equal to the average value of the adjacent infrared intensity value, what is collected When infrared intensity value is more than the average value of the adjacent infrared intensity value, obtain larger in two adjacent infrared intensity values It is worth the corresponding anglec of rotation;When the infrared intensity value collected is less than the average value of the adjacent infrared intensity value, obtain Take the corresponding anglec of rotation of smaller value in two adjacent infrared intensity values.
Second aspect includes there is provided a kind of rotation angle detection apparatus, described device:
First acquisition module, during being rotated in whirligig, if receiving angle detection instruction, is obtained infrared The infrared intensity value that reception pipe is collected;
Second acquisition module, for from the infrared intensity value and the mapping table of the anglec of rotation that prestore obtain with The corresponding anglec of rotation of infrared intensity value collected.
Further, first acquisition module specifically for;
By infrared transmitting tube by the reflecting plate of infrared emitting to the whirligig, with the whirligig In rotary course, the infrared receiving tube is given by the infrared reflection by the reflecting plate;
The ultrared infrared intensity value received is obtained from the infrared receiving tube.
Further, the whirligig is cylinder, and the reflecting plate is arranged on the side surface of whirligig, its plane Expanded view is triangle;Or
The whirligig is cylinder, and the reflecting plate is arranged on the whirligig side vertical with rotating shaft, its shape Shape is crescent.
Further, second acquisition module is specifically included:
Judging unit, for judging to whether there is the infrared intensity value identical with being collected in the mapping table Infrared intensity value;
Acquiring unit, revolves for the judged result in judge module for when being, acquisition is corresponding with the infrared intensity value Gyration;
The acquiring unit is additionally operable to, and when the judged result of judge module is no, is obtained in mapping table with being adopted Two adjacent infrared intensity values of the infrared intensity value that collects, calculate the average value of adjacent infrared intensity value;
The judging unit is additionally operable to, and judges that collected infrared intensity value is equal to the adjacent infrared intensity value Average value;
The acquiring unit is additionally operable to, and is equal to the flat of the adjacent infrared intensity value in the infrared intensity value collected Average, obtains the corresponding anglec of rotation of two adjacent infrared intensity values respectively, calculates the average value of the anglec of rotation, described The average value of the anglec of rotation is the corresponding anglec of rotation of infrared intensity value that is collected;
It is not equal to the average value of the adjacent infrared intensity value in the infrared intensity value collected, what is collected When infrared intensity value is more than the average value of the adjacent infrared intensity value, obtain larger in two adjacent infrared intensity values It is worth the corresponding anglec of rotation;When the infrared intensity value collected is less than the average value of the adjacent infrared intensity value, obtain Take the corresponding anglec of rotation of smaller value in two adjacent infrared intensity values.
The third aspect includes there is provided a kind of anglec of rotation monitoring device, the equipment:
Processor, driver, infrared emission tube, infrared receiver tube and whirligig;
The processor is connected with the driver;
The driver is connected with the infrared transmitting tube with infrared receiving tube respectively;
The whirligig is set on mobile terminals, can be rotated relative to the mobile terminal around own torque;Institute State and reflecting plate is provided with whirligig;The infrared transmitting tube and infrared receiving tube are disposed in parallel in the mobile terminal main body On, and the reflecting surface just to the reflecting plate;
The processor is used for, and sends instruction to start infrared emission tube and infrared receiver tube to driver;
The reflecting plate is used for, during whirligig rotates, the infrared reflection that infrared transmitting tube is launched to Infrared receiving tube;
The infrared receiving tube is used for, and receives the infrared ray of the baffle reflection, and by the ultrared intensity of reflection Value is sent to processor by driver.
Further, the whirligig is cylinder, and the reflecting plate is arranged on the side surface of whirligig, its plane Expanded view is triangle;
Or, the whirligig is cylinder, and the reflecting plate is arranged on the whirligig side vertical with rotating shaft, It is shaped as crescent.
Compared with prior art, infrared transmitting tube and infrared receiving tube are applied to the detection anglec of rotation by the embodiment of the present invention Degree;During whirligig rotates, if receiving angle detection instruction, it is infrared that acquisition infrared receiving tube is collected Intensity level;The infrared intensity value with being obtained is obtained from the infrared intensity value and the mapping table of the anglec of rotation that prestore The corresponding anglec of rotation;It is achieved thereby that the detection to the anglec of rotation;Because the embodiment of the present invention is received by judging Infra-red intensity judges the anglec of rotation, is not easily susceptible to the interference of external environment, improves the degree of accuracy of anglec of rotation detection.
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 To obtain other accompanying drawings according to these accompanying drawings.
Fig. 1 is the composition structure chart for the anglec of rotation detection device that the embodiment of the present invention one is provided;
Fig. 2 is the first schematic diagram of the expelling plate that the embodiment of the present invention one is provided;
Fig. 3 is that reflecting plate can reflect the area of infrared light on four diverse locations of the offer of the embodiment of the present invention one;
Fig. 4 is the second schematic diagram of the expelling plate that the embodiment of the present invention one is provided;
Fig. 5 is that rotation angle detecting method that the embodiment of the present invention two is provided first realizes flow chart;
Fig. 6 is that step S502 implements flow in the anglec of rotation monitoring method that the embodiment of the present invention two is provided;
Fig. 7 is the sound between the reflecting plate displacement and infrared intensity value that the experiment that the embodiment of the present invention two is provided is measured The response curve between reflecting plate displacement and infrared intensity value after answering curve and being equivalent;
Fig. 8 is the composition structure chart for the rotation angle detection apparatus that the embodiment of the present invention three is provided.
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.
Infrared transmitting tube and infrared receiving tube are applied to the detection anglec of rotation by the embodiment of the present invention;In whirligig rotation During, if receiving angle detection instruction, obtain the infrared intensity value that infrared receiving tube is collected;From what is prestored Infrared intensity value is with obtaining the anglec of rotation corresponding with the infrared intensity value obtained in the mapping table of the anglec of rotation;So as to Realize the detection to the anglec of rotation;Because the embodiment of the present invention is that rotation is judged by the infra-red intensity for judging to receive Angle, the interference of external environment is not easily susceptible to, the degree of accuracy of anglec of rotation detection is improved.The embodiment of the present invention is additionally provided Corresponding rotation angle detection apparatus and equipment, are described in detail individually below.
Embodiment one
Fig. 1 shows the composition structure for the anglec of rotation detection device that the embodiment of the present invention one is provided, for convenience of description, only Show part related to the present invention.
In embodiments of the present invention, the anglec of rotation detection device includes:
Processor 11, driver 12, infrared emission tube 13, infrared receiver tube 14 and whirligig 15.
The processor 11 is connected with the driver 12;
The driver 12 is connected with the infrared transmitting tube 13 with infrared receiving tube 14 respectively;
The whirligig 15 is arranged on fixed mechanism, can be rotated relative to the fixed mechanism around own torque; Reflecting plate 16 is provided with the whirligig 15;The infrared transmitting tube 13 and infrared receiving tube 14 are disposed in parallel in described solid Determine in mechanism body, and the reflecting surface just to the reflecting plate 16.
Exemplarily, the fixed mechanism is mobile terminal.Then the whirligig 15 is set on mobile terminals, can Rotated relative to the mobile terminal around own torque;Reflecting plate 16, the infrared emission are provided with the whirligig 15 Pipe 13 and infrared receiving tube 14 are arranged in mobile terminal main body, and the surface of emission just to the reflecting plate 16.
The processor 11 is used for, and sends instruction to start infrared emission tube and infrared receiver tube to driver.
The reflecting plate 16 is used for, during whirligig rotates, the infrared reflection that infrared transmitting tube is launched To infrared receiving tube.
The infrared receiver tube 14 is used for, and receives the infrared ray of the baffle reflection, and by the ultrared of reflection Intensity level is sent to processor by driver.
In embodiments of the present invention, the whirligig is preferably cylindrical, camera can be set thereon, to realize to taking the photograph As the detection of the head anglec of rotation, such as the mobile terminal camera anglec of rotation.
The angle of rotation, whirligig are detected in order to realize by detecting the infra-red intensity value of infrared receiving tube return The area that infrared light can be reflected when rotating to different angles on reflecting plate is differed, therefore, described in the embodiment of the present invention Reflecting plate has the shape and specific set location determined.
Exemplarily, the reflecting plate may be provided at the side surface of whirligig, and its plane outspread drawing is triangle, is such as schemed Shown in 2.And the infrared transmitting tube 13 and infrared receiving tube 14 are set up in parallel, and the reflecting surface just to the reflecting plate 16.Its In, (a) in Fig. 2 is the side view of whirligig, and (b) is sectional view of the whirligig perpendicular to rotating shaft.As can be seen from Figure 2, by In reflecting plate plane outspread drawing be triangle, therefore whirligig along rotating shaft rotate when, rotate to each different position On, the area that infrared light can be reflected on reflecting plate is differed so that the amount for the infrared light that infrared receiving tube is received Differ, so as to determine the angle that whirligig rotates according to the intensity level of infrared light.Fig. 3 show four it is different Reflecting plate can reflect the area of infrared light on position.Wherein, triangle is reflecting plate, what big circle was launched for infrared transmitting tube Infrared light, the part of big circular and triangle intersections is the infrared light area that reflecting plate can reflect.
Preferably, the reflecting plate may be provided at (bottom i.e. parallel with section on the whirligig side vertical with rotating shaft On face), it is shaped as crescent, as shown in Figure 4.And the infrared transmitting tube 13 and infrared receiving tube 14 are set up in parallel, and just To the reflecting surface of the reflecting plate 16.Wherein, (a) in Fig. 4 be whirligig side view, (b) be whirligig perpendicular to The sectional view of rotating shaft.As can be seen from Figure 4, because the plane outspread drawing of reflecting plate is crescent, therefore whirligig rotates along rotating shaft When, rotate on each different position, the area that infrared light can be reflected on reflecting plate is differed so that infrared to connect The amount for the infrared light that closed tube is received is also what is differed, so as to determine what whirligig rotated according to the intensity level of infrared light Angle.
Embodiment two
Fig. 5 shows that the rotation angle detecting method that the embodiment of the present invention two is provided realizes flow, for convenience of description, It illustrate only part related to the present invention.
In the present embodiment, methods described is applied to the anglec of rotation detection device described in Fig. 1 embodiments.
As shown in figure 5, methods described includes:
In step S501, during whirligig rotates, if receiving angle detection instruction, infrared receiver is obtained The infrared intensity value that pipe is collected.
In the present embodiment, refer to detect whirligig current location relative to 0 ° of position during angle detection instruction Deviation angle.The angle detection instruction (has for the instruction of user input such as on mobile terminal display screen by clicking on The instruction that the function key of detection anglec of rotation function is sent) or according to the instruction of default time interval triggering.
If getting angle detection instruction, driving instruction is sent to driver according to angle detection instruction, to open Dynamic infrared transmitting tube transmitting infrared light and startup infrared receiving tube receive infrared light.
The infrared transmitting tube launches infrared light to whirligig, and the reflecting plate on whirligig is projected onto thereon red External light reflection goes back, and infrared receiving tube receives the infrared light that this is reflected.The whirligig is preferably cylindrical, and described Reflecting plate is arranged on the whirligig side vertical with rotating shaft, and it is shaped as crescent;Or the reflecting plate is arranged on The side surface of whirligig, its plane outspread drawing be triangle so that whirligig along rotating shaft rotate when, rotate to each On individual different position, the area that infrared light can be reflected on reflecting plate is differed so that what infrared receiving tube was received The amount of infrared light is also what is differed.
In step S502, obtained from the infrared intensity value and the mapping table of the anglec of rotation that prestore with being adopted The corresponding anglec of rotation of infrared intensity value collected.
In embodiments of the present invention, each whirligig and angle sensing device are measured in advance, to obtain Corresponding relation between the angle that infra-red intensity value and whirligig received by infrared receiving tube are rotated, is made infrared The mapping table of intensity level and the anglec of rotation.Exemplarily, what the embodiment of the present invention defined that infrared receiving tube receives is infrared Line strength value when being 0 the anglec of rotation of corresponding whirligig be 0 °.Then the angle of whirligig often increases the default number of degrees (ratio As often increased by 5 °), then the infra-red intensity value that an infrared receiving tube is received is detected, and recorded in table form; Until the angle of whirligig is 360 °, so as to obtain the mapping table of infrared intensity value and the anglec of rotation, and store described The mapping table of infrared intensity value and the anglec of rotation.
Get after the infrared intensity value that infrared receiving tube is received, by the infrared intensity value gathered and prestore Each infrared intensity value in the mapping table of infrared intensity value and the anglec of rotation is compared.In the infrared intensity value With existing in the mapping table of the anglec of rotation during infrared intensity value identical infrared intensity value with being collected, obtain and institute The corresponding anglec of rotation of infrared intensity value is stated, the anglec of rotation corresponding with the infrared intensity value is infrared for what is collected The corresponding anglec of rotation of intensity level, deviation angle of the position relative to 0 ° is presently in so as to obtain whirligig.Otherwise, exist It is infrared in the absence of the infrared intensity value identical with being collected in the mapping table of the infrared intensity value and the anglec of rotation During intensity level, then the corresponding anglec of rotation of collected infrared intensity value is calculated according to default mode.The default side Formula will be described in detail in subsequent embodiment, specifically refer to subsequent embodiment.
Preferably, after the anglec of rotation corresponding with the infrared intensity value collected is obtained, methods described also includes:
Show the anglec of rotation.
The anglec of rotation corresponding with infrared intensity value that is being collected is included on the display screen of mobile terminal, from And make it that user can know the current anglec of rotation of whirligig in real time.
In embodiments of the present invention, infrared transmitting tube and infrared receiving tube are applied to the detection anglec of rotation;If in rotation During device rotates, if receiving angle detection instruction, the infrared intensity value that infrared receiving tube is collected is obtained;From The infrared intensity value prestored is corresponding with the infrared intensity value collected with being obtained in the mapping table of the anglec of rotation The anglec of rotation;It is achieved thereby that the detection to the anglec of rotation;Because the embodiment of the present invention is the infrared ray by judging to receive Intensity judges the anglec of rotation, is not easily susceptible to the influence of external environment, improves the degree of accuracy of anglec of rotation detection.
Fig. 6 shows that step S302 implements stream in the rotation angle detecting method that the embodiment of the present invention two is provided Journey.
As shown in fig. 6, step S502 includes:
In step S601, judge that the infrared intensity value identical that whether there is in the mapping table with collected is red Outer intensity level.
In the present embodiment, reflecting the infrared intensity value gathered and the infrared intensity value that prestores and the anglec of rotation Each infrared intensity value penetrated in relation table is compared.If there is the infrared intensity value phase with being gathered in mapping table With infrared intensity value when, perform step S602;Otherwise, step S603 is performed.
In step S602, the anglec of rotation corresponding with the infrared intensity value is obtained.
In step S603, two infrared intensities adjacent with the infrared intensity value collected in mapping table are obtained Value, calculates the average value of adjacent infrared intensity value.
In step s 604, judge that collected infrared intensity value is equal to being averaged for the adjacent infrared intensity value Value.
In the present embodiment, by taking the average value of adjacent infrared intensity value, so as to will be red in mapping table The precision of outer intensity level is refined again.Judge whether collected infrared intensity value is equal to the flat of adjacent infrared intensity value again Average.When judged result is to be, then step S605 is performed;Otherwise, step S606 is performed
In step s 605, the corresponding anglec of rotation of two adjacent infrared intensity values is obtained respectively, calculates the rotation The average value of angle, the average value of the anglec of rotation is the corresponding anglec of rotation of infrared intensity value that is collected.
After Fig. 7 shows response curve between the reflecting plate displacement and infrared intensity value that experiment measures and is equivalent Reflecting plate displacement and infrared intensity value between response curve, reflecting plate displacement and the anglec of rotation are corresponded. In response curve between the reflecting plate displacement and infrared intensity value that are obtained from (a) in Fig. 7 for experiment test, Fig. 7 (b) be the response curve between the reflecting plate displacement and infrared intensity value after equivalent, abscissa represent reflecting plate movement away from From ordinate represents infrared intensity value.According to the isoeffect curve of (b) in Fig. 7, between reflecting plate displacement and infrared intensity value Three sections of functions can be divided into, when reflecting plate displacement is 0 to 5 millimeters, infrared intensity value is 0;It is 5 in reflecting plate displacement When millimeter is to 1.8 millimeters, linear relationship is presented with reflecting plate displacement in infrared intensity value;It is more than in reflecting plate displacement At 1.8 millimeters, infrared intensity value is with fixed value.Therefore, also showed between the anglec of rotation and infrared intensity value and above-mentioned phase As linear relationship.Certainly, the response curve shown in Fig. 7 is only that one of the embodiment of the present invention specific anglec of rotation detection is set Standby response curve, other anglec of rotation detection devices have the response curve similar to Fig. 7 variation tendencies, and Fig. 7 is served only for There is the linear relationship of linear segmented between the bright anglec of rotation and infrared intensity value.In view of the response curve shown in Fig. 7, the present invention Embodiment when the infrared intensity value collected is equal to the average value of the infrared intensity value, obtain respectively two it is adjacent red The corresponding anglec of rotation of outer intensity level, calculates the average value of the anglec of rotation, the average value of the anglec of rotation is to be gathered The infrared intensity value corresponding rotation angle arrived.
In step S606, judge whether collected infrared intensity value is more than the flat of the adjacent infrared intensity value Average.
When judged result is to be, then step S607 is performed;Otherwise, step S608 is performed.
In step S607, it is more than the average value of the adjacent infrared intensity value in the infrared intensity value collected When, obtain the corresponding anglec of rotation of higher value in two adjacent infrared intensity values.
In step S608, it is less than the average value of the adjacent infrared intensity value in the infrared intensity value collected When, obtain the corresponding anglec of rotation of smaller value in two adjacent infrared intensity values.
Used above-mentioned steps are identical with the infrared intensity value collected with existing in mapping table in infrared intensity value Infrared intensity value when, then directly obtain with the infrared intensity value identical anglec of rotation;Otherwise, by taking with being collected The adjacent infrared intensity value of infrared intensity value, then average again, can further refine the precision of infrared intensity value;And Determined according to the magnitude relationship between the infrared intensity value gathered and the average value corresponding with the infrared intensity value that is gathered The anglec of rotation, the degree of accuracy of the acquired anglec of rotation is further increased, while it also avoid founding mathematical models.Red In the mapping table of outer intensity level and the anglec of rotation precision of infrared intensity value and the anglec of rotation all very little when, pass through above-mentioned side The anglec of rotation that method is obtained is more accurate.
Embodiment three
Fig. 8 shows the composition structure for the rotation angle detection apparatus that the embodiment of the present invention three is provided, for convenience of description, It illustrate only part related to the present invention.
In embodiments of the present invention, described device is used to realize rotation angle detecting method as shown in Figure 4 and Figure 6.Can To be the unit of the software unit, hardware cell or software and hardware combining that are built in mobile terminal.The mobile terminal include but It is not limited to mobile phone, panel computer, notebook computer etc..
As shown in figure 8, described device includes:
First acquisition module 81, during being rotated in whirligig, if receiving angle detection instruction, is obtained red The infrared intensity value that external shelter collects;
Second acquisition module 82, for being obtained from the infrared intensity value and the mapping table of the anglec of rotation that prestore The anglec of rotation corresponding with the infrared intensity value collected.
Further, first acquisition module 81 specifically for;
By infrared transmitting tube by the reflecting plate of infrared emitting to the whirligig, with the whirligig In rotary course, the infrared receiving tube is given by the infrared reflection by the reflecting plate;
The ultrared infrared intensity value received is obtained from the infrared receiving tube.
Exemplarily, the present embodiment described device includes an anglec of rotation detection device device, and the equipment includes processing Device, driver, infrared emission tube, infrared receiver tube and whirligig.
The whirligig is set on mobile terminals, can be rotated relative to the mobile terminal around own torque.Institute State and reflecting plate is provided with whirligig;The infrared transmitting tube and infrared receiving tube are disposed in parallel in the mobile terminal main body On, and the reflecting surface just to the reflecting plate.
In embodiments of the present invention, the reflecting plate is used to during whirligig rotates, infrared transmitting tube be sent out The infrared reflection penetrated is to infrared receiving tube.
The infrared transmitting tube launches infrared light to whirligig, and the reflecting plate on whirligig is projected onto thereon red External light reflection goes back, the infrared light reflected described in infrared receiving tube reception.The whirligig is preferably cylindrical, and institute State reflecting plate to be arranged on the whirligig side vertical with rotating shaft, it is shaped as crescent;Or the reflecting plate is arranged on The side surface of whirligig, its plane outspread drawing is triangle;So that whirligig along rotating shaft rotate when, rotate to each On individual different position, the area that infrared light can be reflected on reflecting plate is differed so that what infrared receiving tube was received The amount of infrared light is also what is differed.The embodiment of the present invention is tested and obtains the anglec of rotation of whirligig and corresponding in advance The infrared intensity value that receives of infrared receiving tube, the infrared intensity value and the anglec of rotation are recorded in the way of form, so as to obtain Obtain the mapping table of infrared intensity value and the anglec of rotation.It is stored in the mapping relations of the infrared intensity value and the anglec of rotation Table, so as to directly can therefrom obtain rotation corresponding with the infrared intensity value obtained during the anglec of rotation of subsequent detection whirligig Gyration, improves the detection efficiency of the anglec of rotation.
Further, second acquisition module 82 is specifically included:
Judging unit 821, for judging to whether there is the infrared intensity value phase with being collected in the mapping table Same infrared intensity value;
Acquiring unit 822, for the judged result in judge module for when being, acquisition is corresponding with the infrared intensity value The anglec of rotation;
The acquiring unit 821 is additionally operable to, when the judged result of judge module is no, with institute in acquisition mapping table Two adjacent infrared intensity values of the infrared intensity value that collects, calculate the average value of adjacent infrared intensity value;
The judging unit 822 is additionally operable to, and judges that collected infrared intensity value is equal to described adjacent infrared strong The average value of angle value;
The acquiring unit 821 is additionally operable to, and is equal to the adjacent infrared intensity value in the infrared intensity value collected Average value, the corresponding anglec of rotation of two adjacent infrared intensity values is obtained respectively, the average value of the anglec of rotation is calculated, The average value of the anglec of rotation is the corresponding anglec of rotation of infrared intensity value that is collected;
It is not equal to the average value of the adjacent infrared intensity value in the infrared intensity value collected, what is collected When infrared intensity value is more than the average value of the adjacent infrared intensity value, obtain larger in two adjacent infrared intensity values It is worth the corresponding anglec of rotation;When the infrared intensity value collected is less than the average value of the adjacent infrared intensity value, obtain Take the corresponding anglec of rotation of smaller value in two adjacent infrared intensity values.
Preferably, after the anglec of rotation corresponding with acquired infrared intensity value is obtained, described device also includes display Module, for showing the anglec of rotation.
The anglec of rotation corresponding with infrared intensity value that is being collected is included on the display screen of mobile terminal, from And make it that user can know the current anglec of rotation of whirligig in real time.
In embodiments of the present invention, infrared transmitting tube and infrared receiving tube are applied to the detection anglec of rotation;If in rotation During device rotates, if receiving angle detection instruction, the infrared intensity value that infrared receiving tube is collected is obtained;From The infrared intensity value prestored is corresponding with the infrared intensity value collected with being obtained in the mapping table of the anglec of rotation The anglec of rotation;It is achieved thereby that the detection to the anglec of rotation;Because the embodiment of the present invention is the infrared ray by judging to receive Intensity judges the anglec of rotation, is not easily susceptible to the influence of external environment, improves the degree of accuracy of anglec of rotation detection.
Those of ordinary skill in the art are further appreciated that all or part of step realized in above-described embodiment method is can To instruct the hardware of correlation to complete by program, described program can be stored in a computer read/write memory medium In, described storage medium, including ROM/RAM, disk, CD etc..
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention.For example, modules are only Divided according to function logic, but be not limited to above-mentioned division, as long as corresponding function can be realized;Separately Outside, the specific name of each functional module is also only to facilitate mutually distinguish, the protection domain being not intended to limit the invention.
Any modification, equivalent and improvement for being made within the spirit and principles of the invention etc., should be included in Within protection scope of the present invention.

Claims (7)

1. a kind of rotation angle detecting method, it is characterised in that methods described includes:
During whirligig rotates, if receiving angle detection instruction, it is infrared that acquisition infrared receiving tube is collected Intensity level;
The infrared intensity value with being collected is obtained from the infrared intensity value and the mapping table of the anglec of rotation that prestore The corresponding anglec of rotation;
Wherein, the whirligig is cylinder, and reflecting plate is arranged on the side surface of whirligig, and its plane outspread drawing is triangle Shape;Or
The whirligig is cylinder, and reflecting plate is arranged on the whirligig side vertical with rotating shaft, and it is shaped as crescent moon Shape.
2. rotation angle detecting method as claimed in claim 1, it is characterised in that the acquisition infrared receiving tube is collected Infrared intensity value specifically include:
By infrared transmitting tube by the reflecting plate of infrared emitting to the whirligig, with the rotation of the whirligig During, give the infrared receiving tube by the infrared reflection by the reflecting plate;
The ultrared infrared intensity value received is obtained from the infrared receiving tube.
3. rotation angle detecting method as claimed in claim 1, it is characterised in that described from the infrared intensity value prestored It is specially with obtaining the anglec of rotation corresponding with the infrared intensity value collected in the mapping table of the anglec of rotation:
Judge to whether there is the infrared intensity value identical infrared intensity value with being collected in the mapping table;
If so, obtaining the anglec of rotation corresponding with the infrared intensity value;
Otherwise, two infrared intensity values adjacent with the infrared intensity value collected in mapping table are obtained, are calculated adjacent Infrared intensity value average value;
Judge that collected infrared intensity value is equal to the average value of the adjacent infrared intensity value;
If the infrared intensity value collected is equal to the average value of the adjacent infrared intensity value, obtain respectively two it is adjacent The corresponding anglec of rotation of infrared intensity value, calculates the average value of the anglec of rotation, the average value of the anglec of rotation is is adopted The corresponding anglec of rotation of infrared intensity value collected;
It is infrared what is collected if the infrared intensity value collected is not equal to the average value of the adjacent infrared intensity value When intensity level is more than the average value of the adjacent infrared intensity value, the higher value pair in two adjacent infrared intensity values is obtained The anglec of rotation answered;When the infrared intensity value collected is less than the average value of the adjacent infrared intensity value, two are obtained The corresponding anglec of rotation of smaller value in individual adjacent infrared intensity value.
4. a kind of rotation angle detection apparatus, it is characterised in that described device includes:
First acquisition module, during being rotated in whirligig, if receiving angle detection instruction, obtains infrared receiver The infrared intensity value that pipe is collected;
Second acquisition module, for being obtained from the infrared intensity value and the mapping table of the anglec of rotation that prestore with being adopted The corresponding anglec of rotation of infrared intensity value collected;
Wherein, the whirligig is cylinder, and reflecting plate is arranged on the side surface of whirligig, and its plane outspread drawing is triangle Shape;Or
The whirligig is cylinder, and reflecting plate is arranged on the whirligig side vertical with rotating shaft, and it is shaped as crescent moon Shape.
5. rotation angle detection apparatus as claimed in claim 4, it is characterised in that first acquisition module specifically for;
By infrared transmitting tube by the reflecting plate of infrared emitting to the whirligig, with the rotation of the whirligig During, give the infrared receiving tube by the infrared reflection by the reflecting plate;
The ultrared infrared intensity value received is obtained from the infrared receiving tube.
6. rotation angle detection apparatus as claimed in claim 4, it is characterised in that second acquisition module is specifically included:
Judging unit, the infrared intensity value identical for judging in the mapping table to whether there is with collected is infrared Intensity level;
Acquiring unit, for when the judged result of judge module is to be, obtaining the anglec of rotation corresponding with the infrared intensity value Degree;
The acquiring unit is additionally operable to, and when the judged result of judge module is no, is obtained in mapping table with being collected Adjacent two infrared intensity values of infrared intensity value, calculate the average value of adjacent infrared intensity value;
The judging unit is additionally operable to, and judges that collected infrared intensity value is equal to the flat of the adjacent infrared intensity value Average;
The acquiring unit is additionally operable to, and is equal to being averaged for the adjacent infrared intensity value in the infrared intensity value collected Value, obtains the corresponding anglec of rotation of two adjacent infrared intensity values, calculates the average value of the anglec of rotation, the rotation respectively The average value of gyration is the corresponding anglec of rotation of infrared intensity value that is collected;
It is not equal to the average value of the adjacent infrared intensity value in the infrared intensity value collected, it is infrared what is collected When intensity level is more than the average value of the adjacent infrared intensity value, the higher value pair in two adjacent infrared intensity values is obtained The anglec of rotation answered;When the infrared intensity value collected is less than the average value of the adjacent infrared intensity value, two are obtained The corresponding anglec of rotation of smaller value in individual adjacent infrared intensity value.
7. a kind of anglec of rotation detection device, it is characterised in that the equipment includes:
Processor, driver, infrared emission tube, infrared receiver tube and whirligig;
The processor is connected with the driver;
The driver is connected with the infrared transmitting tube with infrared receiving tube respectively;
The whirligig is set on mobile terminals, can be rotated relative to the mobile terminal around own torque;The rotation Reflecting plate is provided with rotary device;The infrared transmitting tube and infrared receiving tube are disposed in parallel in the mobile terminal main body, And the reflecting surface just to the reflecting plate;
The processor is used for, and sends instruction to start infrared emission tube and infrared receiver tube to driver;
The reflecting plate is used for, during whirligig rotates, and the infrared reflection that infrared transmitting tube is launched is to infrared Reception pipe;
The infrared receiving tube is used for, and receives the infrared ray of the baffle reflection, and the ultrared intensity level of reflection is led to Device of overdriving is sent to processor;
The whirligig is cylinder, and the reflecting plate is arranged on the side surface of whirligig, and its plane outspread drawing is triangle Shape;
Or, the whirligig is cylinder, and the reflecting plate is arranged on the whirligig side vertical with rotating shaft, its shape Shape is crescent.
CN201410653307.1A 2014-11-14 2014-11-14 Rotation angle detecting method, device and equipment Active CN104406542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410653307.1A CN104406542B (en) 2014-11-14 2014-11-14 Rotation angle detecting method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410653307.1A CN104406542B (en) 2014-11-14 2014-11-14 Rotation angle detecting method, device and equipment

Publications (2)

Publication Number Publication Date
CN104406542A CN104406542A (en) 2015-03-11
CN104406542B true CN104406542B (en) 2017-07-14

Family

ID=52644190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410653307.1A Active CN104406542B (en) 2014-11-14 2014-11-14 Rotation angle detecting method, device and equipment

Country Status (1)

Country Link
CN (1) CN104406542B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104853181B (en) * 2015-05-13 2017-06-23 广东欧珀移动通信有限公司 Rotating camera relative position detection method and system
CN106016716A (en) * 2016-05-31 2016-10-12 芜湖鸣人热能设备有限公司 Rotary boiler
CN109682327B (en) * 2019-01-25 2022-01-18 Oppo广东移动通信有限公司 Angle measuring device and electronic apparatus
CN109724936A (en) * 2019-02-21 2019-05-07 福州普贝斯智能科技有限公司 A kind of water quality spectroanalysis instrument
CN111121666B (en) * 2019-12-25 2021-07-16 联想(北京)有限公司 Angle determination method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1311431A (en) * 2000-03-02 2001-09-05 张力 Sensor signal derivative device on rotary body
CN1576783A (en) * 2003-07-23 2005-02-09 Lg电子株式会社 Method and apparatus for detecting position of mobile robot
CN2720408Y (en) * 2004-08-20 2005-08-24 西南交通大学 Bicycle riding track detection device
CN200996836Y (en) * 2006-05-17 2007-12-26 江苏技术师范学院 Signal generater for measuring rotary angle

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3813744B2 (en) * 1998-08-21 2006-08-23 株式会社小松製作所 Rotating angle measuring device and measuring method of rotating projectile

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1311431A (en) * 2000-03-02 2001-09-05 张力 Sensor signal derivative device on rotary body
CN1576783A (en) * 2003-07-23 2005-02-09 Lg电子株式会社 Method and apparatus for detecting position of mobile robot
CN2720408Y (en) * 2004-08-20 2005-08-24 西南交通大学 Bicycle riding track detection device
CN200996836Y (en) * 2006-05-17 2007-12-26 江苏技术师范学院 Signal generater for measuring rotary angle

Also Published As

Publication number Publication date
CN104406542A (en) 2015-03-11

Similar Documents

Publication Publication Date Title
CN104406542B (en) Rotation angle detecting method, device and equipment
CN103582856B (en) Use the rest detection of accelerometer
CN104303129B (en) The method that screen for managing portable electronic device orients
CN109947508A (en) Multi-screen display method, device, electronic equipment and computer-readable storage medium
KR20180079399A (en) Method and device for determining the angle of rotation of a human face,
CN101632595B (en) Ultrasonic diagnostic equipment
EP2738640A3 (en) Portable apparatus having a plurality of touch screens and method of outputting sound thereof
CN104284089A (en) Method and apparatus for operating camera function in portable terminal
CN106648494A (en) Information processing method and electronic device
CN107462674B (en) Air detection device and method
CN105674897B (en) Measure the method and device of object height
WO2020238582A1 (en) Stepper motor detection method, apparatus and system
WO2019205735A1 (en) Data transmission method and apparatus, and display screen and display apparatus
CN104035321A (en) Screen control method of smart watch and smart watch
CN107401823A (en) Ducting assembly, air conditioner and air outlet anglec of rotation control method
CN107065035B (en) A kind of geomagnetic sensor calibrating installation, method and mobile terminal
CN104618634B (en) Mobile terminal and the method for calibrating rotation angle of camera
CN106546970A (en) The ultrasound wave calibration steps of mobile device and device
CN108089187A (en) Positioner and localization method
CN110380792A (en) Control method, mobile terminal and the computer storage medium of screen state
CN108958375A (en) A kind of Morphology observation method, Morphology observation device and electronic equipment
CN204291178U (en) A kind of imaging device and system
CN107015231A (en) A kind of information processing method and electronic equipment
CN203811190U (en) Distance-measuring device
CN108900662A (en) Electronic device and drive control method

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