Encoders measure position with various types of sensors.


Rotary encoder, converts rotary position to electronic signals
Linear encoder, converts linear position to electronic signals
Absolute encoder
Incremental encoder, converts position changes to electronic signals in real time

Rotary Encoder

Picture
HS Quad Encoder

There are many different types of encoders.

cheap quad
cheap quad
Speed Sensor
Speed Sensor

 

 

 

 

 

 

By definition:

An encoder is a device, circuit, transducer, software program, algorithm or person that converts information from one format or code to another, for the purpose of standardization, speed or compression.

All closed loop systems require an output and a feedback.

Here were are going to show how to use rotary encoders.

Most rotary encoders can be defined as a Speed or Quadrature Encoders.

A speed sensor simply detects a block/no block single to count. NO position change is verified.

A quadrature encoder uses 2 sensors out of phase by 90 degrees to both detect a position change with a verifiable direction.

Both will work with the same program.

For the speed just connect one signal to pin3 ( UNO ).

For the quadrature connect the A/B to pins 2 & 3.

Reversing the connections will just change the direction as count up or down.

An additional GND reset button to Pin 0 is added.

Both the speed sensor and HS Rotary encoder work fine directly connected to the Arduino.

LPD3806-600BM-G5-24C

Operating voltage: DC5-24V

Wiring:

green=A phase, pin 2

white=B phase , pin 3

red=Vcc positive supply,

black=GND

 

 

The cheap rotary quad encoder has internal resistors, but needs additional de-bounce circuitry :

DT - Encoder Pin B #3

CLK - Encoder Pin A #2

SW – PB Switch NOT USED

De-bounce circuit
De-bounce circuit

 

Tutorials

Here are some helpful tutorials on some the systems available with Scada123 to try on your own.

You can view videos at:     Youtube Channel Scada LLC

Sort through Topics on the left Menu "Tutorial Menu"

Click on one the Topic Tags that interest you.

License : All programs in the tutorial section are free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.