DWM1001 Accelerometer Readings

Hi,

We have just ordered the MDEK1001 kit to see if it fits our needs for a research project. I am curious to know if there is already a built-in way to get the raw data measurements from the accelerometer with the kit rather than just using it to change the location rate type. Or, will I need to edit the code myself to pull these readings?

Thanks!
Jake Uribe

1 Like

Hi Jake,

It is possible to access the accelerometer directly from the MCU using the TWI (I2C) bus. However, one issue you should consider: the built-in TWR protocol stack that the MDEK1001 kit is shipped with (optionally) uses the accelerometer as a wake-up device for Tags operating in low-power mode. If you were also to try accessing the accelerometer you would probably run into conflict with the embedded protocol stack.

You can disable the Tag’s accelerometer wake-up feature by configuring the protocol stack over the USB/serial comm port or via the BLE linked Android app - however, be careful if you use the accelerometer’s interrupt pin (INT1) since it’s possible the protocol stack has an attached interrupt handler. Similarly, if you directly control the TWI you might want to consider how you use the transfer complete event (interrupt driven or polled).

If you are not planning to use the embedded TWR protocol stack, you could erase the nRF52 Flash and write your own application code using the Nordic nRF52 SDK - in which case you’ll be free to configure the accelerometer and TWI as you like.

Decawave is about to release example driver code for the TWI and the accelerometer which you could use as the starting point for your own application code development.

Hope this helps - let me know if you have further questions.

Hi,

I’ve been reading the Accelerometer values using the Shell API commands, any idea what the units for these readings are? The values seem too large to be in m/s^2.

Also, I connected a Listener DWM1001 module to my PC and am communicating to it using the Shell API via UART. Using the ‘les’ command I can get the position data of other Tags within the network. The ‘av’ command to get the Accelerometer values only seems to give me the measurements from the Listener module, any ideas on how to get the accelerometer readings of the other Tags in the network, like the les command?

many thanks,

Joel

Hi ,

The values are raw values. So to convert them to g you first have to divide the values by 2^6 ( as it is shifted) and then multiply it into 0.004 (assuming you are using the ±2g scale). With regards to the getting the accelerometer readings to the UART, I have written specific functions to read the data . I could put the github link up if you want.

Hi,

Thank you very much for explaining this! And if you could share the github link that would be brilliant!

Thank you for your help, all the best.

Joel

Hi,

So, I am not sure how much of a help this will be but below is a link to a GitHub repository where I wrote a code to access the accelerometer (in the Decawave Environment) data directly and print it in UART. You do not have to give miserable minicom commands . Just launch minicom with the device id and see the data printed on the terminal.

[size=small][font=Calibri, sans-serif]https://github.com/vinaybalaji894/master_thesis_vr.git[/font][/size]

[size=small]This is still a work in progress. It gets the job done for now. I’ll review it and make amends later.[/size]

[size=small]Kind regards,[/size]
[size=small]Vinay[/size]

1 Like

Hello vinay:
Thank you very much for your acc value calculation method. I understand that i should do following math for av value: (e.g. I get 10000 at X axis) real value=10000/(2^6)*0.004.
But I dont know why should I do this calculation and the meaning of this formula. Could you please give more explaination?
Thanks a lot!