PDA

View Full Version : Encoder Signal to PC



antsals
25-04-2011, 12:16 PM
I'm after a little help.

I want to be able to connect either a rotary encoder or a linear encoder to a PC. I want to use the signal and convert it on the PC to a mm size. I little like DRO but I want to intergrate into a small bit of self programmed software. My preference is to mount the module on a DIN rail but I can sort all that out. First problem is finding a module that can convert the encoder signal to the PC.

Any help would be good,
Cheers
Ant

djc
25-04-2011, 07:15 PM
I want to be able to connect either a rotary encoder or a linear encoder to a PC.

Which one - linear or rotary? Different animals and different problems. The output from a rotary encoder will give you an angular not a linear measurement - the angular measurement being a proportion of a revolution.

If the encoder is attached to a leadscrew, it's easy as one revolution moves one leadscrew pitch. Any other way, you need to convert linear motion into rotary (e.g. rack and pinion).


I want to use the signal and convert it on the PC to a mm size.

How do you intend to get the signal into the PC? Serial port, parallel port, USB, ESP? What operating system? Can you do the programming at the PC end?

Most rotary encoders give a quadrature signal. The higher end linear encoders have a similar signal. This signal is easy to decode using a microcontroller (e.g. AVR, PIC, Arduino) to count pulses (either very fast by polling or interrupt-driven). The controller can then send to the PC using a standard communications protocol.

Cheaper linear encoders (i.e. Chinese scales) have a different protocol, but it has been documented in many places. Search for YADRO or Schumatech.

antsals
26-04-2011, 12:31 AM
Thanks for the reply,
The design could use a linear or rotary encoder no problem. My first problem was sorting out if it's possible and why kit to use. If the linear encoder is easiest then that will be the option. How I'm going to get the signal into the pc is now the issue. I did wonder I I could get a ready made module that converted the signal to USB or com port? How would this be done in industry? Would the signal go straight into a PLC?

Cheers,
Ant

Gary
26-04-2011, 08:58 AM
Thanks for the reply,
The design could use a linear or rotary encoder no problem. My first problem was sorting out if it's possible and why kit to use. If the linear encoder is easiest then that will be the option. How I'm going to get the signal into the pc is now the issue. I did wonder I I could get a ready made module that converted the signal to USB or com port? How would this be done in industry? Would the signal go straight into a PLC?

Cheers,
Ant

What about this?

http://usdigital.com/products/interfaces/pc/usb/qsb

antsals
26-04-2011, 09:13 AM
Gary,
That looks the job that I'm after. Do you know if I can order direct from them or do you order bits from them and I can get this from you?

Cheers
Ant

Gary
26-04-2011, 11:26 AM
We dont order from then, so best to go direct.
I used to use them a lot and never had a problem with them.

antsals
26-04-2011, 11:49 AM
Gary,
Will your encoders work with the USB if my linear encoder doesn't?

Cheers
Ant