SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By fkatzenb
#154984
Morning!
Before I buy some components, I figured some arm chair engineering is in order to determine feasibility. It is mean to be a control ring that is environmentally sealed.

1. I have an aluminum sealed pipe that is around 2.5" in diameter with a centrally 3-axis of magnetic/compass sensor(s).
2. I have an aluminum sleeve around the pipe which can freely rotate around the tube (X and Y axis) and can move along the pipe by 1.5" (in the Z axis )(-0.75" to 0.75"). There is some dimpling and a spring loaded ball to provide between the sleeve and the pipe to lock in positions.
3. I have a N42 NIB magnet (3/16" dia. x 1/8" thick) located at 0 degrees and the middle of the sleeve. It should provide an appropriate level of gauss that won't saturate the sensor but be on the upper limit of the sensor.
4. I have redundant reed switches located at 0 degrees and -0.75" position to electrically turn off all of my circuits when the sleeve is moved to that position.

The concern I have is the minimum determinable angle that this setup can give me without yet building this. I am sure rotating the sleeve along the plane at 0" will give me good results (X and Y axis), but how well will it provide rotational measurements when the sleeve is at 0.75" in the Z axis? Also how well will the Z axis work when the sleeve is at 90 and 270 degrees? Does it need to be a four axis mag sesnsor?

Thanks,
Frank
User avatar
By elevator4
#155014
Frank,
assuming your sensors are able to resolve both field polarities, two (X and Y) would suffice. Imagine rotating the sleeve through 360 egrees: The X sensor will give you a reading proportional to cos(angle), while the Y will give you sin(angle). by these two measures (the relation between the two) you find the angle from 0 to 360. Work it out with quadrants first :) Since you work with a relation, the absolute magnitude of the two signals is not important any more, ie the result remains meaningful for any (reasonable) displacement in Z.
Hope this helps,
-A
By fkatzenb
#155137
This does help. I guess my question also stems from the fact that I have never used these sensors to know if the resolve appropriately to do this. I was looking at https://www.sparkfun.com/products/244. I still don't think I would an adequate Z measurement at any rotational degree because as Chris demonstrates in some video, these sensors don't work when you are perpendicular.
User avatar
By elevator4
#155171
Hi,
I assumed the magnet was never going to be 100% perpendicular.
You can also do it with discrete components: An LC relaxation oscillator, frequency changes with field force. At any rate, at some point I'd do some real-hardware testing.
Check these out (unfortunately, "coming soon"): http://www.allegromicro.com/en/Products ... r-ICs.aspx
-E
By Mee_n_Mac
#155189
The question to me is how divergent are the field lines going to be, either due the proximity of the magnet to the sensor or the effect of the AL. If all the field lines impinging on the sensor are parallel at the closest distance, then you should be OK. Otherwise you may find the readings change with distance from magnet to sensor. I don't know how you'd tell ahead of time. Perhaps a less detailed, precise mechanical version can be done ahead of time to see ? A couple of paper tubes with the sensor and magnet in the same relative locations ?
By fkatzenb
#155776
Well it looks like it won't work after doing some more studying. The field lines just don't intersect properly when moving in the ring along the top in the Z axis. As a result, I was about to call of the project, however I have a different solution.

I will continue to use a standard 2 axis mag/compass sensor for rotation. I am going to use 8 hall effect sensors (non-switching, linear output) positioned in a string of four along the Z-axis facing 0 degrees and a strong of four along the Z-axis facing 90 degrees. Since I will still have the angular rotation from the mag/compass sensor, this will only help to reduce the uncertainty in the measurement due to noise, etc, since I already know the angle.

This may be enough for me to do a prototype now to determine real world accuracy and and angular and linear resolution.

Thoughts?

Now I just need to find the right sensors and magnetic combination that fits the size of the ring and the doesn't saturate sensors.
User avatar
By elevator4
#155805
fkatzenb wrote: Thoughts?
You know, I completely misread your OP. I thought you were interested in angular position only, regardless of any Z displacement. :doh: (thinking...)
By fkatzenb
#155839
Ahh, gotcha. That makes a bit more sense now.

Here is what I am confident of:

1. A two axis compass will read any angular position regardless of Z displacement since the distance in Z is just -0.75 to +0.75 and the field lines should be strong enough to still intersect and energize.
2. Using a third/forth axis compass module will not detect a change in Z because the field lines would be out of plane when not at angle 0.
3. Add linear hall effect sensors to triangulate the Z axis by using voltage signal strength of the sensors of the nearest two in that phase. I may change the layout scheme such that it is 3 groups of 3 instead of 4 groups of 2 because off axis measurements may not be adequate. If spaced appropriately, I should be able to get 5 linear positions.