The cornerstone of smart mobile devices-from iPhone 4 Sensors

Source: Internet
Author: User
Without a doubt, today's smart phones have become the focus of attention. As the most powerful mobile computing player, I really cannot think of the reason why they will not wind the whole world in the future. It is compact, portable, and powerful. It can be used as a camera, camera, game, or virtual reality application. Of course, the most important thing is to install B. It can identify your control expectations through different actions and provide real-time feedback based on your usage. It will be a pioneer in the smart digital world in the future and a tool for single youth. However, when you play labyrin2's maze ball while you are bored, when you take out your cell phone and find a bar on Google map while chasing girls, when you hold an iPad on the plane, you can still attract the flight attendant to watch out. Have you ever thought about how to bring this trendy, intelligent, and versatile aura to your mobile phone?

 

Yes. Look at the picture on the left. First, let me explain that I was going to release the iPhone 4 yuzhao, but every time I saw it, I couldn't help but think of the teachings of the instructors who gave us the mobile phone posture. So I will use an iPhone 3. As a representative of the hero of beautiful women, the iPhone launched by the Fruit Company is the guide to the Design Trend of mobile phones. It is also a pioneer in the design spirit. From the light intensity sensor, proximity sensor, acceleration sensor, to the electronic compass, and then to the recently released gyroscope, of course, there are also sensors that are common at ordinary times, such as GPS, image sensors, and so on. There are many different types of data, which are confusing. However, for many ordinary mobile phone users, it may be a matter of getting charming. Ask yourself, when you are planning to select a mobile phone, you may be confused about the wide array of iPhone, Android, and Nokia mobile phones, and you are ready to carefully compare spec, do you really know what these sensors bring to you? If not, you are a potential reader of this article.

Well, before you become a potential reader, you may be skeptical about the significance of the sensor. For example, you may think it is too trivial. Isn't that just about playing games. In fact, to put it bluntly, this is actually the most attractive part of the present. But now we want to introduce this thing, we have to give it some big hats, right? We have to make contributions to human progress and social elegance before we can get to the ground. You said that ccav should be used by Jiangsu Satellite TV and a "social influence. If you want to directly raise the flag that shows the essence of "Winning the audience rating", no one cares about you. Therefore, here is a brief summary of the academic high hats for mobile phones and sensors: This combination can be used to build the largest sensor network. The application based on this network can focus on reducing pollution and preventing disease, efficient use of energy, maximizing personal social networks, maintaining social harmony and stability, and giving everyone a fortune.

Of course, it's good for everyone to look at these high hats. It's complicated to understand and implement each of them, even if they are all right, if you don't want me to be lucky, right. In general, there are more and more applications based on smartphones and sensors. For example, the following projects:

-Diabetes meter mates for PC/phone to track trends;

-Fitbit;

-The icarte-a rfid Sensor for iPhone;

-L5 remote, iPhone remote control;

There are also some interesting system prototypes:

-IPhone + Arduino + heartrate monitor = humanapi;

-Radar from Nokia in your pocket;

Nokia also proposed a relatively high-end concept for this:

-Nokia eco sensor concept;

Basically, the concept of sensors has gradually begun to penetrate into the entertainment, commerce, and healthcare sectors. It is certain that the main profit in this market will not flow into the pockets of manufacturers, but will flow into the pockets of service providers. You, me, him, and every mobile developer may become this service provider.

Well, it's no longer left empty. Let's start with the theme. Next we will briefly introduce some sensors that most mainstream mobile phones are equipped with, hoping to give readers some basic concepts, we do not know the basic principles when enjoying various SMART services. The following table is a summative table that includes representative sensors except for light intensity sensors that are too simple. Now let's introduce them one by one.

  Accelerometer Electronic Compass Gyroscope Proximity sensor
Function The human body motion is determined by measuring the acceleration of the three axes. Determine orientation by measuring the intensity and direction of the geomagnetic field around the device Determine orientation by measuring the rotation rate of the three axes Determine the existence of a nearby object without physical contact
Main limitations High Gravity interference and large instantaneous Error The error is large and is easily influenced by other magnetic fields and metal objects. Used to calibrate other devices Error Accumulation, poor accuracy of reading for a long time Not common. Most materials are only applicable
Application Activity Measurement Navigation Navigation Smart power saving

1. Proximity sensor

A proximity sensor, as its name implies, is used to detect very close target objects. This type of sensor is usually determined by changing the electromagnetic field or electrostatic field, or measuring the change of the reflected wave of the emitted electromagnetic wave. Because the methods are different, the types of objects close to the sensor are different. Some are for metal objects and some are for plastic objects. Specifically, mobile phones are now using a new generation of reflective optical proximity sensors, which can be used to detect a variety of surface types. The process is very simple. They will emit infrared light that is invisible to the human eye. Once the phone calls, you will certainly answer the answer, which will cause the face to be very close to the sensor, in this way, you only need to use an optical detector to detect the change in the total amount of light reflected from the skin, and the proximity is detected by the sensor. What is the purpose of this sensing result? An obvious example is to improve the power-saving function of the mobile phone, such as determining when to automatically turn on or off the display, keyboard backlight or touch, or even when to automatically turn off/standby, it depends on whether the device owner is talking, typing, or directly throwing the device into his pocket. These tasks are handled by close sensors.

2. Acceleration Sensor

I personally estimate that acceleration sensors are the most familiar to everyone. Thanks to its more intuitive gaming experience, Basic Gesture Recognition, and Environmental Perception functions, these sensors have been booming since thanks to the iPhone and iPod drive, thanks to Wii integration, large-scale deployment has led to a decline in prices. If any other mobile phone or music player is not equipped with this sensor, I am sorry to say hello to other devices that are placed together when I leave the factory. The working principle of the accelerometer is very simple. Now the mobile phone is basically equipped with a 3-dimensional line sensor, that is, to measure the acceleration force on the three axes X, Y, and Z. The acceleration force is the force that an object acts on during the acceleration process. It is like the gravity of the Earth, that is, gravity. Use a simple legend:

Why should I say that everyone should be familiar with the acceleration sensor? If I am a friend of IBM laptop, I know that the former IBM, Now Lenovo, and ThinkPad series notebooks have always had hard drive protection functions, this function uses the acceleration sensor to dynamically monitor the notebook vibration, and choose to close the hard disk or continue running based on the vibration. In this way, the vibration, such as the bumpy working environment, or the hard disk damage caused by accidentally dropping the computer, can be protected to the greatest extent possible. Similar widely used is the use of acceleration sensors in digital cameras and cameras to detect the hand vibration during shooting, automatically adjusts the focus of the camera. Now, we have mobile phones like iphone, Android legion, and Nokia N900. At least we all know that acceleration sensors can help you play games. A typical example is labyrin22. the Chinese name is "maze ball. However, in a broader sense, accelerometer is more useful in detecting people's real-time background information. For example, through the analysis and processing of the value of acceleration changes on the three axes, the mobile phone can know whether you are walking, riding, or riding, or uphill or downhill, and so on.

Theoretically, we can infer the acceleration direction information with the acceleration information of three axes. For example, if you want to accelerate your bicycle, or the elevator you are taking is facing up or down. Based on junior high school mathematics knowledge, these directions and angles can be calculated through the addition and subtraction of vectors. Unfortunately, we can't just rely on the acceleration sensor to detect the acceleration direction, nor can we know the orientation of the mobile phone itself. Why? To explain this, it involves a major problem that troubles the accelerometer, that is, the interference of the gravity acceleration component.

When your mobile device is at rest, the accelerometer can tell you its orientation relative to the ground plane. However, when the device moves, the analysis orientation is quite complex. In this case, there are four types of discussions.

  1. The device is in a horizontal completely static or uniform motion. At this time, it will output a value on the vertical axis, that is, the acceleration of gravity, close to 9.8.
  2. When the device falls into the body freely, all three axes will output 0.
  3. When the device is still or at a constant speed, but not at an absolute level. At this time, any axis may have an output value, but it is a component of gravity acceleration. Once in this state, we can determine the Rotation Angle of the mobile phone by measuring the angle of the three axes.
  4. The device is accelerated in any direction. At this point, the problem becomes complicated, because you cannot know the current direction and angle of the device, so you do not know how the gravity acceleration component is decomposed, so ...... You do not know the values reported by an axis, which are the gravity acceleration and the true linear acceleration.

In addition, what another accelerator can do is pure horizontal rotation or constant horizontal conversion. For details, see:

In this kind of motion, the accelerometer outputs only one value: G. Because X, Y, and Z axes do not actually accelerate motion. What problems will this bring? For example, if you walk along a street with a mobile phone, the acceleration of this road is naturally available. Then you turn and walk on another road. The acceleration of this section can also be captured. When you get home, you get out of your cell phone and read the data. Yes, there are acceleration on both ends. The mobile phone knows that I have gone two steps. It's intelligent. What is missing? The movements and angles of your turns! This accelerometer is not available, and this information is very useful in many intelligent applications of augmented reality.

To solve this problem, people began to introduce other types of sensors, such as the gyroscope to be introduced next.

3. Gyroscope

Gyroscope represents another important field of sensors, but it may take a year or two to take off, mainly because the navigation-level MEMS gyroscope is still too expensive for mobile phones, general gyroscope manufacturers are rarely eye-catching. Of course, driven by the iPhone 4, the foreseeable mobile phone arms competition will sooner or later make the gyroscope more popular. The main function of gyroscope is to measure the rotation rate along a specific coordinate axis based on the theory of conservation of angular momentum. During use, the rotor of the gyroscope always points to a fixed direction during high-speed rotation. When the movement direction of the moving object deviates from the predefined direction, the gyroscope can feel it. In modern aviation equipment, when a plane is driving, it uses more than a dozen gyroscope to measure whether the body is rolling and how it is rolling.

The following three figures show the flight dynamics on the Wiki, indicating the three angle changes on the plane: pitch, roll, and yaw. These three changes are the Measurement targets of the gyroscope. Similarly, when people move around with mobile devices, mobile devices will also change in the direction of these three angles, and monitor this change, and output this change in the form of angle change rate, is the task of three-dimensional gyroscope in mobile devices. Note that the three angles here are completely different from the three dimensions of the accelerometer X, Y, and Z. Do not confuse them. For specific differences, see here.

 

Gyroscope measurements are accumulated over time. To know the current angle, you only need to integrate all the previous output values. Of course, the gyroscope only outputs the change value of the current rotation. For example, if an airplane is flying at a 60-degree tilt angle, the output of the gyroscope is 0 because no body is rotated at present. However, you can use the previous output to calculate the current tilt angle of the body. Gyroscope has two advantages:

  1. The frequency of measurement is relatively high. Low can be as low as DC signal, that is, 0Hz, and high can be as high as 60-70Hz. This range is basically determined by the frequency of universal human movements, and a large margin is taken into account. The general gyroscope filters the collected signal, and the final data displayed is basically in the range of 0 to 20Hz. Of course, not all gyroscope can measure the frequency range, which depends on the specific grade.
  2. The location in the device is not important. The angular velocity measured by the gyroscope is essentially an inertial angular velocity. Therefore, if you put it at the front end or back end of the device, the output value will be the same and there is no difference.

Let's talk about the advantages of gyroscope. When a smart reader sees the concept of gyroscope computing, he must be able to find the gyroscope's defects at a Glance: the error of this stuff is cumulative! That is to say, you have introduced Angle Errors for whatever reason at a certain time point, which may be static drift errors, reading errors, and whatever. This error will always follow you, continue reading and computing! What's more interesting is that gyroscope has a notorious feature: it will drift over time! In other words, every minute/second, it will automatically introduce additional errors !! After a long period of time, your measurement on the degree of rotation will become the relevant Chinese departments: credibility is 0. Of course, technology is developing. Now many high-end gyroscope devices have very low random errors, so common applications can skip this error. Of course, this kind of high-end gyroscope is usually very expensive and rarely used in mobile phone systems.

This is fun. In a short scale, the Acceleration Noise is extremely high, and there is also the influence of gravity. In a long scale, the overall acceleration value is reliable and there is no error accumulation. In a short scale, the gyroscope is very accurate, because the cumulative error speed is still very slow. However, during a long period of time, the gyroscope was inaccurate. In some cases, an accelerometer can be used to calibrate a gyroscope. For example, when the device is completely static, it can be used in gravity-related directions. So when will it not work? Let's look back at the three figures we just put.

The variation direction of the yaw angle is perpendicular to the gravity direction! Therefore, through the introduction of acceleration just now, we know that on this plane perpendicular to the gravity, the acceleration sensor cannot help the gyroscope.

Essentially, through the cooperation of three-dimensional acceleration sensors and three-dimensional gyroscope, We are equivalent to having a six-dimensional sensor, but the ubiquitous error will occasionally make this six-dimensional sensor feel helpless. At this time, we need another device to help us with further correction. This is the electronic compass to be introduced below.

4. Electronic Compass

An electronic compass, also known as a magnetic meter or an electronic compass, is a sensor that has been blown out since following the accelerometer. If I remember correctly, the first mainstream smartphone that integrated the sensor was Google's G1. In this sense, G1 played a leading role in the magnetic sensor market, it may be similar to what the iPhone means for an accelerometer. What's the use of this stuff? As the name suggests, it is to tell you the north and south directions. In the past, the ancient compass, or flat compass, can tell you where the North Pole is after you flat it, now you know the angle of your current head on the big plane axis of the Earth. Of course, out of technical restrictions, the flat compass requires you to maintain the level, if there is a tilt is not accurate. Many of the later electronic compass were two axes. That is to say, they were equivalent to the electronic flat compass. In my memory, the openmoko mobile phone was integrated a few years ago, so there are the same restrictions. Currently, high-end smart phones are integrated with three-dimensional electronic compass. As a result, a tilt sensor can be added to compensate the compass, which overcomes this defect, it can output angle information in the three-dimensional direction.

The principle of the electronic compass is also very simple, that is, the Hall effect that we have learned in physics. When the current passes through a conductor in the magnetic field, the magnetic field will generate a transverse Lorenz force on the electrons in the conductor, and the charge will lead to deflection. The direction of deflection is perpendicular to the current direction and the magnetic field direction, in addition, the direction of positive and negative charge deflection is opposite, resulting in voltage difference at both ends of the conductor. This voltage difference is also called Hall voltage, which is proportional to two factors: current size and magnetic intensity. Of course, there is a problem to pay attention to here. If the direction of the magnetic field is not perpendicular to the conductor, the actual magnetic field is actually a vector component of the original magnetic field. How can we know the angle of the magnetic field component? We can use two or more Hall-effect sensors to perpendicular to each other. In this way, the magnetic field can be determined by the proportional value of Hall voltage on different sensors, in this calculation process, you only need to know the basic linear algebra operation. Of course, there must be some tricky points in the specific calculation, but it is not the key point, so we will not introduce it here. So what's different from gyroscope is that the electronic compass outputs the angular value, while the gyroscope outputs the acceleration of the angular direction.

Therefore, we should all understand that in the application of electronic compass, the above magnetic field is the Earth's magnetic field. The electronic compass measures the Vector Value of the Earth's magnetic field, and then converts it to the system coordinate. Ideally, the measured direction value is more accurate. Once I know the direction value at the beginning of the mobile device, I can pass the output of the Electronic Compass, find the device's next series of changes.

Unfortunately, the ideal situation in this world does not exist. In our environments where mobile devices are often used, sometimes there will be uneffectively shielded magnetic fields other than the Earth, which may greatly interfere with the reading of Electronic Compass, and make the results untrusted. Moreover, if a mobile device is surrounded by metal, the electronic compass will be greatly affected once the metal is magnetized. For example, in the following figure, the Nexus One is flat on the desktop and rotated in a circle. The obtained value is mapped to the coordinate system.

However, when we put a pair of scissors on Nexus One, the value is changed

Obviously, due to the influence of scissors, all values are clustered into two categories.

It is very interesting that someone has made a Android-based metal monitor based on this feature. For details, see here. The basic principle is that the above metal affects the magnetic field.

Back to the point, we have explained from the above that, in practical applications, electronic compass are vulnerable to interference, second, if you are disturbed, it is hard to understand why it will be disturbed. In addition, some defects inherent in the Civil Electronic Luo pan, such as low signal-to-noise ratio and low dynamic range, are added. So, in many practical applications, the electronic compass is used for correction. In other words, people do not directly use its value, however, you can refer to this value to correct the angle calculated by the gyroscope or accelerometer. Because in any case, the error of the electronic compass will not increase over time or be disturbed by gravity.

5. Comprehensive Application

After reading the above introduction, I believe everyone has a number in mind. These three things have their own advantages and disadvantages. They often have to work with each other to achieve the expected results and accurately detect the actions of the device owner. This collaboration process is complex, but generally involves two phases: Multi-sensor information fusion and filtering. You know, the sensor of the advanced level has thousands of US dollars. Naturally, mobile devices will not use very high-end sensors, it also means that there will be a lot of noise in the numbers you get from mobile devices.

Generally, app developers do not have a lot of background knowledge in terms of control theory. Therefore, in terms of filtering, a simple fixed gain filtering method can be used. If you can determine that the noise signal can be modeled as a random process, you can also use the Karman filter. It should be noted that not all noise can be modeled as a random process, and the gyroscope is normally consistent, but the acceleration sensor is usually not: A lot of noise is caused by human body jitter, this jitter cannot be modeled as a random process.

The following figure shows a typical use of the three sensors in academia.

Speaking of this, the most important sensors widely integrated by mobile phones are all described. We hope to provide common users with some universal knowledge and some reference for app developers. Use more sensors to make your apps smarter and make more profits. Remember, in the mobile computing era, the profit sharing master has changed from a producer to a service provider.

Reference URL:

1 http://www.motusbioengineering.com/index.htm
2 http://droidsensors.com/2010/02/sensors-for-mobile-phones-more-data-more-services-more-profit/
3 http://mylifewithandroid.blogspot.com/2010/03/sensors.html

 

This article from http://www.kunli.info/2010/07/07/mobile-device-sensor/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.