Precision Acclerometer Calibration

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

Precision Acclerometer Calibration

Jump to solution
2,507 Views
kayathrim
Contributor I

Hi Michael,

 

We are trying to use the precision calibration feature in Sensor fusion  tool box 7.0. We are pressing the o flat, 1 2 ...11 button while keeping the sensors in different orientation w/o accelerating.

 

No values are getting populated in the tool box. Magnetic calibration is done. Can you please help?

 

Thanks,

Best Regards,

Kayathri

Labels (1)
0 Kudos
Reply
1 Solution
1,944 Views
michaelestanley
NXP Employee
NXP Employee

Kayathri,

You will always find links to the most recent sensor fusion libraries at nxp.com/sensorfusion.  Currently we have links to TWO versions: Version 5.00 and Version 7.00.   The latter is an option for KSDK builds for FRDM-K22F and FRDM-K64F.  The following blog posting  at http://blog.nxp.com/tech-in-depth/get-started-iot-sensing-software-development-kit discusses how to access those releases.  The posting at  http://blog.nxp.com/iot/get-started-nxp-sensor-fusion-for-kinetis-mcus-part-1 discusses the evolution from Version 5.00 to Version 7.00, and how to get started with Version 7.00.

You do not need SPI flash for any feature in the kit. 

The File->Flash feature from the GUI you downloaded is Version 6.00, which does have the precision accelerometer feature.  When you auto-detect, you should immediately see a board image on your screen that tracks motion of the board in your hand.  If that isn't present, you have communications issues.  If so, you probably haven't installed the proper OpenSDA serial port drivers.

FRDM-KL46Z is not supported (at least yet) with Version 7.00.  I can offer you a Version 6.00 project for either KDS or CodeWarrior.  The one downside is that Version 6.0 was not formally released, and I have no user guide for it.  It follows the same structure as Version 5.00, and is still based on Processor Expert and MQX.

Regards,

Mike

View solution in original post

0 Kudos
Reply
9 Replies
1,944 Views
michaelestanley
NXP Employee
NXP Employee

Kayathri,

Let me throw out some idea/questions and see what sticks:

  1. 1st, which base board/shield are you using?
  2. You are using the Version 7.00 library included in the KSDK?
  3. The GUI->About dialog has a build date of 3 Aug 2016?
  4. You used the Auto Detect feature on the main tab of the GUI to connect, and all other GUI features appear to work OK?
  5. You wait at least 4-5 seconds after pressing each orientation button before proceeding to the next?  (We take a lot of samples so as to reduce noise).
  6. Have you tried programming the your board using one of the canned demos available under File->Flash?

FYI, you don't have to do magnetic calibration in order to do the accelerometer calibration.  They can be done in any order before you save coefficients to flash.

Mike

0 Kudos
Reply
1,944 Views
kayathrim
Contributor I

Hi Mike,

Where I can download the KSDK Sensor fusion Version 7.00. Is it available in NXP website?

Regards,

Kayathri

0 Kudos
Reply
1,945 Views
michaelestanley
NXP Employee
NXP Employee

Kayathri,

You will always find links to the most recent sensor fusion libraries at nxp.com/sensorfusion.  Currently we have links to TWO versions: Version 5.00 and Version 7.00.   The latter is an option for KSDK builds for FRDM-K22F and FRDM-K64F.  The following blog posting  at http://blog.nxp.com/tech-in-depth/get-started-iot-sensing-software-development-kit discusses how to access those releases.  The posting at  http://blog.nxp.com/iot/get-started-nxp-sensor-fusion-for-kinetis-mcus-part-1 discusses the evolution from Version 5.00 to Version 7.00, and how to get started with Version 7.00.

You do not need SPI flash for any feature in the kit. 

The File->Flash feature from the GUI you downloaded is Version 6.00, which does have the precision accelerometer feature.  When you auto-detect, you should immediately see a board image on your screen that tracks motion of the board in your hand.  If that isn't present, you have communications issues.  If so, you probably haven't installed the proper OpenSDA serial port drivers.

FRDM-KL46Z is not supported (at least yet) with Version 7.00.  I can offer you a Version 6.00 project for either KDS or CodeWarrior.  The one downside is that Version 6.0 was not formally released, and I have no user guide for it.  It follows the same structure as Version 5.00, and is still based on Processor Expert and MQX.

Regards,

Mike

0 Kudos
Reply
1,944 Views
kayathrim
Contributor I

Hi Mike,

Thank you for your support.

Now we are using FRDMK64F board with SF7.0 & we are able to test all the toolbox features. We are already customized the sensor board with KL46 processor.  When will NXP release the V7.0 support for KL series or FRDMKL46Z.

Kindly suggest how to overcome the accuracy issues when we design our custom board. We are unable to get the same accuracy like freedom sensor board.

Regards,

Kayathri

0 Kudos
Reply
1,944 Views
michaelestanley
NXP Employee
NXP Employee

Kayathri,

I've previously posted a couple of blogs on sensor placement issues:

http://blog.nxp.com/sensors/accelerometer-placement-where-and-why

http://blog.nxp.com/sensors/magnetometer-placement-where-and-why

which you should review with respect to your layout.
Another thing to pay close attention to is the physical orientation of the sensors relative to one another on the PCB.  We need to insure (at least mathematically) that X, Y & Z axes of all sensors are aligned.  Alignment can be ensured in the Hardware Abstraction Layer (HAL) functions in the toolkit.  This is discussed at some length in the V7.00 User Manual.

I don't have a specific date for KL46Z support in KSDK.  Because the KL46Z is closely related to the KL25Z, you should be able to port the KL25Z example I posted a week or two back to KL46Z.  Drop it into the KL46Z KSDK instead of the KL25Z KSDK.  Dependencies you will need to address:

  • rename "frdmkl25z_virtual_shield" and all sub-files/folders to reflect "kl46z"
  • update your new frdm_kl46z.h/.c files to match your hardware
  • update virtual_shield.h and issdk_hal.h
  • Copy the KL25Z KSDK middleware/issdk_1.0 directory across to the KL46Z KSDK
  • If the KL46Z KSDK does not include CMSIS/Driver/Include, then also copy those files from the KL25Z KSDK
  • And as mentioned above, check the HAL functions in middleware/issdk_1.0/algorithms/sensorfusion/sources/hal_frdm_fxs_mult2_b.c

Regards,

Mike

0 Kudos
Reply
1,944 Views
kayathrim
Contributor I

Hi Mike,

I have downloaded the KL25Z SF7.0 in the below link & KL25Z KSDK also

Bare Metal KL25Z KDS Sensor Fusion Version 7.00 

Right now I am testing with FRDMKL25Z board. While enabling the UART0_IRQ control goes to HardFault_Handler.

I have assumed that Kinetis K64 to Kl25Z conversion & uart0 difference from kinetis has already taking care in KL25Z SF7.0. 

I am not familiar with SDK project. Any thing I am missing ?. 

Regards,

Kayathri

0 Kudos
Reply
1,944 Views
kayathrim
Contributor I

Hi Mike,

I found some workaround solution for the the above issue.

The problem was whenever UART0 interrupts are enabled through EnableIRQ (WIRED_UART_IRQn), ISR routine is getting called & trying to set the status & receiving some '\0' character. so control goes to HardFault_Handler. I have enabled the UART0 interrupt after initSensorFusionGlobals. sfg are updated in the initSensorFusionGlobals function. 

As you mentioned above post I have converted the KL25Z board file into Kl46Z & started communicating with toolbox. UART RX was not working & so I couldn't test the SAVE & precision calibration option.

Kl46Z is powered through KL46ZUSB & debugged through JTAG .To communicate toolbox, I have manually soldered the UART0 Rx, Tx ttl level & converted to RS232.

After connecting COM port in toolbox & powering on the KL46Z, I am able to test all the features. If i reverse the power on procedure UART0Rx doesn't work.

 

Now I am able to test the board.

 

Regards,

Kayathri

0 Kudos
Reply
1,944 Views
michaelestanley
NXP Employee
NXP Employee

I'm glad you are making progress.

Mike

0 Kudos
Reply
1,944 Views
kayathrim
Contributor I

Hi Mike,

1. We are using FRDMKL46Z & FRDM-FXS-MULT2-B board.

2. No, We are planning to use KSDK Version 7.00. Is V7.0 support available in FRDMKL46Z board?. We have flashed the bin file using File->Flash option.

3. Build date is 3 Aug 2016 & MCU binaries version V6.00 release.

4. We are using the Auto detect feature & precision accelerometer is not working. We have not tested the Calibration save option. FRDMKL46Z does not have SPI flash mounted on the board 

5. Is there any indication like data display in the Gs tab after pressing the orientation button.

Regards,

Kayathri

0 Kudos
Reply