# Using arduino to dynamicaly balance an aircraft propeller

#### PBu

##### Newbie
Equipment:
Hall Sensor to identify propeller location and rpm
Accelerometer (ADXL345) to identify maximum ips during rotation

Requirements: During one rotation of the propeller the adxl345 should detect the ips (g's)the g values should be going through a sine wave. I need the maximum amplitude and time.
Question: Does the adxl345 store the maximum acceleration in the buffer or just the acceleration at the moment you read it from the buffer?

SO ideally the propeller will trip the hall sensor at time zero then the adxl will detect maximum acceleration milli seconds later and i will be able to use this time difference to calculate the propeller position at maximum g's. I need the adxl345 to store the maximum amplitude and time this occurs

Regards Pet

#### barry

RTFM.

The ADXL345 samples at a user-specified data rate, up to 3200 Hz. Data is stored in a fifo.

I think this system might have several problems.

First, the accelerometer output will probably have a LOT of noise on it. Generally, you average samples to eliminate the noise.

Second, assuming your 4-blade propeller runs at 2000 RPM (33.3 RPS), you'll have 132 peaks/second (1 peak/blade). With a sample rate of 3200Hz, that gives you a resolution of about 15 degrees. (132/3200) x 360=14.8 degrees. Is that good enough?

#### PBu

##### Newbie
Thanks for the kind reply Barry.

It is a two blade prop turning at 2400 pm. There are commercial units available that operate in this way, possibly their accelerometer has more resolution than the adxl345.

Yes they do average their readings before giving a result

You mentioned FIFO, does this mean they are storing the acceleration values at a set frequency meaning they could be anywhere in the 360 degree circle and thus i may not get the maximum value for any rotation.

I need the maximum acceleration for the last rotation and hopefully some time mechanism to relate that to propeller position.

As I understand it starting at point of maximum acceleration as 0 degrees then at 90 and 270 acceleration will be zero and at 180 degrees negative maximum ie: a sine wave

I wonder if the commercial units may be also providing acceleration values that could be anywhere in the rotation and are counting on a long average to approximate the maximum acceleration per rotation

#### barry

Your problem is not resolution, it‘s sample rate. I think I might have misunderstood initially. Are you saying there will be only one amplitude peak per revolution? In that case you’ll have 4 degree resolution. But if you do any averaging, that’s going to decrease your angular resolution (Not to be confused with acceleration resolution)

#### FvM

##### Super Moderator
Staff member
Consider that the samples follow a sine function which can be interpolated. You can also perform a vectorial averaging over multiple revolutions. Respectively angle resolution is not limited by the sample rate. It's surely limited by noise.

#### PBu

##### Newbie
I guess what I need to know is; under what conditions does the adxl345 store the new acceleration value .

Automatically every x seconds ?
When there is a change ?
When it reaches a maximum or minimum value ?

What is the trigger that causes the adxl345 to store the current acceleration value and can a time stamp be applied or is available when this happens

#### KlausST

##### Super Moderator
Staff member
Hi,
When it reaches a maximum or minimum value ?
I downloded the datasheet, did a PDF search on "maximum" and "minimum". I did not find any information that it stores minimum or maximum values.
Besides the bypass mode there are several FIFO modes .... you need to read the datasheet to find out if one of the modes fits your needs.

Klaus

#### PBu

##### Newbie
Thanks Klaus, too new to make sense of data sheets, however I appreciate you showing interest

#### FvM

##### Super Moderator
Staff member
For the time being, assume that the sensor generates tuples (xyz) of acceleration data at a programmable rate, with a group delay determined by the filter settings. Effective sample time has to be calculated by your code, timestamp of data ready interrupt minus group delay. FIFO is of no particular use for your application.