Categories

Dear customers!

Currently, product delivery is only available via OMNIVA.
We apologize for any inconvenience caused.

Rotary encoders

Rotary encoders

No reward points for this product.


In stock: 2

00125

3,00 €

3,00 € per gb.

By rotating the rotary encoder can be counted in the positive direction and the reverse direction during rotation of the output pulse frequency, unlike rotary potentiometer counter, which species rotation counts are not limited. With the buttons on the rotary encoder can be reset to its initial state, that starts counting from 0.

How it works: incremental encoder is a displacement of the rotary pulse signal is converted to a series of digital rotary sensors. These pulses are used to control angular displacement. In Eltra angular displacement encoder conversion using a photoelectric scanning principle. Reading system of alternating light transmitting window and the window is not consisting of radial indexing plate (code wheel) rotating basis, while being an infrared light source vertical irradiation light to the code disk image onto the receiving on the surface. Receiver is covered with a diffraction grating, which has the same code disk window width. The receiver's job is to feel the rotation of the disc resulting changes, and change the light into corresponding electrical changes. Then the low-level signals up to a higher level, and generates no interference square pulse, which must be processed by electronic circuits. Reading systems typically employ a differential manner, about the same but the phase difference of the two waveforms different by 180°compared to the signal in order to improve the quality and stability of the output signal. Reading is then the difference between the two signals formed on the basis,thus eliminating the interference

 

int redPin = 2;
int yellowPin = 3;
int greenPin = 4;
int aPin = 6;
int bPin = 7;
int buttonPin = 5;
int state = 0;
int longPeriod = 5000; // Time at green or red
int shortPeriod = 700; // Time period when changing
int targetCount = shortPeriod;
int count = 0;
void setup()
{
pinMode(aPin, INPUT);
pinMode(bPin, INPUT);
pinMode(buttonPin, INPUT);
pinMode(redPin, OUTPUT);
pinMode(yellowPin, OUTPUT);
pinMode(greenPin, OUTPUT);
}
void loop()
{
count++;
if (digitalRead(buttonPin))
{
setLights(HIGH, HIGH, HIGH);
}
else
{
int change = getEncoderTurn();
int newPeriod = longPeriod + (change * 1000);
if (newPeriod >= 1000 && newPeriod <= 10000)
{
longPeriod = newPeriod;
}
if (count > targetCount)
{
setState();
count = 0;
}
}
delay(1);
}
int getEncoderTurn()
{
// return -1, 0, or +1
static int oldA = LOW;
static int oldB = LOW;
int result = 0;
int newA = digitalRead(aPin);
int newB = digitalRead(bPin);
if (newA != oldA || newB != oldB)
{
// something has changed
if (oldA == LOW && newA == HIGH)
{
result = -(oldB * 2 - 1);
}
}
oldA = newA;
oldB = newB;
return result;
}
int setState()
{
if (state == 0)
{
setLights(HIGH, LOW, LOW);
targetCount = longPeriod;
state = 1;
}
else if (state == 1)
{
setLights(HIGH, HIGH, LOW);
targetCount = shortPeriod;
state = 2;
}
else if (state == 2)
{
setLights(LOW, LOW, HIGH);
targetCount = longPeriod;
state = 3;
}
else if (state == 3)
{
setLights(LOW, HIGH, LOW);
targetCount = shortPeriod;
state = 0;
}
}
void setLights(int red, int yellow, int green)
{
digitalWrite(redPin, red);
digitalWrite(yellowPin, yellow);
digitalWrite(greenPin, green);
}

  • Type: Rotary Encoder

Write your review

Rotary encoders

Rotary encoders

Write your review

30 other products in the same category :

Vibration switch module

Vibration...

1,50 €

Tilt switch module

Tilt switch...

1,50 €

Mercury open optical module

Mercury open...

1,50 €

JoyStick (9 pin)

JoyStick (9...

3,90 €

TCRT5000 MOD.3

TCRT5000 MOD.3

3,50 €

Intelligent Car Obstacle Avoidance Sensor Module For Arduino

Intelligent...

4,60 €

HC-SR04 Ultrasonic Distance Measuring Sensor Module for Arduino

HC-SR04...

3,50 €

Light Cup

Light Cup

2,10 €

Triple Axis Compass Magnetometer Sensor (HMC5883L)

Triple Axis...

3,00 €

US-05 Ultrasonic Distance Measuring Sensor Module for Arduino

US-05...

3,00 €

SRF05 Ultrasonic Distance Measuring Sensor Module for Arduino

SRF05...

4,50 €

GY-521 - 3 Axis Analog Gyroscope + Accelerometer MPU-6050

GY-521 - 3...

3,20 €

TCRT5000 MOD.2

TCRT5000 MOD.2

3,50 €

TCRT5000 Sensor tracking (4 channel)

TCRT5000...

5,60 €

GY-50 Three Axis Digital Rate Gyroscope L3G4200D

GY-50 Three...

5,30 €

TCRT5000 MOD.1

TCRT5000 MOD.1

3,50 €

SW-420 Vibration Sensor

SW-420...

1,90 €

3-way tracking module

3-way...

4,70 €

5-way tracking module

5-way...

6,70 €

IR Infrared Slotted Optical Speed Measuring Sensor

IR Infrared...

1,90 €

VL53L0X World smallest Time-o f-Flight (ToF) laser ranging sensor

VL53L0X...

9,20 €

Pressure sensor FSR402 0.5"

Pressure...

12,90 €

SW520D angle sensor module

SW520D angle...

1,90 €

Original Gaode Inductive Proximity Sensor LJ12A3-4-Z/BX

Original...

4,50 €

MPU-9250 Gyroscope+Accelerometer+Magnetometer

MPU-9250...

6,80 €

OptoCoupler - photo interrupter module

OptoCoupler...

2,30 €

Infrared distance sensor GP2Y0A41SK0F 4-30cm

Infrared...

8,90 €

VL53L0X Time-of-Flight (ToF) Laser Ranging Sensor

VL53L0X...

8,80 €

OptoCoupler - photo interrupter module 1

OptoCoupler...

1,80 €

NJK-5002C

NJK-5002C

5,50 €

Cart  

No products

0,00 € Shipping
0,00 € Total

Check out

Kontakti:

Darba laiks: 10.00-13.00 (on working days)

tālr.+371 27474705

E-Mail: robotop.lv@gmail.com

Adress: Rīga, Limbažu iela 1/1