Accelerometer vs pressure sensor

nsaspook

Joined Aug 27, 2009
16,322
I would always include a 3-axis accelerometer today in any force measurement of a device design

I used this test USB to SPI board for a simple drop test data log from the top of the back of a chair to the seat.


The tiny chip between the pin header and the USB socket is a BMX160 IMU.
https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmx160-ds0001.pdf



Three drops with only the accel vector logged to a CSV file using the MCP2210 USB driver on Linux. https://forum.allaboutcircuits.com/...2210-on-linux-with-libusb.179080/post-1693734
C:
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/cFiles/file.c to edit this template
*/

#include "mcp2210.h"

float accelRange = BMX160_ACCEL_MG_LSB_2G * 9.8;
float gyroRange = BMX160_GYRO_SENSITIVITY_250DPS;
static const char *build_date = __DATE__, *build_time = __TIME__;

/*
* read raw data array and convert to usable vector data for each sensor
*/
void getAllData(sBmx160SensorData_t *magn, sBmx160SensorData_t *gyro, sBmx160SensorData_t *accel)
{
    uint8_t data[23] = {0};
    int16_t x = 0, y = 0, z = 0;

    // put your main code here, to run repeatedly:
    move_bmx160_transfer_data(data);
    //    readReg(BMX160_MAG_DATA_ADDR, data, 23);
    if (magn) {
        x = (int16_t) (((uint16_t) data[1] << 8) | data[0]);
        y = (int16_t) (((uint16_t) data[3] << 8) | data[2]);
        z = (int16_t) (((uint16_t) data[5] << 8) | data[4]);
        magn->x = x * BMX160_MAGN_UT_LSB;
        magn->y = y * BMX160_MAGN_UT_LSB;
        magn->z = z * BMX160_MAGN_UT_LSB;
    }
    if (gyro) {
        x = (int16_t) (((uint16_t) data[9] << 8) | data[8]);
        y = (int16_t) (((uint16_t) data[11] << 8) | data[10]);
        z = (int16_t) (((uint16_t) data[13] << 8) | data[12]);
        gyro->x = x * gyroRange;
        gyro->y = y * gyroRange;
        gyro->z = z * gyroRange;
    }
    if (accel) {
        x = (int16_t) (((uint16_t) data[15] << 8) | data[14]);
        y = (int16_t) (((uint16_t) data[17] << 8) | data[16]);
        z = (int16_t) (((uint16_t) data[19] << 8) | data[18]);
        accel->x = x * accelRange;
        accel->y = y * accelRange;
        accel->z = z * accelRange;
    }
}

void bmx160_version(void)
{
    printf("\r--- BMX160 Driver Version  %s %s %s ---\r\n", BMX160_DRIVER, build_date, build_time);
}
//
            snprintf(log_buf, 255, "%7.3f,%7.3f,%7.3f\r\n", accel.x, accel.y, accel.z);
            write(logfd, log_buf, strlen(log_buf));
Converted to graph using libre office in Linux.

The middle drop expanded detail.

The yellow line is the Z axis. You can easily see the pull of gravity and handling movement, release acceleration, free-fall (Z goes to zero) when dropped and the impact from just a couple of feet drop to the seat of the chair.
https://peer.asee.org/newton-s-law-and-accelerometer-integration-applied-to-impact-analysis.pdf
https://ntrs.nasa.gov/api/citations/19970034695/downloads/19970034695.pdf
 

Attachments

Last edited:

Thread Starter

OctverQ

Joined Jul 8, 2022
12
Check the sensor you select,
for instance a SPI or I2C interface might be to slow
an analog one into the Arduino adc inputs might be more useful
I guess I`ll just have to trial some accelerometers
This one looks promising ADXL335
I still haven't figured how exactly am I gunna measure the impact to ground
 

Thread Starter

OctverQ

Joined Jul 8, 2022
12
@nsaspook

super work man, thanks for pulling the graphs out
I am looking at the zoomed in drop and just want to see if I understand this correctly

on the grapgh the zorizontal is the timelapse and vertical is the g-pull
then
1-55 probe was static (1 g pull)
55-73 probe was handled upwards
73-103 probe was held in the air
103-115 probe was dropped and was accelerating to approx. 1.5g

115-127 was this the impact moment when probe even bounces back from the chair ??
 

nsaspook

Joined Aug 27, 2009
16,322
I guess I`ll just have to trial some accelerometers
This one looks promising ADXL335
I still haven't figured how exactly am I gunna measure the impact to ground
That would work but since it's analog the selection of ADC will be important as will be signal processing that data into a usable form. The proper way would to have 3 analog S/H (or separate ADC with individual S/H) inputs so you can capture the instantaneous vector magnitudes correctly. Then you need to consider the sensor sensitivity (300 mV/g for a ADXL335) for resolution requirements and conversion speeds. SPI is plenty quick. I transfer samples at 4MHz on the BMX160 but it will run at 10MHz. My personal preference is to use a device with a digital interface and internal processing to simplify logging system requirements.

 
Last edited:

nsaspook

Joined Aug 27, 2009
16,322
@nsaspook

super work man, thanks for pulling the graphs out
I am looking at the zoomed in drop and just want to see if I understand this correctly

on the grapgh the zorizontal is the timelapse and vertical is the g-pull
then
1-55 probe was static (1 g pull)
55-73 probe was handled upwards
73-103 probe was held in the air
103-115 probe was dropped and was accelerating to approx. 1.5g

115-127 was this the impact moment when probe even bounces back from the chair ??
1657748332640.png
Data point update every ~6ms.

1-55 1G -> falling at 9.8m/s
https://www.phidgets.com/docs/Accelerometer_Primer#:~:text=On the earth's surface an,sensor in a particular direction.
Accelerometers measure acceleration. As such, you might expect an accelerometer to measure the acceleration of the sensor relative to the space around it, and that if the sensor is standing still it should read 0g. This is not entirely accurate. On the earth’s surface an accelerometer that’s not moving will register a reading of 1G (9.81m/s), straight upwards. So what’s going on here? Accelerometers work by measuring the movements of small internal structures caused by accelerating the sensor in a particular direction. When an accelerometer is stationary on earth’s surface, the sensing part of the accelerometer (as with everything else) wants to fall at 1G towards the centre of the earth. However, it is being held up by the casing of the accelerometer by an equivalent 1G in the other direction. Thus, the equivalent measured acceleration is 1G away from the ground. The only time an accelerometer will register 0G in all directions is if it is in freefall in a vacuum.
55-73 was the release and drop acceleration.
73-103 was free-fall post drop acceleration to zero G reading.
https://physics.stackexchange.com/q...lerometer-shows-zero-force-while-in-free-fall
103-115 was the impact with the chair seat
115 - impact decay (bounce)
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
I still haven't figured how exactly am I gunna measure the impact to ground
Q: What happens to acceleration when the object containing the sensor hits the ground?

A: A sudden, dramatic deceleration to zero!

That change of acceleration is called a jerk. It is the first derivative of acceleration. A positive jerk is a sudden increase in acceleration; a negative jerk is a sudden decrease.

That’s the physics. At a simpler calculation level, I’d determine the jerk associated with a dead stop and use that calculated value as a test of impact. Or use jerk as the desired measurement
 

nsaspook

Joined Aug 27, 2009
16,322
Q: What happens to acceleration when the object containing the sensor hits the ground?

A: A sudden, dramatic deceleration to zero!

That change of acceleration is called a jerk. It is the first derivative of acceleration. A positive jerk is a sudden increase in acceleration; a negative jerk is a sudden decrease.

That’s the physics. At a simpler calculation level, I’d determine the jerk associated with a dead stop and use that calculated value as a test of impact. Or use jerk as the desired measurement
With a proper Accelerometer It's simpler to drop-detect and measure impact forces until we return to normal 9.8m/s 1G acceleration.
 

Thread Starter

OctverQ

Joined Jul 8, 2022
12
Q: What happens to acceleration when the object containing the sensor hits the ground?

A: A sudden, dramatic deceleration to zero!

That change of acceleration is called a jerk. It is the first derivative of acceleration. A positive jerk is a sudden increase in acceleration; a negative jerk is a sudden decrease.

That’s the physics. At a simpler calculation level, I’d determine the jerk associated with a dead stop and use that calculated value as a test of impact. Or use jerk as the desired measurement
Thanks for explaining this to me
View attachment 271399
Data point update every ~6ms.

1-55 1G -> falling at 9.8m/s
https://www.phidgets.com/docs/Accelerometer_Primer#:~:text=On the earth's surface an,sensor in a particular direction.

55-73 was the release and drop acceleration.
73-103 was free-fall post drop acceleration to zero G reading.
https://physics.stackexchange.com/q...lerometer-shows-zero-force-while-in-free-fall
103-115 was the impact with the chair seat
115 - impact decay (bounce)
I must say that link you provided did the job in making me understand why zero G in free fall, basically in mid air there is no resistance upon the object(except air friction which is this case would have been negligible)
Embarrassing , I should of paid more attention to the physics classes 26years ago
 

Thread Starter

OctverQ

Joined Jul 8, 2022
12
With a proper Accelerometer It's simpler to drop-detect and measure impact forces until we return to normal 9.8m/s 1G acceleration.
I was thinking same logic
basically if I was to operate on the graph from @nsaspook I`d only keep the first candle from 103 - 127
then have to do several test to see if the sensitivity is right for different surfaces
 

nsaspook

Joined Aug 27, 2009
16,322
Thanks for explaining this to me


I must say that link you provided did the job in making me understand why zero G in free fall, basically in mid air there is no resistance upon the object(except air friction which is this case would have been negligible)
Embarrassing , I should of paid more attention to the physics classes 26years ago
Yes, you should have paid more attention. ;)

https://www.wired.com/2014/07/how-do-you-estimate-impact-force/
 
Last edited:
Top