Programming help needed for accelerometer project (paid gig)

Hi all,

I'm an Arduino beginner with a fairly simple project to complete. I had originally planned to try and figure out the programming myself buy my schedule did not allow it. The mechanical parts of the device I am building are done. Now I need someone to provide a working sketch that I can test on my hardware and then tweak as required to finish the project.

The device I'm making consists of an Uno, a button, a DC gear motor, a micro switch, an accelerometer (Adafruit LIS3DH Triple-Axis Accelerometer (+-2g/4g/8g/16g) : ID 2809 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits), and a LCD display.

When the button is pushed, the motor lifts a weight with attached accelerometer and drops it onto a surface three times. (The switch is triggered during each rotation to count the cycles). For each cycle, the maximum acceleration is recorded. At the end of the three cycles the average of the three accelerometer readings is displayed on the LCD.

If you can help me out with this project and are ready to get started immediately please PM me with some info on your background and experience, and your hourly rate or fee.

Thank you for your interest!

CLineFab:
When the button is pushed, the motor lifts a weight with attached accelerometer and drops it onto a surface three times. (The switch is triggered during each rotation to count the cycles). For each cycle, the maximum acceleration is recorded.

Are you sure the accelerometer can even be sampled fast enough to provide the actual maximum of this super short peak, and that the peak is within range of the device? It maxes out at just 16G, which is not much for an impact. It has an SPI interface so that's helpful, but still you have the problem of catching the peak as it happens.

Anything in place to ensure the orientation of the object as it falls down?

wvmarle-

  1. You're right, it's unlikely I'll catch the absolute max acceleration due to sampling frequency limitations. I believe that by averaging three (or more) readings I can get close enough to the max to suit my purposes.

  2. The weight is dropped onto a relatively soft surface, so I'm hoping the 16G limit of this sensor will suffice. If not, there are others available that go up to 250G (though with lower precision).

  3. Yes, the weight is fully guided along its travel, so should be repeatable.

Thanks for the great questions!

CLineFab:

  1. You're right, it's unlikely I'll catch the absolute max acceleration due to sampling frequency limitations. I believe that by averaging three (or more) readings I can get close enough to the max to suit my purposes.

You mean readings from a single drop? Or readings from three individual drops?
Both have their shortcomings. The main problem is that you never know how close to the real peak you were as it lasts so short.
A soft surface helps of course as the peak is more spread out. Still it's going to need some serious trial and error.

Another important problem is how to attach the accelerometer to the object. It has to be attached firmly, a breakout board's bending may put off your measurements.

wvmarle-

The plan is to average readings from three or more drops. As you say, it will take some trial and error to determine how many drops are needed to get repeatable readings.

And yes, the breakout board will be rigidly attached to the weight and oriented so that the measurement axis is not affected by board flex.

Have you got an estimate for the maximum acceleration your board will experience? The common accelerometers can only handle +/- 16g. If it's above that, you'll need to use something like an ADXL377 which can handle up to 200G.