Fall Detection and Step Count using FRDM-KL25Z

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

Fall Detection and Step Count using FRDM-KL25Z

1,575 Views
meghanarao
Contributor I

Okay so I'm working on the Freescale FRDM-KL25Z development platform and I'm unable to get any sample codes on the following: 

- how to blink an LED when it falls (fall detection basically),

- how to count the steps a person takes, with it on the human body.

Can someone please help me out with this? Its really urgent... 

Thanks

Labels (1)
0 Kudos
Reply
1 Reply

1,230 Views
shubhadippaul-b
NXP Employee
NXP Employee

Hi Meghana,

FRDM-KL25Z is a Microcontroller Board which has a MMA8451 Accelerometer onboard.

  • In order to capture an event like free fall, you will have to program the Accelerometer over I2C by writing configuration to its registers to detect free fall and generate an interrupt which will notify the MCU of the event. Subsequently, the MCU can turn on an onboard LED for indication. Follow the steps below to build your example.
  • Now, for detecting steps, you would need a pedometer algorithm which can read accelerometer data and compute steps. You may use the example indicated below for steps detection.

Visit https://mcuxpresso.nxp.com/ --> Select Board --> Boards --> Kinetis --> FRDM-KL25Z --> Build MCUXpresso SDK --> Add Software Component ISSDK and then Build and download the SDK Archive.

  • For Free-Fall detection, use the example boards\frdmkl25z\issdk_examples\sensors\mma8451q\mma845x_interrupt as your starting point and follow application note AN4070.pdf to create a free fall detection example.
  • For the Pedometer, the example boards\frdmkl25z\issdk_examples\algorithms\pedometer\pedometer_mma8451 should serve your purpose.
0 Kudos
Reply