Okay, math heavier. This is going to suck, doing in plain text, but here goes. The arbitrary field strength from a magnet dipole is H~ = (m/4*pi*(R' )^3)(Rhat*2cosX + Xhat*sinX) where H~ is the magnetic field strength vector at the sensor, m is the magnetic moment of the dipole, R' is the magnitude of the distance from the dipole, Rhat is the unit radius vector and Xhat is the unit vector of deflection from the axis of the magnetic field. This is in spherical coordinates; the Yhat vector plays no role since it represents rotation about the magnetic field axis. Classically, X should be theta and Y should be phi, but including those in a plain text e-mail is just asking for trouble. Anyway, in this case, we have a magnet and sensor, between which the distance isn't changing, we can write off the first portion of the RHS, (m/4*pi*(R' )^3), as a constant k. That leaves H~ = k(Rhat*2cosX + Xhat*sinX) The single sensor in this case gives us only magnitude, not direction. So we're really interested in |H~|. Nothing in the magnitude operation is going to alter or remove those two sinusoidal functions, so the resulting measurement will clearly be sinusoidal. The current position along a sinusoid can be fixed if we know magnitude and slope, so the sensor must be both reading the current value and comparing it to prior values to establish the current position. It has to have some help from the user to figure out which direction it's turning, though, because without that info, the sensor won't know if it's gone, say, 10 degrees clockwise versus 350 degrees anti-clockwise. I hope this is clear enough. It's been a while since I did too much of this sort of thing. Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist