Orientation Detection in accelerometer

In summary, the conversation discusses the use of an accelerometer to detect orientation changes, specifically using the BMA250e module. The speaker is having trouble getting the status of the orient_bit in the register, which should change from '0' to '1' when there is a change in orientation and then back to '0' after a certain delay. The speaker also mentions not seeing any change in the values of register 0C, which is supposed to reflect the current orientation. The expert suggests checking the interrupt settings and ensuring the axis is not disabled. They also mention the need to thoroughly understand the specifications and purpose of each register in order to use the chip effectively.
  • #1
Ravindra Kant
4
0
Hello,
I am using accelerometer to detect orientation change.for an e.g.if mobile accelerometer senses the direction that
is it in portrait or landscape mode.so basically in this method the change of axis is detected .
I am using the BMA250e module as an acceleromter,which has an inbuilt feature that it detects the change in orientation and respectively generates the interrupt,In my code i have checked the status of bits which detects the change after changing the orientation the status remains the same.
I seriously want to know how to resolve the issue?
 
Engineering news on Phys.org
  • #2
Are you expected to detect the bits directly? Or is there an API available, where you just call a function and it returns a value?
 
  • #3
Sir,
I have an register available in the sensor chip which when read shows the status of orient_bit in the register.
If there is any change in orientation than orient_bit sets to '1' and after a certain delay it gets to '0' say, after 50 ms
First,I am unable to get the status it always remains zero.
Secondly,there are three types of orient modes low asymmetrical,high asymmetrical and symmetrical,what do these signify?
 
  • #4
It is difficult to determine your issue since there are so many things you could be doing incorrectly in the firmware.

Do you actually get the interrupt, or are you just polling for changes? Are you using latched, non-latched or temporary?
The interrupt condition could be going away while you check it if you use temporary or non latched.

Does the temperature sensor work? (just to check your data interface)

Have you activated the self check and verified its results?

Have you written a register and read it back to verify the write worked?

As for the symmetry modes, page 35 of the spec explains the angles for the different modes.

Basically, in order to use a chip of this complexity you need to have read the spec from beginning to end at least twice, and understand the purpose of every bit in every register.

I didn't look at the driver API to see how much they abstracted the control details. Are you using the drivers, or writing your own.
 
  • #5
Sir,
I am not using any drivers ,just writing my own,
since orientation interrupt gets cleared automatically after about 50 ms so there is no need it to be latched,but yes the register INT_STATUS0 (0x09).shows the status of orientation change.
Yes the temperature sensor is working fine.
I run the self test ,and checked the data on each axis if there is any motion in any axis i wold get any alarm.
So if there is any slow motion i would get the result that slow motion is detected,
that status can also be checked by reading the register INT_STATUS0.

the thing you said are general procedure that i tested,but if i want to check the orientation change ,how should i proceed according to you?
 
  • #6
I'm not entirely clear what your problem is. Is it "how do I do this with this module?, or "I am doing XYZ and getting the incorrect result".

I have never used the module, so I would have to mess with it to figure out exactly what to do.

You can read the orientation in register 09 since it always reflects the current orientation. Do you see that change when you change orientation?
 
  • #7
No,i do not see any change that is my question,why is there any problem of timing ?
 
  • #8
oops:
Register 0C (I mistakenly said 09) is supposed to always contain the orientation. If it has values and they change with orientation, then there is something wrong with your threshold or interrupt settings. Do you see 0C change with orientation. If so, the chip is working and you need to determine the interrupt settings.

If the values in 0C do not change, maybe you have the axis disabled (0x16)

Since the orientation interrupt is cleared after 1 stable period of the value in 0C, maybe you are missing it. I don't see how to set the period.
 

1. What is orientation detection in an accelerometer?

Orientation detection in an accelerometer is the ability of the accelerometer to determine the orientation or position of an object or device in 3D space. This is done by measuring the acceleration forces acting on the object in different directions.

2. How does an accelerometer detect orientation?

An accelerometer detects orientation by using a microelectromechanical system (MEMS) sensor to measure the acceleration forces acting on the device in different directions. These forces are then processed by the accelerometer's internal circuitry to determine the orientation of the device.

3. What are the applications of orientation detection in accelerometers?

Orientation detection in accelerometers has a wide range of applications, including mobile devices for screen rotation, gaming controllers, navigation systems, and virtual reality devices. It is also used in industrial applications for monitoring the orientation of machinery and equipment.

4. How accurate is orientation detection in accelerometers?

The accuracy of orientation detection in accelerometers depends on various factors such as the quality of the sensor, calibration, and external factors that may interfere with the measurements. Generally, modern accelerometers have a high level of accuracy, with some models capable of detecting changes in orientation as small as 0.1 degrees.

5. Can an accelerometer detect orientation in any direction?

Yes, an accelerometer can detect orientation in any direction as long as the device is equipped with a 3-axis accelerometer. This means that the accelerometer can measure acceleration forces in the X, Y, and Z directions, allowing it to detect orientation changes in all three dimensions.

Similar threads

Replies
7
Views
1K
  • Programming and Computer Science
Replies
0
Views
763
Replies
3
Views
1K
Replies
6
Views
3K
  • Electrical Engineering
Replies
9
Views
23K
  • Special and General Relativity
Replies
20
Views
2K
  • Electrical Engineering
Replies
1
Views
2K
  • Electrical Engineering
Replies
18
Views
1K
  • Electrical Engineering
Replies
8
Views
11K
Replies
14
Views
943
Back
Top