> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of James Newtons Massmind > Sent: Thursday, February 17, 2005 1:27 PM > To: 'Microcontroller discussion list - Public.' > Subject: RE: [EE] Low cost encoder. Is it a compass? > > > Yep, that fried my brain... But I'm very interested in this... > > Does "unit radius vector" (Rhat) mean the distance from the magnet to the > hall effect sensor? > > Xhat is then the value we want to solve for? No, it must be X we are > interested in. So I don't understand what "unit vector of deflection from > the axis of the magnetic field" means. Help? > > Once I understand the math a bit better I can start the hell of trying to > solve for X and convert it into code. > > The need for the slope could be removed by having another sensor at 90' to > the first? > > Aside from being slightly less than human with regard to math (RAH says > "people who don't understand at lease calculus are at best > sub-human") I'm > also pretty clueless on analog electronics. > > Does anyone have a schematic for connecting a hall effect sensor > to a PIC in > such a way that the reading is available as an analog value? All > I can find > are go/no-go sort of interfaces where the sensor is being used to count > pulses. > > > --- > James. > > > > > -----Original Message----- > > From: piclist-bounces@mit.edu > > [mailto:piclist-bounces@mit.edu] On Behalf Of Mike Hord > > Sent: 2005 Feb 17, Thu 07:34 > > To: Microcontroller discussion list - Public. > > Subject: Re: [EE] Low cost encoder. Is it a compass? > > > > 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 > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist