This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Changing gyro range for Puck-js sensor
#1
I have measured angular velocities of a Puck-js sensor spinning on a wheel.
   

I encountered a similar challenge that I did for measurements with a TI SensorTag: the default range for the device is too low. Dominik clarified that the SensorTag's firmware makes it difficult to change the gyro ranges. https://phyphox.org/forums/showthread.ph...08#pid3508


But the Puck-js uses a LSM6DS3TR-C. The spec sheet for that device says explicitly that it has an adjustable angular rate change:

Quote:The LSM6DS3TR-C has a full-scale acceleration range of ±2/±4/±8/±16 g and
an angular rate range of ±125/±250/±500/±1000/±2000 dps.
https://www.espruino.com/files/LSM6DS3TR-C.pdf

On page 22 of the spec sheet, it mentions a self-test mode:
Quote:Angular rate self-test output change(14)(15)

And on page 62 of the spec sheet it describes the registers for control of the angular rate change:
Quote:9.14 CTRL2_G (11h)
Angular rate sensor control register 2 (r/w).
Table 53. CTRL2_G register
Table 54. CTRL2_G register description ODR_G3 ODR_G2 ODR_G1 ODR_G0 FS_G1 FS_G0 FS_125 0(1) 1. This bit must be set to ‘0’ for the correct operation of the device. ODR_G [3:0] Gyroscope output data rate selection. Default value: 0000 (Refer to Table 55) FS_G [1:0] Gyroscope full-scale selection. Default value: 00 (00: 245 dps; 01: 500 dps; 10: 1000 dps; 11: 2000 dps)

On the Phyphox page describing Puck-js sensing (https://phyphox.org/wiki/index.php/Puck.js) you invite requests for assistance. Could someone help to identify the i2c device and register numbers for writing to and reading from the Puck-js sensor so that I have the full 2000 dps range for the gyroscope?

Thank you!
Reply
#2
Here are results for a related experiment using a PocketLab Voyager sensor that has a more appropriate range for angular velocities in my experiments. Note that the peak angular velocities reach +/- 17 radians/sec in this example and may increase somewhat as we gain experience.

   
Reply
#3
Thanks for reporting. We will look into this. On first sight, I have not seen information if the different ranges have an impact on the power consumption

Puck.accelWr looks like a pretty straightforward command to configure the register that you have mentioned – and it should be short enough to be readily included into the experiment source. Smile
Reply
#4
(06-04-2023, 09:30 PM)Jens Noritzsch Wrote: Thanks for reporting. We will look into this. On first sight, I have not seen information if the different ranges have an impact on the power consumption

Puck.accelWr looks like a pretty straightforward command to configure the register that you have mentioned – and it should be short enough to be readily included into the experiment source. Smile

Thank you for considering this modification. The default range is so low that even simple experiments like rolling down a short and shallow inclined plane can exceed the threshold.
Reply
#5
(06-04-2023, 09:30 PM)Jens Noritzsch Wrote: Thanks for reporting. We will look into this. On first sight, I have not seen information if the different ranges have an impact on the power consumption

Puck.accelWr looks like a pretty straightforward command to configure the register that you have mentioned – and it should be short enough to be readily included into the experiment source. Smile

Is this an example of what you mean when you say use Puck.accelWr "to configure the register"?
http://www.espruino.com/modules/puckjsv2...ovement.js
Reply
#6
(06-04-2023, 09:30 PM)Jens Noritzsch Wrote: Puck.accelWr looks like a pretty straightforward command to configure the register that you have mentioned – and it should be short enough to be readily included into the experiment source. Smile

There should have been this link: https://www.espruino.com/Reference#l_Puck_accelWr  Angel

The function arguments (“reg” and “data”) are documented in http://www.espruino.com/files/LIS3MDL.pdf

So, the file you linked is an example for this, yes.
Reply
#7
Thank you for the clarification!
Reply
#8
(06-07-2023, 04:00 PM)Jens Noritzsch Wrote:
(06-04-2023, 09:30 PM)Jens Noritzsch Wrote: Puck.accelWr looks like a pretty straightforward command to configure the register that you have mentioned – and it should be short enough to be readily included into the experiment source. Smile

There should have been this link: https://www.espruino.com/Reference#l_Puck_accelWr  Angel

The function arguments (“reg” and “data”) are documented in http://www.espruino.com/files/LIS3MDL.pdf

So, the file you linked is an example for this, yes.
Jens:
With the links you shared, I was able to find a code snippet (from Gordon@Espruino) that illustrated in more detail how to code the "reg" and "data" arguments to change the Full Scale range for the gyroscope:
https://forum.espruino.com/comments/15617612/
   
So, I was able to change the gyro range.
Thanks for your support.
Reply
#9
Thanks for following up on this and congrats. Smile

Could you share the phyphox file format snippet that you have added (or the full file)?
Reply
#10
I'm happy to share the full experiment file with the caveats that
  1. I am not a programmer and
  2. I have solved a specific need. I assume that Phyphox programmers probably could make a more general solution.

Do you just want the file or some of the backstory, too?
Reply


Forum Jump: