Perhaps this is a silly question, but can I connect a differential quadrature encoder (A, A', B, B') to a decoder for a single-ended quadrature (A, B) by simply leaving the complements (A', B') disconnected?
Perhaps this is a silly question, but can I connect a differential quadrature encoder (A, A', B, B') to a decoder for a single-ended quadrature (A, B) by simply leaving the complements (A', B') disconnected?
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Specifically I was thinking of the quadrature encoder interface of the dsPIC30F.what you mean by decoder?
Should be OK with just A B and common.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
While connecting just the A and B signals is ok in most cases, differential signals are used to minimize the effects of electric noise (inductive coupling, capacitive coupling, etc.) in long electric lines as is usually the case in most machine tools.
I would suggest using a DS9637A Dual Differential Line Receiver next to your PIC. This 8 pin chip turns a differential signal into a single ended one. By using it you minimize the possibility of counting noise pulses as axis position pulses.
The spec sheet can be downloaded here:
https://www.google.com/url?sa=t&rct=...,d.cWc&cad=rja
The chip price should be around USD $2.00 and in actual CNC operation it can prove to be worth using it.
Best of luck.
Normally the power common is what is termed ground or signal common, use either the A & B or the /A & /B pair.
Leave the other two disconnected.
If the drive does not provide the 5v power then when using a separate supply do not take the plus to the drive, just the ground (common).
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
I would only add one thing. You have to take care of the signals out of the encoder and to what inputs you connect them. If you reverse them in an actual system they might end decreasing the count instead of incrementing it and viceversa. In such case just interchange them.
Best of luck.
I will have to try the DS9637A (thanks BBM). I use the SN75157 on all my drives , it its getting hard to find and the DS9637 looks about 1/2 the cost. There is a small difference in pinout though.
If your connecting a single ended encoder to a differential drive, the unused pin needs to be held at 1/2 the supply voltage if it has an internal pullup resistor. You can use a pull down resister the same value as the pullup.
And POStV, on programming the DSPic30F, i've seen some open source code where they used an interrupt that happens every time there is encoder pulse. This really slows down the program. Its better to read the Encoder register with a timer (maybe 1000 times/sec) and just add the accumulated pulse count to your position variable.
There's a problem here with differential encoder outputs which you need to know about. If the differential output conforms to RS422 it may very well not have enough voltage swing to drive the PIC interface. The solution is to use a compatible differential line receiver. I use the DS26LS 31 and DS26LS32A for this.
Cheers
Roger