Sensor for angular position

Hello

I’m a beginner when it comes to electronics, so I need some advice.
I need to measure the angular position of a shaft, which constantly does a small rotation (~0º-20º) back and forth at high speed (does this motion 6 times per second). I’d need a resolution of maybe less than 0.2º.

From my research, I’ve found that maybe a Hall Effect absolute angle sensor would do the job. I’ve found a couple of 12-bit ones

https://www.dfrobot.com/wiki/index.php/Gravity:_Hall_Angle_Sensor_SKU:_SEN0221
http://www.china-encoder.com/products_detail/productId=108.html

but I’m not entirely sure if they are the right solution.

I have 100€ max to spend and would need to connect it to an Arduino without many complications.
Is any of these a good solution?

Thanks

How about a rotary encoder? You may need a quadrature type to sense direction together with angular movement but they can be really precise. 1800 pulses per rotation should be possible.

If you use an analogue sensor, pick an Arduino that has an ADC with better than 10 bit resolution otherwise you'll be limited to 0.35 degree resolution. Use the ADC internal voltage reference for better accuracy.

Your budget will need to include a flexible metal coupling to deal with runout and misalignment.

The outputs of the two sensors say 'ratio' output which may indicate a ratio-metric output, so you will need a stabilised power supply to give reliable measurements.

Lastly, will the inertia of the flexible coupling and sensor affect the thing being measured?. 6 Hz is going to require a fair bit of additional power unless you are dealing with a resonant system.

Actually if the sensor's output is ratio metric, and you use the default Vcc as analog reference, you don't even have to worry about super stable Vcc as both fluctuate the same.

Expanding a bit on the project, I have a shaft connected to a blade and a spring that continually hits the objects that pass through. If the objects don't have the correct shape, the shaft will rotate more or less, and that is the angle variation that I have to identify.

wvmarle:
How about a rotary encoder? You may need a quadrature type to sense direction together with angular movement but they can be really precise. 1800 pulses per rotation should be possible.

I am thinking I need an absolute angle sensor since I need to detect exactly the angle variation.

mikb55:
If you use an analogue sensor, pick an Arduino that has an ADC with better than 10 bit resolution otherwise you'll be limited to 0.35 degree resolution. Use the ADC internal voltage reference for better accuracy.

What if I used an arduino Zero or Due, would that be a good solution?

An encoder lets you count - and as long as you have a proper zero and don't miss counts, you know the absolute position.

If you want to go the analog route, you may also use an external ADC such as the ADS1115 or ADS1015.

wvmarle:
An encoder lets you count - and as long as you have a proper zero and don't miss counts, you know the absolute position.

Would you recommend an encoder then? Maybe something like this:

You're going to need a precision quadrature encoder: the one you link to can do only 1024 p/r so 0.35°, so you need at least double the pulse count. I don't have any specific ones in mind.

Another option may be an IR distance sensor, measuring the location of the end of your blade (where the largest movement is). The distance the sensor returns is of course also a direct measure of the size of the object passing through. E.g. this digital time of flight based one, or this analog one. Of course there are more such sensors, in various accuracies/price classes.

wvmarle:
Another option may be an IR distance sensor, measuring the location of the end of your blade (where the largest movement is).

I've already taken a look at these type of sensors, but they seem less accurate and resistant.

There are a lot of options which leaves me kind of lost. Between the encoder and the half effect sensor, what would you pick?

I can't make a choice based on the info given, which is far too limited. Considerations include not only accuracy and sensitivity, but also how easy it is to integrate with the existing process, durability, cost, etc.

rodlo:
Expanding a bit on the project, I have a shaft connected to a blade and a spring that continually hits the objects that pass through. If the objects don't have the correct shape, the shaft will rotate more or less, and that is the angle variation that I have to identify.

I am thinking I need an absolute angle sensor since I need to detect exactly the angle variation.

What if I used an arduino Zero or Due, would that be a good solution?

Might be easier to just measure the material.

Paul

Found this absolute encoder which seems pretty decent, good price, and there is already code made for it:

Seems way better than the other options.

In another thread I saw this position sensor. There's apparently even a 2.5 mm version of it - maybe a suitable option for your project.