Orientation Detection in accelerometer

Click For Summary

Discussion Overview

The discussion revolves around the detection of orientation changes using the BMA250e accelerometer module. Participants explore issues related to reading orientation status, understanding interrupt behavior, and the implications of different orientation modes. The scope includes technical troubleshooting and firmware development.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant describes their attempt to use the BMA250e to detect orientation changes but reports that the status bits remain unchanged despite expected behavior.
  • Another participant inquires whether the user is directly detecting bits or using an API, suggesting that an API might simplify the process.
  • A participant mentions the existence of a register that indicates orientation status and notes that it should change with orientation, raising questions about the meaning of different orientation modes.
  • Concerns are raised about potential issues in the firmware, including whether interrupts are being properly handled and whether the self-check functionality has been verified.
  • One participant confirms they are not using drivers and are writing their own code, asserting that the temperature sensor works and that they have tested various functionalities of the chip.
  • Another participant suggests that if the orientation register does not change, it may indicate that the axis is disabled or that there are issues with threshold or interrupt settings.
  • There is a discussion about the timing of the orientation interrupt and whether it is being missed due to the nature of how the interrupt is cleared after a stable period.

Areas of Agreement / Disagreement

Participants express differing views on the source of the problem, with some focusing on firmware issues and others on hardware settings. There is no consensus on the specific cause of the orientation detection failure.

Contextual Notes

Participants mention various registers and settings, but there is uncertainty regarding the correct configuration and whether the appropriate registers are being accessed. The discussion includes references to specific register addresses and their expected behavior, which may depend on additional context not fully explored.

Ravindra Kant
Messages
4
Reaction score
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
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?
 
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?
 
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.
 
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?
 
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?
 
No,i do not see any change that is my question,why is there any problem of timing ?
 
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.
 

Similar threads

Replies
7
Views
3K
Replies
3
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 9 ·
Replies
9
Views
26K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
11K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
12K