# Measuring vibration amplitude using accelerometer

Hi guys,

We're currently working on a project which requires us to measure the amplitude of a vibrating cantilever. We're already thinking of using an Uno with a standard motor shield to control another function of the device and were wondering if it would be possible to connect an accelerometer to the board as well, and take the vibration measurements simultaneouly.

I understand that converting the acceleration readings into useful data should be easy enough, but am not sure if it is possible to take the readings while the board is driving the motors. (It would be using one motor for both an x and y axis, and scanning a small 100x100mm sample under a tip.)

Also, the frequency of the vibrations shouldn't be much more than 100Hz, but the changes in amplitude the cantilever would be experiencing might be quite small. Maybe in the range of 2-3mm? Does anybody with any experience with something like this know if these vibrations might be detectable? It doesn't have to be perfectly precise or anything, we're just looking to calculate a relative change in amplitude at each position of the sample.

The accelerometer I linked stood out to me because of the variable bandwidth. If anyone knows of anything that might be more suitable, please let me know!

Like an atomic force microscope on a larger scale?

The usual way of measuring vibration amplitudes for such devices is to attach a mirror to the tip of the cantilever and bounce a laser beam off it. Then you can measure the deflection of the laser beam instead, which is very easy to do.

In order to determine the amplitude of the vibration, you will have to do some quite complex mathematics.

You need to integrate the output of the accelerometer to get the velocity, and then integrate a second time to get displacement.

I don't think you will be able to do this using an Arduino.

Use something like a Hall effect sensor and a magnet glued to the thing that's vibrating. Requires a stable reference where the sensor is mounted, but you could easily calibrate it for distance.

jremington: Like an atomic force microscope on a larger scale?

The usual way of measuring vibration amplitudes for such devices is to attach a mirror to the tip of the cantilever and bounce a laser beam off it. Then you can measure the deflection of the laser beam instead, which is very easy to do.

That's actually exactly what we're trying to do! You're right, the original plan was to use a laser, and we're still considering it. I just wondered if it might be easier to use a ready-made device that syncronised with the Arduino (that we're 99% sure we're going to use for the scanning anyway).

Accellerometer stuff aside, what do you think would be the best way to monitor the amplitude of a reflected laser point?

MK1888: Use something like a Hall effect sensor and a magnet glued to the thing that's vibrating. Requires a stable reference where the sensor is mounted, but you could easily calibrate it for distance.

That's interesting, hadn't thought of something like that. Thanks! It's the kind of thing that they'd have lying around somewhere, too. Hmmmm...

what do you think would be the best way to monitor the amplitude of a reflected laser point?

Until you have some idea what the amplitude actually is, just let the beam hit a wall somewhere and mark the extremes of the motion. The amplification factor is easy to determine by simple geometry and distance ratios.

Later you can set up a video camera or photodiodes to detect the movement of the reflected beam.

jremington: Until you have some idea what the amplitude actually is, just let the beam hit a wall somewhere and mark the extremes of the motion. The amplification factor is easy to determine by simple geometry and distance ratios.

Later you can set up a video camera or photodiodes to detect the movement of the reflected beam.

That's what we've been trying to do. It's just a matter of figuring out how to set up an array like the split diode detectors used in the real AFMs and being able to monitor and record some voltage in real time as well as synchronising it with the scanning. (Hence my thoughts about using an accelerometer, if only for the simplicity of being able to use the Uno for more than one thing.)

We think we've pretty much ruled out using a camera, though. Even diregarding the difficulty of tracking a dot on a screen and converting that into actual data, no camera we could buy or borrow would realistically be able to record at any more than around 100FPS. This is pretty much at the low end of what we're thinking of driving the cantilever at.

If you only wish to measure the maximum amplitude, it doesn't matter what the frame rate of the camera is.

If you know the peak acceleration and frequency you can calculate displacement.
http://www.spaceagecontrol.com/calcsinm.htm
You can get both from the accelerometer if the accel frequency response, range and sample rate are high enough.