Accelerometer with Arduino

Hi guys,
I have to measure the moviment of a piston. It can move only 1mm, I have thought that I can use an accelerometer that that will fix up but I don't know if it's possible with arduino.

Do you have any advice? What kind of accelerometer I can use?

Thanks

That is possible, but perhaps there are more easier ways.
What about an Infrared Proximity Sensor ? A linear pot meter ? A piece of rubber and a FSR (Force Sensitive Resistor) ? A magnet and a ratiometric analog hall sensor ?
If the piston is rock-steady on a concrete floor then an accelerometer might work, if the piston itself can move with vibrations or so, then the accelerometer will also measure that.
What is the size of the piston ? can you glue things on it ?

The piston is 3 cm high and with a diameter of 4cm. Yes, I can paste over it.

What do you suggest me?

That's small.
I would glue a microswitch near it. Perhaps with a lever.
Or a small magnet and a hall sensor.

Does the piston pick up mechanical vibrations ? Then an accelerometer is not a good choice.
Are there magnetic fields from wires with high currents or a transformer ? Then a hall sensor is not a good choice.
Is there a lot of dirt and dust ? Then an Infrared Proximity Sensor is not a good choice.

A FSR and pot meter are not the best options.
Another option is to measure the voltage of the piston. Is the piston for example 24VAC ? Then with circuit with an optocoupler could be used. However, if the piston gets stuck, it will not be detected.

I think to use the strain sensor, but I have to make the signal conditioning tips.

Is it a good idea?

Yes, that is also possible. I don't know how you want to make that mechanically, and you need an amplifier.
A magnet and hall sensor is easier.

okok, but there is a magnetic field near the piston

Do you need to measure how much the piston has moved or just detect that it has moved at all ?

Yes, I have to measure ho much the piston moves.

Yes, I have to measure ho much the piston moves.

What's the stroke of the piston?

Hi,
What is the application you are talking about, a piston with a magnetic field and 1mm movement is very small.

Tom.... :slight_smile:

Maximum 1mm, yes it's shaker for neutron. the piston is a solid solenoid in reality

What you want to do does not sound easy.

To summarise, you have a piston with a diameter of 4cm that moves through a distance of 1mm and you want to measure how much it moves. Is that correct ?

Will the piston be vibrating rather than moving to a fixed position (you say it is a shaker) ? What frequency will it be shaking at and what linear resolution are you hoping to achieve in the measurement ?

shaker for neutron

woh is this?

Yes it's correct. The frequency is from 5Hz to 9kHz, the resolution is 0,1mm,

rossotony88, you should have told these things in the first post, and you may need to explain what you want to measure.
A shaker of 5Hz to 9kHz is something else than a piston. And we still don't have enough information.
What is that 0.1mm resolution ? is that the driver resolution for the piston ? Or is that the resolution you want to measure ? Do you want to measure the vibration or the frequency or the mechanical amplitude or for example the actual position of the piston with a sample rate of 1MHz or so ?
Can you show us a photo ?

The 9kHz is too high for normal accelerometers and normal Arduino boards. You need a special accelerometer to measure high frequency vibrations.

An accelerometer with an Arduino board has often a sample rate of 100Hz. There is no quick and easy way to do this with an Arduino. I think you should buy equipment that is designed for these things.

An accelerometer is suitable for your application, but will not measure displacement directly.

You can measure the acceleration with an accelerometer, but you then have to integrate the results to give you velocity, and then integrate a second time to give you displacement.

This is commonly done on vibration equipment used to perform environmental testing of electronic products.