LSM6DS33, check my homework, please.

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Disciple
 
Posts: 852
Joined: Tue Jan 06, 2015 8:13 pm

LSM6DS33, check my homework, please.

Post by Disciple »

Hello. My dad bought a CLUE and shipped it to me for inspection and testing before I disinfect and pass it on to him. It's nice, the sensors look functional. The BTLE awaits testing. A question confronts me.
What sort of numbers should I be seeing from the gyro sensors when the CLUE is stationary? Here's the answer I came up with. The full board test in the Arcada library runs well and showed me gyro values that quiver at less than 1 degree per second. That seemed great, until I saw that the sketch wasn't reporting degrees, but radians per second, so the sketch needs a fix. I put in the scalars and tested again. Now two of the axes hover at nearly -6 degrees per second when motionless, while the other trembles at -2 degrees. Yow! To me, that seems like a lot, having no prior experience with gyro sensors.
I looked to the LSM6DS33 data sheet and made whatever sense of it I could. Table 3 says that "Angular rate typical zero-rate level" is rated at plus or minus 10 degrees per second. Oy! Ten degrees? Well, that puts my numbers within tolerance, I guess. Paragraph 4.6.2 seems to say that the error is pretty constant, so I just have to measure the error, subtract it in my code, and I'll have reliable numbers.

Sensor experts, please check my work. Do I have the right take on the situation? Can I calibrate from just one data point? I'd have a tough time measuring any more. Thanks for reading.

Hallelujah!
Disciple

User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

Re: LSM6DS33, check my homework, please.

Post by kevinjwalters »

Don't know if it helps, but for comparison here's the values from one of my CLUEs sitting stationary on my desk in CircuitPython:

Code: Select all

>>> clue.gyro
(0.0418443, -0.18219, -0.079107)
>>> clue.gyro
(0.0436769, -0.180511, -0.0789543)
>>> clue.gyro
(0.0394008, -0.179594, -0.0798706)
>>> clue.gyro
(0.0403171, -0.181121, -0.0783434)
>>> clue.gyro
(0.043066, -0.182343, -0.076969)
>>> clue.gyro
(0.0409279, -0.181885, -0.0792598)
>>> clue.gyro
(0.0415388, -0.180816, -0.0781907)
>>> clue.gyro
(0.0413861, -0.179442, -0.079107)
>>> clue.gyro
(0.043066, -0.179442, -0.0781907)
>>> clue.gyro
(0.043066, -0.180816, -0.0772744)

User avatar
Disciple
 
Posts: 852
Joined: Tue Jan 06, 2015 8:13 pm

Re: LSM6DS33, check my homework, please.

Post by Disciple »

That does tell me something. Thanks.
If those are radians, your Y-axis sensor is quavering at < -10 degrees, which exceeds the data sheet bounds, as I understand them.

I added code to make my CLUE report the values as running averages, and learned that the motionless gyro outputs are anything but constant! They drift over time/temperature, and they change value with every restart. However many points I might measure for calibrating, the target keeps moving.
So I guess the new question is, if my LSM6DS33 could produce unchanging values when stationary, what would be the answers to my initial question?

Hallelujah!
Disciple

User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

Re: LSM6DS33, check my homework, please.

Post by kevinjwalters »

On degrees vs radians it was corrected in CircuitPython https://github.com/adafruit/Adafruit_Ci ... S/issues/9

I'm an occasional end user of gyro-based devices but I've never worked with them beyond a quick play on the CLUE. I very briefly tried using the gyro for Floating Point Visualisation on the CLUE in CircuitPython (YouTube) but then switched to the accelerometer.

This looks like good background reading and might have some useful references:
https://www.researchgate.net/publicatio ... erspective

User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

Re: LSM6DS33, check my homework, please.

Post by kevinjwalters »

I've not read through all of it but this project may have dealt with gyro issues to some extent: https://www.instructables.com/id/An-Autonomous-Rover/

User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

Re: LSM6DS33, check my homework, please.

Post by kevinjwalters »


User avatar
Disciple
 
Posts: 852
Joined: Tue Jan 06, 2015 8:13 pm

Re: LSM6DS33, check my homework, please.

Post by Disciple »

I gotta thank you for keeping my questions in mind over the long term. Adafruit generates hug-reports to acknowledge being excellent. I'd nominate you if I could.

Both these posts tell me much. The instructables project says find the center of the noise and throw out small fluctuations. The libraries will require some study, and they contain a bunny... all useful. The CLUE sits idle at the moment due to higher priorities, but a clear path of progress awaits. Thanks.

Hallelujah!
Disciple

Locked
Please be positive and constructive with your questions and comments.

Return to “CLUE Board”