1

Sin cos encoders are used in motors to determine position and direction of motor. However I am unable to understand its exact working.

Bhargav Vijay
  • 53
  • 1
  • 2
  • 6

2 Answers2

3

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.

Marko Buršič
  • 23,961
  • 2
  • 20
  • 33
  • Perhaps worth noting that the function atan(sin_signal,cos_signal) is required. – Spehro Pefhany Aug 24 '15 at 11:35
  • 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. – floppy380 Jan 31 '17 at 14:48
  • 1
    @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). https://pdfs.semanticscholar.org/f2f0/f977fb31e171c70d0867451ba8b294a699b6.pdf http://www.diegm.uniud.it/petrella/Azionamenti%20Elettrici%20II/Sensori%20e%20trasduttori/Data%20Sheet%20-%20452913422000_sin_encoder.pdf https://www.f07.th-koeln.de/imperia/md/content/personen/krah_jens/pcim2009_schmirgel.pdf – Marko Buršič Jan 31 '17 at 15:10
  • 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. – floppy380 Jan 31 '17 at 15:23
  • @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. – Marko Buršič Jan 31 '17 at 16:30
  • Thanks, Im not so familiar with the differences between digital and analog(sincos) incremental encoders in terms of accuracy. I would be glad if you can comment on this issue Im dealing with. One of the coworker wants to buy a very precise encoder. But they dont want to buy the interface since they are too expensive. Here is what it is about: – floppy380 Jan 31 '17 at 17:38
  • Please see this: http://www.heidenhain.de/fileadmin/pdb/media/img/349529-2G_Rotary_Encoders_en.pdf#page=50 At page 51 there are ERN series. One of them 1V sincos others squarewave. I would go for the square wave because I already have the code for that type. But the person in contact wants to sell the analog output one(ERN180) with 3600 line counts. We need at least %0.1 resolution. Their interfaces are expensive and I doubt I can build an interface for ERN180. I would buy ERN120 with 5000 counts but I think the sales person wants to claim analog output has better accuracy. What do you think? – floppy380 Jan 31 '17 at 17:39
  • I mean since I dont understand the differences yet Im not able to convince my coworker to buy the digital one(ERN120). If we buy the sincos output one(ERN180) I would be in trouble to build an interface. Squarewave output on the other hand easy to handle since I already have a 15ppr mechanical rotary incremental encoder which works fine with a micro-controller even debouncing. I would be so glad to have your comments. – floppy380 Jan 31 '17 at 17:45
  • @doncarlos Sorry for late response: The sin/cos encoders are used in most accuracy demanding CNC machines. It has a resolution of quadrature encoder with digital part + interpolated position between two quadrature pulses with the use of analog part. The major benefit is to have at any moment the exact position, that when is differentiated you get the speed. With quadrature it is tricky to get the speed - you have to switch two methods: frequency measuring and period measuring to get the approximate speed. You can have quadrature encoders of 8000 inc/rev or more, you should tell more about your – Marko Buršič Feb 12 '17 at 18:54
0

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.

Andy aka
  • 456,226
  • 28
  • 367
  • 807