1. Technical Field
The present disclosure relates to a device and to a method for detecting the orientation of an electronic apparatus.
2. Description of the Related Art
As is known, the integration of MEMS sensors in electronic devices is becoming increasingly widespread because it enables numerous functionalities to be made available in a simple and intuitive or even automatic way, considerably extending the range of operations that can be carried out. For example, it is possible to implement an interface that enables commands to be imparted to a computer through movement in space, by varying the position or the inclination. Likewise, it is possible to control portable devices, such as palm-top computers, cell phones, photographic cameras, camcorders, audio/video reproducers, and the like.
In particular, some functions do not require more than an approximate estimate of the position or orientation in space, and it is not necessary to supply precise measurements. For example, a photographic camera, or an apparatus that incorporates the function of photographic camera, can generally be used in a “landscape” configuration, in which a picture is taken that has its major side that is substantially horizontal, and a “portrait” position, in which the major side of the image is vertical. The use of a MEMS inertial sensor as an inclinometer enables the orientation of the device to be determined automatically. During memory saving, it is hence possible to include data regarding the orientation of the image itself, which can be used when it is being displayed on or transferred to a medium external to the electronic device in order to determine the original orientation.
Additionally, a MEMS inertial sensor can be incorporated in an image-viewer device to determine the orientation thereof during use and accordingly rotate the images that are displayed.
Even though it is not indispensable to calculate at each moment the value of the total acceleration, processing the data that can be detected through the inertial sensor involves a considerable use of resources. This is disadvantageous for at least two reasons. The first is that the conventional use of the inertial sensor significantly reduces the computing power available for other applications, which increasingly more frequently occupy the system resources in an intensive way. The second reason is linked to power consumption, which, among other things, affects to a considerable extent the autonomy and cost of operation. The minimization of the power consumption is a primary target practically in every sector of modern electronics and, in particular, for portable devices. The higher power consumption of using an unnecessary processing complexity is not justified.
Embodiments include a device and a method for detecting the orientation of an electronic apparatus that are free from the limitations described.
For a better understanding of the disclosure, some embodiments thereof are now described, purely by way of non-limiting example and with reference to the attached drawings, wherein:
a and 4b are front views of an image sensor incorporated in the electronic apparatus of
The electronic apparatus 1 comprises a body 2, a control unit 3, an image sensor 5 of a digital type, a nonvolatile-memory unit 6, a display 8, and an orientation detecting device 10.
The body 2 comprises a base 2a that normally faces downwards. The body 2 houses inside it the image sensor 5, the memory unit 6, and the orientation detecting device 10. The display 8 is set on the back of the body 2 so as to be visible by a user when he is taking a photograph.
The image sensor 5 is, for example, a CCD or CMOS sensor and is arranged perpendicular to an optical axis OA of a lens 11 mounted on the body 2. In addition, the image sensor 5 has a rectangular shape and, during use of the electronic apparatus 1, is normally set in a “landscape” configuration or in a “portrait” configuration. More precisely, in the “landscape” configuration (
The orientation detecting device 10 is mounted on a board (not shown) so as to be rigidly fixed to the body 2 of the electronic apparatus 1. In addition, the orientation detecting device 10 is communicably coupled to an interrupt input 3a and to data inputs 3b of the control unit 3. More precisely, the orientation detecting device 10 has an interrupt terminal 10a accessible from outside and connected to the interrupt input 3a. As is shown in
In one embodiment, the detection axes X, Y are parallel to a plane of the image sensor 5. In addition, the detection axis X is substantially horizontal when the electronic apparatus 1 is in a respective first operating position (“landscape”), whereas the detection axis Y is substantially horizontal in a second operating position (“portrait”). Both of the detection axes X, Y are substantially horizontal, with the detection axis Z substantially vertical, when the electronic apparatus 1 is in a third operating position (“plane”).
The read interface 16 converts the signals supplied by the inertial sensor 15 into numeric inertial signals AX, AY, AZ for respective detection axes X, Y, Z of the inertial sensor 15 itself.
In addition, the processing unit 13 comprises a control module 17, an interrupt-generator module 18, and an input/output (I/O) register 20.
The control module 17 receives the inertial signals AX, AY, AZ from the read interface 16 and determines the magnitude and sign thereof. Hereinafter, reference is made to the magnitude of the inertial signals AX, AY, AZ, unless otherwise specified. The inertial signals AX, AY, AZ are forwarded to the interrupt-generator module 18 and loaded (in magnitude and sign) into the I/O register 20.
The control module 17 is designed to execute also supervision operations. Among other things, the control module 17 supplies to the interrupt-generator module 18 a configuration string SCFG, which determines an operating mode thereof, as described hereinafter.
The interrupt-generator module 18 processes the inertial signals AX, AY, AZ to provide control functions, in particular to determine the orientation of the electronic apparatus 1 in a reference system fixed with respect to the Earth. In the embodiment described, an interrupt signal INT is generated and made available on the interrupt terminal 10a following upon changes between the various detectable operating positions and indeterminate positions, which cause state transitions as described hereinafter. The interrupt signal INT is sent to the interrupt input 3a of the control unit 3 of the electronic apparatus 1 (see also
In greater detail, in one operating mode, the interrupt-generator module 18 determines whether the direction of at least one of the detection axes X, Y, Z of the inertial sensor 15 has become substantially horizontal and in response sends the interrupt signal INT to the interrupt input 3a of the control unit 3. In a different operating mode, the interrupt signal INT is generated when the electronic apparatus 1 is oriented in such a way that two of the detection axes X, Y, Z are substantially horizontal simultaneously.
At the same time, the interrupt-generator module 18 loads an orientation string SOR into the I/O register 20. The orientation string SOR contains information on orientation of the detection axes X, Y, Z of the inertial sensor 15 and hence of the electronic apparatus 1. A main field SORP of the orientation string SOR indicates whether the electronic apparatus 1 is in the first, second or third operating position. Three further sign fields SORX, SORY, SORZ of the orientation string SOR contain values on magnitude and sign of the inertial signals AX, AY, AZ. In practice, the sign fields SORX, SORY, SORZ supply further information regarding the orientation of the electronic apparatus 1, in particular the axis or detection axes that are not substantially horizontal. For example, in a biaxial operating mode, the first operating position (“landscape”) is defined by the detection axis X being substantially horizontal. Likewise, in a triaxial operating mode, the first operating position (“landscape”) is defined by the detection axis X and the detection axis Z being substantially horizontal. In both cases, the value of sign in the sign field SORY, for the inertial signal AY, indicates whether the detection axis Y is facing upwards (positive sign) or downwards (negative sign). The same applies of course for the values contained in the sign fields SORX, SORZ, respectively, for the inertial signals AX, AZ. This type of information (non-horizontal orientation of the detection axes) is thus available to be exploited by applications that require it.
Basically, the interrupt-generator module 18 compares the modules of the inertial signals AX, AY, AZ with respective thresholds THX, THY, THZ and determines that a detection axis X, Y, Z of the inertial sensor 15 is substantially horizontal if the corresponding inertial signal AX, AY, AZ remains below the respective threshold THX, THY, THZ for a time interval T. When one of the detection axes is approximately horizontal and the electronic apparatus 1 is at rest, in fact, the component due to the acceleration of gravity along that detection axis is negligible, in so far as it is approximately perpendicular. In one operating mode, as already mentioned, the interrupt signal INT is generated when the electronic apparatus 1 is brought from one to another of the first, second, and third operating positions. Assume, for example, that the electronic apparatus 1 is initially in the first operating position (“landscape”), in which the detection axis X is substantially horizontal (as likewise the detection axis Z). The electronic apparatus 1 is then rotated so as to be brought into the second operating position (“portrait”) with the detection axis Y substantially horizontal (for example, the electronic apparatus 1 is turned about the detection axis Z, which remains horizontal). During displacement, the interrupt-generator module 18 detects that the inertial signal AX increases until it exceeds the threshold THX, since the effect of the acceleration of gravity along the detection axis X increases. Instead, the inertial signal AY decreases and goes below the respective threshold THY. If the second operating position is kept stable during the time interval T, the interrupt-generator module 18 sends the interrupt signal INT to the control unit 3 and loads a new orientation string SOR into the I/O register 20.
In response to the interrupt signal INT, the control unit 3 of the electronic apparatus 1 (
As has been mentioned previously, the interrupt-generator module 18 is configurable through the configuration string SCFG so as to work in different operating modes.
In one (biaxial) operating mode, only the inertial signals AX, AY for two of the detection axes (for example X, Y) are used, while the third detection axis (for example Z) is disabled in order to reduce the power consumption, or, alternatively, it is used for different functions.
In a different (triaxial) operating mode, all the inertial signals AX, AY, AZ are processed, and the first, second, and third operating positions are identified when pairs of inertial signals AX, AY, AZ are simultaneously lower than the respective thresholds THX, THY, THZ.
According to one embodiment, represented in
In addition, each of the comparators 22 receives at an input a respective inertial signal AX, AY, AZ and the corresponding threshold THX, THY, THZ. The thresholds THX, THY, THZ are supplied by programmable threshold-generator modules 26.
The outputs of the comparators 22 are connected to start/stop inputs 23a of respective counter modules 23. In particular, the counter modules 23 are controlled so as to be activated selectively when the respective inertial signal AX, AY, AZ is below (in magnitude) the corresponding threshold THX, THY, THZ and so as to be reset otherwise. The counter modules 23 are configured so as to switch the respective outputs when a count value, incremented according to a timing signal not shown, reaches or exceeds a respective count threshold CX, CY, CZ, which, in one embodiment, is programmable by the control unit 3 and the control module 17. The counter modules 23 can have different count thresholds CX, CY, CZ. In this way, the detection of the orientation can be carried out in differentiated time intervals for the detection axes X, Y, Z.
The outputs of the counter modules 23 are connected to respective inputs of the logic module 25, for supplying detection signals SDX, SDY, SDZ, which indicate the orientation of respective detection axes X, Y, Z with respect to the horizontal. The detection signals SDX, SDY, SDZ switch (independently of one another) from a first logic value (for example, “0”) to a second logic value (for example, “1”) when the corresponding inertial signals AX, AY, AZ become lower than the respective thresholds THX, THY, THZ and remain in this condition for quite a long time for the corresponding counter modules 23 to reach the respective count thresholds. In practice, then, the detection signals SDX, SDY, SDZ assume the second logic value (“1”) when the corresponding detection axes X, Y, Z remain substantially horizontal, and the first logic value (“0”) otherwise.
The logic module 25 generates the interrupt signal INT starting from the transitions of state of the detection signals SDX, SDY, SDZ, using tables.
In particular, in one (biaxial) operating mode, the table of
In one embodiment, shown in
The orientation detecting device 10 described enables reduction to a minimum computational burden on the control unit 3 of the electronic apparatus 1 in which it is incorporated. In fact, the control unit 3 is completely relieved of the operations related to reading the inertial sensor 15 and to processing the inertial or acceleration signals. These operations are, in fact, carried out autonomously and in parallel by the control module 17 and by the interrupt-generator module 18. The control unit 3 is involved only in responding to the interrupt signal INT when the orientation of the electronic apparatus 1 is modified significantly. Also in this case, however, the control unit 3 simply has to fetch the orientation string SOR from the I/O register 20 and accordingly update the sequence of instructions being executed.
The orientation detecting device 10 is moreover flexible. In addition to the possibility of programming the thresholds and the time intervals for recognition of the orientation, the logic module can be reconfigured for executing different functions. In this way, the same physical resources can be shared, for example, by time division, with consequent saving of space and components.
Also other resources necessary for detection of the orientation can be shared for executing further functions. For example, in apparatuses incorporating a photographic camera or a camcorder, the inertial sensor can be used for image stabilization.
It is advantageous also to carry out recognition of the position using as reference a horizontal direction. The sensitivity of the inertial sensor according to a detection axis is in fact greater as the detection axis approaches the horizontal. The inertial sensor can then be exploited to the utmost with regard to both precision and speed of response.
Finally, it is clear that modifications and variations may be made to the device and method described herein, without thereby departing from the scope of the present disclosure.
In particular, the device for detecting orientation can be used in any electronic apparatus in which the execution of the operations can be affected or controlled by means of the position or the change of position of the electronic apparatus itself. Hence, also the functions that exploit the detection of the position can be other than shooting and display of images. For example, in a palmtop computer or in a cell phone, the orientation can be exploited for controlling scrolling functions or functions of navigation in menus, for activating functions, for controlling games, and so forth.
Consequently, it is also evident that the operating position of the electronic apparatus can be determined according to criteria different from the ones schematically illustrated in
The various embodiments described above can be combined to provide further embodiments. These and other changes can be made to the embodiments in light of the above-detailed description. In general, in the following claims, the terms used should not be construed to limit the claims to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which such claims are entitled. Accordingly, the claims are not limited by the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
TO2008A000865 | Nov 2008 | IT | national |