Cómo funciona un codificador y la información de retorno que proporciona
Serie de aprendizaje: Introducción a los codificadores
Parte 1: Cómo funciona un codificador y la información de retorno que proporciona
3,5 minutos de lectura
If you’ve read enough about encoders online, you’ll quickly notice things go vague, and any helpful information gets blurred or unpublished. The information is often contradictory, and after reading several sources, you’re left with more questions than answers.
No more blog hopping to find the information you need. This learning series is straightforward. Leaving out the nonsense and only giving practical advice. Continue reading as we explain how an encoder works and the feedback information it provides.
Lo que aprenderá
Cómo calcula un codificador:
- Distancia
- Velocidad
- Dirección
¿Cómo funciona un codificador?
An encoder is a feedback device that converts a shaft’s rotary or linear motion into an analog or digital output signal. We can use the signals to identify speed, direction, and distance.
Uso de la resolución del codificador para calcular la distancia
Think of an encoder disc as a measuring instrument. Much like a ruler, it is marked with exact segments, known as windows. The accuracy determines the quantity of these windows and is called encoder resolution. These windows are placed in two channels: Channel A and Channel B. Both channels have an equal number of windows, each matching the resolution.
Cada ventana producirá un pulso de tensión cuando el disco del codificador se desplace entre dos componentes electrónicos. Cada pulso es un incremento correspondiente a la resolución definida.
Términos de resolución del codificador
La resolución puede oscilar entre las decenas de años y los miles de años.
- Pulsos por revolución (PPR)
- Recuento por rotación (CPR)
The light-emitting diode produces light, whereas the phototransistor receives light. When the LED's light beam connects with the photoreceiver, the electrical current moves into the encoder's electronic circuitry. This connection produces a pulse of voltage.
Como las ventanas están colocadas a distancias tan precisas entre sí, el usuario puede obtener mediciones precisas de la distancia contando los impulsos de tensión generados.
Cómo calcular la velocidad del disco codificador
Hay dos maneras de determinar la velocidad cuando se trabaja con un codificador. La opción #1 sólo está disponible cuando el encoder tiene un canal Z. Si trabajas con un encoder sin canal Z - utiliza la opción #2.
Opción 1
The Z channel has a single window, producing a single voltage pulse with each encoder revolution. The greater the number of Z pulses, the greater the speed.
The pulse can be scaled in various ways, such as revolutions per minute (RPM) or inches per second (IPS). The speed annotation depends on the encoder application's requirements and specifications.
Opción 2
Since we know that a specific number of pulses are produced with every encoder revolution, we can work backward and use the pulse count to indicate speed.
If an encoder produces 100 PPR, we know that 100 pulses equal one revolution. With this information, we can determine the encoder speed. For example, an encoder that has operated for one minute has produced 100,000 pulses, which indicates that it is rotating at 1000 RPM.
Uso del desplazamiento de canales para determinar la dirección
Note: Method only works when working with quadrature encoders
Las ventanas que componen el canal A están desfasadas de las que componen el canal B. Este ligero desfase entre los dos canales nos proporciona una forma sencilla pero fiable de determinar la dirección del movimiento del codificador.
When moving the encoder disc, one channel produces a pulse before another. The terms used to describe this are leading and lagging. One channel either leads or lags the other.
If A leads B, the encoder disc rotates clockwise. If B leads A, the disk rotates counterclockwise.
A continuación...
We’ve covered how an encoder works and the feedback information it provides. Part 2 will widen your knowledge of rotary encoders. Learn the similarities and differences between incremental and absolute encoders.