MMA8453Q - get readings at time of transient shock?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MMA8453Q - get readings at time of transient shock?

Jump to solution
1,387 Views
r_sama
Contributor II


Hi everyone,

I have a couple of questions surrounding this particular chip. I've read through all the documents I could find in relation to this already (AN 4071, 4076, data sheet etc. as well as the additional sample code). Excuse any misunderstood concepts, I'm new to this, but finding it fun and exciting.

Use Case:

  • I want to set the sensor to pick up transient events, i.e. if it has been dropped, thrown etc.
  • I also want to pick up the readings that TRIGGERED the event.
  • I don't mind if it's set to 2/4/8g mode, but I think 4g would be enough for resolution - (realistically, would this even matter as any force above 1-1.5g is quite a big jolt already.)
  • I've set the Latch bit as 1 which I believe should keep the reading (whichever reading that may be...) until it is read.

Questions:

  1. With this chip, is the above possible in the first instance?
  2. I'm reading about FIFO data only being available on the mma8451/0Q.
  3. This chip also doesn't allow a read out of the HPF data.
  4. In my implementations, an interrupt event is triggered fairly consistently, but when I try to take a reading from it, the values being returned are so erratic that they're useless. Can only assume this is taking some readings either side of the transient event.
  5. I don't think the Latch data is what I want in this case...
  6. If it's not possible to implement this through the above logic, how else could I achieve the above result, without getting another chip?

Thanks in advance!

Labels (1)
1 Solution
836 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Rick,

1. No. Although the MMA8453Q has a built-in high-pass filter for transient detection, it  does not have the capability to read out data from the high-pass filter.

Also note that the threshold resolution for the transient detection function is 0.0625g/LSB regardless of the selected dynamic range. So if you write 0x01 in the TRANSIENT_THS register (0x1F), the threshold value will be 62.5mg, if you write 0x01, the threshold value will be 125mg etc.

2. Yes. The built-in FIFO buffer is available on the MMA8450/1Q, MMA8652FC and FXLS8471Q only.

3. Yes.

4. As mentioned before in #1 and #3, the MMA8453Q does not allow to read out the high-pass filtered data. The output data you are reading couple both static (gravity) and dynamic accelerations.

6. If you want to pick up the reading that triggered the event, the only way is using another accelerometer (MMA8450/1/2Q, MMA8652FC, FXLS8471Q). 

Let me know if you have any other questions.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

View solution in original post

4 Replies
837 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Rick,

1. No. Although the MMA8453Q has a built-in high-pass filter for transient detection, it  does not have the capability to read out data from the high-pass filter.

Also note that the threshold resolution for the transient detection function is 0.0625g/LSB regardless of the selected dynamic range. So if you write 0x01 in the TRANSIENT_THS register (0x1F), the threshold value will be 62.5mg, if you write 0x01, the threshold value will be 125mg etc.

2. Yes. The built-in FIFO buffer is available on the MMA8450/1Q, MMA8652FC and FXLS8471Q only.

3. Yes.

4. As mentioned before in #1 and #3, the MMA8453Q does not allow to read out the high-pass filtered data. The output data you are reading couple both static (gravity) and dynamic accelerations.

6. If you want to pick up the reading that triggered the event, the only way is using another accelerometer (MMA8450/1/2Q, MMA8652FC, FXLS8471Q). 

Let me know if you have any other questions.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

836 Views
r_sama
Contributor II

Hi Tomas, thank you very much for your detailed reply. This has certainly cleared up all of my questions (and provokes some additional ones.)

If I may, could I break away from the topic itself and ask something else?

I'm a developer that comes from an oop background. I understand the logic generally know what I'm doing. However, I'm using a limiting ide, and I have no idea how to test this except to keep programming it with new code and triggering the event I'm testing for.

I see there are some cool looking debugging tools and test apps around this site... Are there any resources you could recommend in terms of software choices,  and de facto tools? I see one that shows inputs and logic and values for example, in a slick interface. I think it was a debugging tool, but can't figure out what it's called or how to use it.

I also play with arduinos... So I'm more familiar with c++ than c. Is there a way to develop embedded systems such as this with c++? (basically... What I'm asking for are some resources and reading that I can dig into).

Thanks!

0 Kudos
836 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Rick,

If you are familiar with Arduino, probably the easiest way to start to play with it is using any Arduino board together with any MMA845x/MMA865xFC breakout boards. There are plenty of tutorials including the example code. For debugging, a high-speed logic analyzer or an oscilloscope are the right tools, for example the Logic 4 from Saleae.

Highly popular are our inexpensive Freedom development boards supported by standard development tools such as KDS, CW for MCUs, IAR, Keil… The programming and debugging is done through the OpenSDA interface, so you do not need another stand-alone programmer. We have published several tutorials/code examples for the KL25Z/K64F boards and most of our accelerometers that you can use as a reference.

I hope it helps.

Regards,

Tomas

836 Views
r_sama
Contributor II

Thanks for the help Tomas, that was very informative - I think I'm going to grab some Arduino parts and have a play around with those. Sounds like the ideal platform to do some experiments with.

Cheers,

Rich

0 Kudos