The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: John Woodgate
Subject: Re: Arctangent computation.
Date: Fri, 15 Nov 2002 21:56:39 +0000
Organization: JMWA Electronics Consultancy
Reply-To: John Woodgate
NNTP-Posting-Date: Fri, 15 Nov 2002 22:26:19 +0000 (UTC)
X-Newsreader: Turnpike (32) Version 4.01 <5Z8C9wtxbnpWyFnyfFzqmVF739>
I read in sci.electronics.design that Dan
wrote (in <firstname.lastname@example.org>) about 'Arctangent
computation.', on Fri, 15 Nov 2002:
>I have a shaft position encoder that generates Sin and Cos signals, i
>need to display the shaft's angular position in degrees using an
>I need an analog circuit that will compute the arctangent of the
>quotient of the Sin and Cos magnitudes.
>Angular position = arctan sin/cos.
>The Sin and Cos magnitudes have a +5V to -5V excursion.
There are a number of ways to do this. It would be a good thing to avoid
the division if you look for an analogue solution, and that is possible.
Logarithmic division isn't practicable AFAIK because the sin and cos
functions can take zero as a value.
Start with the sin output and 'full-wave rectify' it to get |sin theta|.
You can make a non-linear converter with an op-amp and diodes that will
do the arcsin conversion for one quadrant (in which arcsin is single-
valued) but you don't know which quadrant theta is in. You can find that
by determining the polarities of the sin and cos outputs and using a
simple table, and then use simple logic gates or comparators, and
analogue switches, to offset the arcsin output into the right quadrant:
(Use Courier font)
sin cos quadrant
+ + 1
+ - 2
- - 3
- + 4
Regards, John Woodgate, OOO - Own Opinions Only. http://www.jmwa.demon.co.uk
Interested in professional sound reinforcement and distribution? Then go to
PLEASE do NOT copy news posts to me by E-MAIL!
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup