Hi,
This may be a silly question but I was under the impression that accelerometer data would give me some sort of data on how much it is accelerating in the x, y and z coordinates respectively. To my surprise, the data I am getting seems more in line with what I would expect from a gyroscope. It is giving me tilt information.
per axis:
1 "top" -1 "bottom" 0 for both sides. I can use this data with time to derive how long it took to get from an abstract place on the wheel that this data creates and could if necessary derive the actual velocity if I knew the distance to the access of rotation corresponding to the individual axis. For my use-case, I really don't require a great deal of accuracy and I therefore simply do the calculations as I described. But I am still wondering if there is a better way to interpret the data?
When I receive the data on the central I take the X-axis for example and time how long it takes to get from an abstract position, say 0.8 to say -0,8 and then back to 0.8. This way I can tell how long it took to make a full rotation and thus I know an approximation of the velocity, it's of course not accurate as I don't know, nor need to know, the axis of rotation.
I would just like to know before going further down this road if I'm doing something dumb and if someone has a better approach.
I just need an approximation of the velocity of a given axis at any given time.
I am using the Nano 33 BLE and it uses an LSM9DS1 IMU.
thank you for your attention.
Steen_Petersen:
This may be a silly question but I was under the impression that accelerometer data would give me some sort of data on how much it is accelerating in the x, y and z coordinates respectively. To my surprise, the data I am getting seems more in line with what I would expect from a gyroscope. It is giving me tilt information.
Did you try the example from the Arduino_LSM9DS1 library? File -> Examples -> SimpleAccelerometer
When the board points with the pins to the table you should get the following output
-0.02 -0.03 1.02
This shows you the current acceleration of the board in g (9.8 m/s2). The board is accelerated towards the earth with 1g along the z-axis.
When you point the board with the small side towards the earth you should read
-1.02 -0.02 -0.03 // x-axis pointing towards earth
And when you put in on its long side
-0.02 -1.00 0.02 // y-axis pointing towards the earth
When you shake the board the acceleration of the board is the acceleration you are creating plus the acceleration of earth gravity. e.g.
0.04 -0.85 1.27
If you tap on the table while the board is running you will see that the sensor is quite sensitive and you will need to do some filtering to get the signal you need for your application.
What is your application?
Klaus_K:
What is your application?
I simply wish to strap the Nano33 BLE onto an object that spins, for example, a bicycle crank or a factory floor hatch two-handed locking mechanism or windmill, etc and determine how many spins it has done and how fast it is rotating. I don't determine this on the board itself, I send the data to an application and do the maths there. I'm just wondering what a smart way of doing this would be.
Steen_Petersen:
I don't determine this on the board itself, I send the data to an application and do the maths there.
I believe the "Garmin Speed Sensor 2" works like this. It does not use magnets anymore. So this can be done.
You will need to do the math on the Arduino. The data rate you can achieve with BLE is likely not fast enough to send the raw data needed. It will also likely be more power efficient when you do the calculation on the Arduino and only send very few data.
You could use the BLE standard defined by BLE org for this type of sensors.
Bluetooth.org - CYCLING SPEED AND CADENCE PROFILE