electronics techy question sin and cos outputs, decoding

Joined
12 Aug 2007
Messages
2,008
Location
Currently La Coruna Spain
Visit site
Has any leccy techy got any detailed info on decoding a position sensor, ie wind direction for one, withich outpts Sin and Cos values. probably via a to d´s and then definitely using a pic micro. just hte theory would be good.
it is for a project relating to the earlier seatalk stuff and other uses for fluxgate compass units with sin cos output too.
Many thanks
Joe,
 
I don't know much about this except I have an idea there have been dedicated converter chips made for this. You could try google for same.
It has probably been superceded by straight digital. good luck olewill
 
Interesting that you ask. I've just started a similar project myself, having recovered an intact masthead speed/direction unit from the boatyard skip. I powered it up the other day and got outputs similar to those you're describing. I'll PM you.

Richard
 
Do you want information on the electronics and how to sample a signal, or how to extra wind information from the sampled signal. If the latter, have you tried asking the manufacturer.
 
Hi

I think the device in question is known as a "resolver". http://www.amci.com/tutorials/tutorials-what-is-resolver.asp

A quick search on Goole, found this interesting document
http://www.polysci.com/docs/synchrohandbook020405.pdf

As for how to do this, I gave up working in electronics design some years ago, but I reckon the general idea is something like this (for the "rotor primary" option,)

- (x) is the shaft angular position
- resolver provides two analogue signals representing sin(x) and cos(x)
- you need to divide these to get tan(x)
- you can then implement arctan(x) to get (x)
- then do what you want with (x)

Analogue division is complex, so this should be implemented digitally. But remember that tax(x) is not continuous as a function so tan(90deg) is infinite. So you'd need to remember to allow for that in the s/w.

How about
- sample the sin(x) signal, D/A and buffer
- sample the cos(x) signal, D/A and buffer
- read the buffers and execute a divide function on the data
- either output the tan(x) value, or output the arctan(x) value. For the latter you need to be able either to calculate arctan (e.g. Taylor series), or the easy and quick way would be to get this from a pre-populated look-up table.
- any filtering could be applied in the digital domain, for example damping

As for sampling, if the input signals are slowly changing (e.g. wind direction), you may be able to perform a sample & hold on sin(x) and then a sample & hold on cos(x) and then read these in sequentially and divide. Whether you can do this sufficiently quickly will depend on processing capacity available. The reason I mention this is that you could use a PIC with an inbuilt A/D converter, simplifying design.
 
Top