Angle sensor in new project

Thread Starter

Nskeates

Joined Feb 6, 2018
7
Hello. I don' know much about electronics but looking to see if a device is possible.
I wish to have a device that you can bush a button to first set angle the rotate it and push a button again to set another angle. Then each time device is rotated to second set angle it bleeps. Or you could but in a set angle into device like 15 degs and each time rotated to 15 degs it bleeps. Device cannot be any bigger than 10cm x 3cm roughly. Does anybody know of this would be possible to achieve ?
Thanks Neil
 

MaxHeadRoom

Joined Jul 18, 2013
28,696
By 'Set' do you mean record a value of a moving object/vane etc.
A little more info is needed, my crystal ball is in the shop.;)
Max.
 

Thread Starter

Nskeates

Joined Feb 6, 2018
7
If I say what I am trying to achieve it might be better. Device wants to be located halfway up a stick and I want to be able to rotate stick to repeatable angle each time. Angle to be set by myself that I want to rotate it to. Then bleep when angle achieved.
Thanks Neil
 

LesJones

Joined Jan 8, 2017
4,190
I think a 3 Axis Accelerometer of the type used in tablets would probably be a suitable basic sensing device for your project. You would then need to use a microcontroller to interface it to behave as you want. It is also possible that there might be some small smart cellphones with built in accelerometers that could be programmed to do what you want. For the first suggestion you would need to learn quite a lot about electronics. For the second suggestion you would need to learn to write software to run on the cellphone. I did think about using a Wixey type angle guage as the basic sensor but is a bit more than 3cm thick . You have only given two dimensions. What is the limit on the third axis dimension ? If the wixey type unit could just fit into the space available there is information on my website on accesing the angle information to use externaly.

Les.
 

LesJones

Joined Jan 8, 2017
4,190
So am I correct that the maximum dimensions of the device is 10cm x 5cm x 3cm ? If so the Wixey angle gauge it too large it is 5.1cm x 5.1 cm x 3.3cm. You will also need to give information how close the device has to be to the required angle for the buzzer to sound. I.E. +/- 0.1 degree, +/- 1 degree, +/- 10 degrees for example. Also is the stick rotated about it's axis or is it pivoted from one end between so it's axis moves between horizontal and vertical ?

Les.
 

Thread Starter

Nskeates

Joined Feb 6, 2018
7
Dimensions given are just rough sizes. Can go a little over. Measuring angle can be to within plus or minus 1 deg. Pivot will be about end of stick.

Thanks Neil
 

LesJones

Joined Jan 8, 2017
4,190
I think the Wixey angle gauge solution can be discounted due to size. The accelerometer solution I suggested in post #5 would probably be the smallest. (I have never used these accelerometer chips so I know very little about them.) I Googled "inclinometer using accererometer" and found many hits. One of these was using an Arduino. There are accelerometer modules available to connect to an Arduino so you could probably avoid having to make printed circuit boards. You would only need to learn fairly basic electronics and learn to program in the version of "C" used with the arduino. This is one of the links I found with Google. The other possible solution would be to make a pendulum system like the one used in the Wixey angle gauge coupled to a optical encoder disk. You would need reasonable workshop facilities to make this. You would also need to build the electronics rather than using pre built modules.

Les.
 

philba

Joined Aug 17, 2017
959
I see two solutions with promise. An accelerometer or a quadrature encoder. The acc has the advantage of being placeable (is that even a word?) anywhere on the stick being moved. The quad enc would have to be at the axis and attached to both sticks.

The quad enc basically gives you pulses as it turns. Start from a known position and then it's just a matter of counting pulses. Not sure if you can find one with the needed resolution, though.

The acc will require filtering as you will get noisy input signals from it. Mapping the accelerations (gravity vectors actually) to angle takes some math but isn't too bad. Though, if you don't care about the actual angle it's not needed. Note that the base stick is irrelevant - the acc is simply measuring the acceleration of gravity. You are basically measuring the angle of the stick relative to horizontal and not to the other stick.
 

Thread Starter

Nskeates

Joined Feb 6, 2018
7
Hello

Thanks for the reply. There is just one stick which starts in the vertical position and wish to measure angle from that. Could the accelerometer be programmed to beep at different angles

Thanks Neil
 

philba

Joined Aug 17, 2017
959
Well, yes, but...

Short answer: a microcontroller will do the detecting and beeping.

Slightly longer answer: The accelerometer is just a sensor that reports acceleration on 3 axes - x, y and z. So you get 3 numeric values from it. If the acc is not moving, the three values will be the gravity vectors - added together (vector addition) they will yield 1 G of acceleration. By looking at the values, you can determine the angle relative to horizontal. It's going to take a microcontroller (like an arduino or similar) to decide what to do with the 3 numbers.
 

LesJones

Joined Jan 8, 2017
4,190
You can't program the accelerometer. It is the microcontroller that you connect to it that you program. It could be programmed to bleep at different angles. If you wanted a different bleep for different angles you would need to work out a code so that you could recognise the sequence of bleeps.
Giving more information about the purpose of your device helps members come up with better solutions. For example we do not know if there could be axial rotation of the stick which would have to be taken into account or if this is prevented by it being fixed to the pivot point.

Les.
 
Last edited:

Thread Starter

Nskeates

Joined Feb 6, 2018
7
My 3 children play alot of golf and it would be a really good training aid to be able to connect a device to the shaft of the club and the device bleep at different positions of the backswing. I hope this gives more information.
Thanks Neil
 

LesJones

Joined Jan 8, 2017
4,190
All the methods suggested will only work if the stick is stationary or moving with a constant linear velocity. Angular velocity would also effect the readings. If it is accelerating you would have to compare it's position with some external reference.

Les.
 
Top