Sin cos encoders are used in motors to determine position and direction of motor. However I am unable to understand its exact working.
- 1\$\begingroup\$ The AFAIK more common name is 'rotary encoder' or 'quadrature encoder', and these devices are use to sense the rotation (including direction) of an axis, not the position. Google these terms, read the articles, and come back with anything you still don't understand. \$\endgroup\$Wouter van Ooijen– Wouter van Ooijen2015-08-24 10:40:14 +00:00Commented Aug 24, 2015 at 10:40
- \$\begingroup\$ Sorry my bad. By position I meant rotation i.e clockwise or anticlockwise by relative phases between two waveforms. \$\endgroup\$Bhargav Vijay– Bhargav Vijay2015-08-24 11:16:40 +00:00Commented Aug 24, 2015 at 11:16
- \$\begingroup\$ From your comment you seem to undestand its working quite well? \$\endgroup\$Wouter van Ooijen– Wouter van Ooijen2015-08-24 11:27:39 +00:00Commented Aug 24, 2015 at 11:27
- \$\begingroup\$ Ya I understand now. \$\endgroup\$Bhargav Vijay– Bhargav Vijay2015-08-24 11:28:44 +00:00Commented Aug 24, 2015 at 11:28
2 Answers
It is similar to quadrature encoder with A and B signal that are shifted 90 degress, except that sic/cos outputs a sine and cosine waveform of signal. The electronic part is then splitted in two main circuits:
1. A comparator with hysetersis converts sin and cos signal to quadrature signal and then you have a counter that counts up/downn like those with quadrature encoder.
2. The position in between two quadrature pulses can be determined by calulation of sin and cos signal: tan(phi) = sin(phi)/cos(phi) , therefore phi = atan(sin_signal / cos_signal).
You get a better resolution in between quadrature pulses, very useful when it running at low speed, since the velocity is determined by diferentiating the encoder position. You may soon understand that if signal has low frequency, then you won't get any good value for the speed calculation. That's why sin/cos are better performance.
- \$\begingroup\$ Perhaps worth noting that the function atan(sin_signal,cos_signal) is required. \$\endgroup\$Spehro 'speff' Pefhany– Spehro 'speff' Pefhany2015-08-24 11:35:42 +00:00Commented Aug 24, 2015 at 11:35
- \$\begingroup\$ Can you explain the second part a bit in detail? I cannot find any information about how it works. I can see first circuit can be made from two schmitt triggers which converts the sine to pulses. But I don't get what the 2. part do. Is that processing sines or pulses. Are those formulas instantaneous values of the voltages? Im totally confused. I have a uC code which works fine for mechanical pulse output rotary encoders. But I dont understand the logic of the sin cos encoders. \$\endgroup\$floppy380– floppy3802017-01-31 14:48:05 +00:00Commented Jan 31, 2017 at 14:48
- 1\$\begingroup\$ @doncarlos It is a similar DSP approach as used for resolver evaluation. The second part is evaluating sine waves, therefore high speed ADC. You will find useful information searching for keywords: Angle Tracking Observer (ATO). pdfs.semanticscholar.org/f2f0/… diegm.uniud.it/petrella/Azionamenti%20Elettrici%20II/… f07.th-koeln.de/imperia/md/content/personen/krah_jens/… \$\endgroup\$Marko Buršič– Marko Buršič2017-01-31 15:10:06 +00:00Commented Jan 31, 2017 at 15:10
- \$\begingroup\$ First of all thanks for the quick answer. But OMG if Im not wrong this requires high speed DSP?I thought this could be done by a microcontroller such as avr 328p as in Arduino. Maybe I should consider not using these. I was planning to make an interface for this type of sincos encoder. Do you think think two comparators and a microcontroller(without a DSP unit or FPGA) would be enough? This looks like more complicated thank I thought. \$\endgroup\$floppy380– floppy3802017-01-31 15:23:01 +00:00Commented Jan 31, 2017 at 15:23
- \$\begingroup\$ @doncarlos You can evaluate the sin/cos encoder as quadrature, if you put comparators (like schmitt trigger), but the you loose the the interpolated mid position between two quadrature pulses. Why you don't simply use a quadrature encoder, which is cheaper and has comparators already embedded. Otherwise, you would need a DSP or FPGA with analog front end, that is used only for sin/cos evaluation. This device then sends data to the master controller. \$\endgroup\$Marko Buršič– Marko Buršič2017-01-31 16:30:24 +00:00Commented Jan 31, 2017 at 16:30
They have two outputs. One output represents the angular position of the encoder's shaft relative to the 0 deg datum point and the other represents the angular position of the shaft relative to 90 deg from the datum point. The outputs follow a sine relationship mathematically in that 0 degrees gives zero and 90 (-90) degrees gives a +maximum (-maximum).
There output values for sin and cos outputs are unique for any angular position. From this information, the direction can be determined providing the measurement system is quick enough.
- 1\$\begingroup\$ That's how resolver works, sin/cos is much similar to incremental quadrature encoder. \$\endgroup\$Marko Buršič– Marko Buršič2015-08-24 10:47:04 +00:00Commented Aug 24, 2015 at 10:47