[FXOS8700] Transient Detection troubles

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[FXOS8700] Transient Detection troubles

878件の閲覧回数
Ruig25
Contributor I

Hello!

I know, that the sensor is a little bit old, but nevertheless.

I have one application case and I still cannot solve a problem with transient detection. Of course I have read all App. Notes.

 

Use case description:

  • Sensor board attached to the wrist so that x-axis is along the arm (if we stretch index finger - the x-axis and the finger are +/- parallel).
  • The arm is on the rest (Xg =~ -250mg). It is initial position.
  • Now the stretched arm will be rosen slightly above the head (Xg =~ 300-350mg).
    X and Z axes are ignored (out of interest).
  • I want to have an interrupt after hand was rosen as described above.


Here is described motion (ODR=100Hz)

2023-05-28 22_15_16-Window.png

 

My first idea was to use vector-magnitude detection. But I did't tried it because I don't have constant Gref (initial position may have some variiations...).

The second idea - motion or transient detection.


Code (abstract):

  1. software rest + 1ms wait
  2. Standby CTRL_REG1=0x0
  3. Fullscale 2g XYZ_DATA_CFG=0x0
  4. Clr debounce counter and set ths to 5 (5x63mg=315mg) TRANSIENT_THS=0b10000101
  5. TRANSIENT_COUNT=6
  6. X only + evt latching TRANSIENT_CFG=0b00010010
  7. Enable transient interrupt CTRL_REG4=0b0010000
  8. Route transient interrupt to int1 CTRL_REG5=0b00100000
  9. Active mode, ODR 12,5Hz, Low Noise CTRL_REG1=0b00101101

Interrupt event triggered non-stop. I tried many different values for 4) and 5).

uC input IO configured for neg. edge with enabled pull-up.

I tried to move 6) after 3) like here. No interrupt triggered at all.

I tested circuit enabling FIFO watermark interrupt. Works without problems.

 

Any ideas?

Or motion detection is more suitable in my case?

 

Many thanks in advance

タグ(1)
0 件の賞賛
返信
2 返答(返信)

822件の閲覧回数
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Igor, 

for your case, I think the best would be the "Acceleration vector-magnitude detection". Please refer to the section 12.10 in the FXOS8700CQ datasheet and to the AN4692.

JozefKozon_0-1685354985792.png

With Best Regards,

Jozef

 

0 件の賞賛
返信

825件の閲覧回数
Ruig25
Contributor I

After 10h of investigation:

It seems that threshold set in TRANSIENT_THS is ignored. Therefore interrupt fired non-stop (fallback threshold 0mg?).

But after enabling a_ffmt_trans_ths_en=1 in A_FFMT_THS_Y_MSB the system started to work correctly.

Axis of interest is X.
And I didn't expect to use invidual thresholds per axis. But it works now.