1. Field of the Invention
The present invention relates to a method and related device for controlling operation of a portable electronic device, and more particularly, to a method and related device for determining whether a lid of a portable electronic device is open using a gravitational acceleration sensor and correspondingly determining the operation of the portable electronic device.
2. Description of the Prior Art
A laptop (i.e., a notebook computer) has several advantages, such as a small-sized volume, lightweight, and convenient for carrying due to its portability. These properties allow a user to work in any location. A small, thin, and light notebook computer provides the user with powerful computation abilities and document or multimedia processing functions anywhere and anytime, and thereby the work location of the user is not limited.
Please refer to FIG. 1. FIG. 1 is a schematic diagram of a notebook computer system 10 according to the prior art. Generally speaking, the notebook computer system 10 is composed of a lid 100 and a base 102. A hinge 104 connects the lid 100 and the base 102. The lid 100 comprises a screen, a camera, etc. The base 102 comprises a keyboard, a touchpad, a power switch, a host, an expanding interface, and so on. When using the notebook computer system 10, the user has to turn on the power of the host and adjusts a display angle of the screen of the lid 100 to a specific angle. In order to save power, a switch installed in the notebook computer system 10 can switch ON/OFF states of the screen and operation of the host according to an opening angle of the lid 100. For example, when the user doesn't need to use the notebook computer system 10 after turning on the notebook computer system 10, the user can close the lid 100 to make an angle, between the lid 100 and the base 102, smaller than a specific value, so that the notebook computer system 10 turns off the screen and operates in a sleep mode.
Adjusting the angle between the lid 100 and the base 102, the user can save power and timely switch the operation of the notebook computer system 10. Therefore, it is considerably important to precisely detect the angle between the lid 100 and the base 102. In the prior art, there are many ways to detect the opening angle of the lid 100 and one of these is using a mechanic switch connected to the hinge 104. That is, turning off the screen and executing related operations, e.g. operating in the sleep mode when a rotating angle of the hinge 104 is smaller than a specific angle. However, the assembly of the mechanic switch is difficult and the mechanic switch may weary or malfunction by time, and finally, the reliability of the mechanic switch is decreased.
In addition, a magnetic sensor, such as a Hall sensor or a magnetic reluctance sensor, is used in the prior art. The notebook computer system 10 receives a distance from the lid 100 to the base 102 for determining the angle between the lid 100 and the base 102. For example, the Hall sensor can sense magnetic pole and magnetic force. Therefore, by installing a magnet in the lid 100 and a Hall sensor in the base 102, the notebook computer system 10 can determine the distance between the lid 100 and the base 102 so as to determine the angle between the lid 100 and the base 102. However, it is necessary to take the sensibility of the Hall sensor and magnetic flux of the magnet into account to meet demands when installing the magnet and the sensor. Besides, the magnetic reluctance sensor is difficult to design because of its high sensibility and narrow linear range.