Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [rotary-encoder]

An electro-mechanical device for detecting angular position and/or motion.

Filter by
Sorted by
Tagged with
0 votes
1 answer
361 views

Incremental Rotary Encoder sends data when shaft is untouched

I'm trying to build an Arduino project that counts pulses sent by an encoder. I've bought an Omron E6B2-CWZ5B-2 2000P/R and face the issue of it sending pulses non-stop, even when I'm not touching it. ...
Do I Care's user avatar
0 votes
0 answers
102 views

Make encoder work together with OLED display in Arduino Nano Every

I tried to sketch code to make an encoder to generate a number by each step and show it on OLED display. The OLED will connect with I2C, working on in Arduino Nano Every ATmega4809. I separately made ...
Tanwa Kankang's user avatar
0 votes
1 answer
91 views

Not registering complete rotary encoder input

I am working on a project using a Rotary Encoder and I am trying to recieve the output from the encoder. As it stands I am able to get a count for degrees of change and direction of rotation, however ...
Shai Morrison's user avatar
4 votes
0 answers
255 views

Rotary Encoder with interrupts - erratic behaviour

I'm trying to change my working rotary encoder code (stolen from here) to an interrupt-based code on my Mega2560. The trouble is that the result behaves very erratically, even though the physical ...
Malibu's user avatar
  • 41
2 votes
2 answers
123 views

Encoder giving value between steps

I'm trying to interface an encoder and a 1602 i2c display. My encoder seems to be giving an output between steps. I have tried to make my code as simple as possible and am outputting whether the ...
John Engelman's user avatar
2 votes
0 answers
114 views

What wrong with my Arduino code?

I have a rotary encoder (ppr = 600) and I want to write code to achieve the implementation to read current angle and direction. Here is my code. I think it is correct but it donot have any output on ...
Jie's user avatar
  • 29
1 vote
0 answers
327 views

Motor encoder and interrupts

I'm trying to write motor controller for automated blinds using Raspberry Pi Pico with arduino-pico. My problem is that I can't seem to get a consistent result from motor encoders. In my setup ...
Leonti's user avatar
  • 133
0 votes
1 answer
77 views

ATTiny88 missing pulses - maybe

I have been given to understand the ATTiny88 is very similar to the Arduino Uno / ATMega328 MCU. There does not seem to be a tag for the ATTiny88, so that is why I chose the tags I did. I do not ...
Leslie Rhorer's user avatar
2 votes
1 answer
685 views

Change Interrupts on the ATTiny 88

I am working on a project that requires a number of I/O pins for various purposes. I chose the ATTiny88 because it has plenty of GPIO pins, and is relatively inexpensive. Here is the updated code per ...
Leslie Rhorer's user avatar
1 vote
2 answers
603 views

Rotary encoder weird values

I am trying to understand this rotary encoder I have, but it makes no sense to me. I am using this rotary encoder: https://www.amazon.com/gp/product/B07DM2YMT4/ CYT1100 aka CY110 aka EC11 I am using ...
John's user avatar
  • 123
-2 votes
1 answer
228 views

I want a Rotary Encoder to make 10 steps at once, but my code isn't working. What am I doing wrong?

I'm using a rotary encoder on my Arduino Micro, that is supposed to do single steps or ten steps at once, depending on which position a switch is in. The Rotary: https://www.reichelt.de/...
Chritzeltopf's user avatar
0 votes
1 answer
169 views

Setup Due counter

How do I setup a Due to count rising edges on a pin automatically without having to waste time on an ISR? I have some wheel encoders, the simplist implementation is direction less where you only count ...
FourierFlux's user avatar
0 votes
1 answer
197 views

Multi turn potentiometer are a pain should I use a incremental encoder instead?

I built a robotic arm, the problem is I want to rotate the base more than once in order to complete a job, so I figured out I could use multi turn potentiometer. The problem I am facing is the ...
Ritesh Sharma's user avatar
0 votes
1 answer
61 views

Unable to get readings for "Motor with Encoder"

I've posted to the DFRobot forum, who makes the FIT0186 motors, but no one seems to be replying there. So, excuse the copy pasting. It's probably an issue with the motor/encoder, but perhaps it has ...
djb's user avatar
  • 103
0 votes
1 answer
130 views

Artefacts on display when adding seemingly unrelated code

I have this simple program, where I am implementing a menu structure on an OLED display and a rotary encoder. The code works functionally as intended, however when I add more menu items, then I get ...
Thomas Hirsch's user avatar
0 votes
1 answer
178 views

Arduino DUE wheel encoder

I have an Arduino due, I am trying to keep track of ticks on two wheel encoders, polling in an infinite loop results in terrible performance. Have any suggestions? It looks like the due might have an ...
FourierFlux's user avatar
1 vote
0 answers
59 views

Click counter using SparkFun Qwiic Twist

I wrote the script below in order to count the number of times that I press the SparkFun Qwiic Twist. But when I press the button, I get series of running numbers on the Serial Monitor and not a ...
user2788464's user avatar
1 vote
2 answers
428 views

unexpected behaviour of encoder with increasing rpm

I am using a DC motor with encoder, and I am trying to calculate how many pulses are recorded in every one second interval. (note that the power source is of 12V for the motor) Circuit and code: int ...
satan 29's user avatar
  • 169
-1 votes
2 answers
128 views

Basic doubt regarding encoders with Arduino

I created a program that measures the pulses set out by the encoder (part of the dc motor with encoder inbuilt), and uses the ppr value (pulses per rotation) to calculate the rotations per minute (rpm)...
satan 29's user avatar
  • 169
1 vote
0 answers
248 views

I'm making a trim wheel using a rotary encoder for flight simulation. Should I have the Joystick library use button presses or make it an axis?

Title says the majority of it. I'm looking to make a trim wheel for flight sim using a rotary encoder, the Joystick library and an Arduino Leonardo. I wasn't sure if it would be better to make it a ...
Pierce Jennings's user avatar
1 vote
1 answer
218 views

BLDC geared motor with encoder - How to wire the encoder? (6 wires)

I am quite a newbie to Arduino and currently stuck with an encoder. I have a BLDC geared motor with encoder, all I want to do is to get values from the encoder. There are 6 wires: out A, out B, out Z, ...
3XBULL's user avatar
  • 13
-1 votes
1 answer
176 views

Using a Encoder Feedback to control a 360 degree servo

I pieced together a sketch to control a servo that turns an encoder. Eventually I plan to build this up to a DMX input, so I have the input range from 0 - 255. Basically, it's supposed to ask you to ...
MattS's user avatar
  • 1
0 votes
1 answer
134 views

How to put together an HKT30 optical rotary encoder?

I'm working on a project involving stepper motors. It is important for this project to track the position of these motors, so I decided to buy an optical rotary encoder, specifically an HKT30(HKT3005-...
jimmyfinestein's user avatar
2 votes
2 answers
2k views

Most precise way to measure linear distance travelled by a wheel

Suppose a bot with wheels is traveling in a a straight line, and we want to measure this linear distance traversed by it as accurately as possible. One of the ways is to use an optical encoder to ...
karnyrocks's user avatar
1 vote
1 answer
204 views

How do I control a conveyor to start and stop in same location using optical rotary encoder

I am a complete novice at arduino. I just want to know if this is possible before I start investing in components. I need to start and stop a chain drive conveyor {can't slip} powered by a 12 volt ...
Duane G Holstege's user avatar
1 vote
0 answers
634 views

TFT menu system sometimes doesn't refresh the screen properly

I have a project in which I control a display using an Arduino Due microcontroller. The user can navigate on the TFT display (RA8875 driver ic) with a rotary enconder/pushbutton. The display shows a ...
Sven Onderbeke's user avatar
1 vote
2 answers
1k views

Read encoder output by using an optocoupler

I have a 512 pulses encoder with four wires: +5V, ChannelA, ChannelB, GND and I'm using it as feedback for my motor position (max 80 RPM) on Arduino UNO. Everything works fine, but I need also to ...
Marcus Barnet's user avatar
1 vote
1 answer
103 views

Saving a value with a click

I have a rotary encoder and 2 buttons to a. Store the encoder value b. Reset the encoder value to 0. The reset buttons work fine the issue is with the set/store button. Where the value changes without ...
Kashish Sharma's user avatar
1 vote
0 answers
138 views

Help with code not working

I built a button box, everything is wired up and all of the push buttons work using the code below, but for some reason my rotary encoders are not working, well 3 out of the 4 are not working. Is ...
Nc Bean's user avatar
  • 11
0 votes
0 answers
164 views

Different Counter Reading on Serial Monitor Vs .96" OLED I2C

I've cobbled some code together from reading multiple sources on the web. Makeatronics in particular to help me get this rotary encoder code together (shout out to them). I'm pretty close to the end,...
Jeremy Gardner's user avatar
2 votes
1 answer
143 views

Is it possible to get which pin generated interrupt?

I wrote some code that handles rotary encoder using an interrupt, but I would like to get which pin generated the interrupt, so I'll be able to handle many interrupts in a single method. Something ...
user avatar
0 votes
2 answers
823 views

Problem with interrupts and 4x encoders on Nano 33 BLE

I have a Pololu 4x encoder and am trying to write some code to make it work on my Nano 33 BLE. (Interestingly enough, the issue preventing some pre-existing libraries from working for me is the same ...
GreatHam's user avatar
  • 131
1 vote
0 answers
47 views

Regarding Geared motor encoders

I wrote a simple code to count the number of pulses when the motor runs. The code just counts the number of interrupts from the encoder, but the output is very weird. Even when the motor is not ...
Akshat Chopra's user avatar
1 vote
0 answers
2k views

Using digital rotary encoders for HID input using the Joystick library

I have been working on a small switch panel for flight sims, but I wanted to use the CYT1100 Digital Rotary encoders to move instruments in-game. I have the code set up to press a certain joystick ...
Jacob C's user avatar
  • 11
0 votes
2 answers
252 views

Will an Arduino Uno be able to read 3x incremental encoders?

Encoders are quadrature 600ppr encoders with X2 counting. Therefore 1200 counts per revolution for each encoder. Is there an edge rate limit? I currently have one encoder hooked up using code with ...
Bricen Rasmussen's user avatar
0 votes
1 answer
2k views

real-time reading of a quadrature encoder at full resolution with only one interrupt on ATmega328

I want to read a quadrature rotary encoders at full resolution with only one interrupt on Arduino Nano (ATmega328). So I found out that we can use XOR to reach a full resolution: Where pin 3 ...
Foad's user avatar
  • 143
1 vote
1 answer
3k views

KY-040 rotary encoder skipping steps

Yesterday I asked a question about de-bouncing this rotary encoder and Jsotola suggested that I should use a method like This to detect the previous state and then do the counting. using that method ...
ElectronSurf's user avatar
-1 votes
1 answer
601 views

counting revolution of incremental encoder

I'm doing a project which requires me to use an faulhaber encoder,and the one i have is a 2channel 16lines per revolution. I haven't worked with encoders before and based on what i found the lines per ...
masut's user avatar
  • 7
1 vote
0 answers
377 views

Rotary Encoder gives "wrong" patterns?

I am trying to learn how to use a Rotary Encoder together with an LCD display where I can use the encoder to choose Letters that will be printed in the LCD. This is the kind of result I should be ...
Kian's user avatar
  • 11
1 vote
0 answers
293 views

Best approaches to reading a high-count quadrature encoder?

I have a 24v servo motor coupled to a 2,000 segment optical encoder that runs on 5v. That's 2,000 "ticks" per revolution at it's base resolution. (Full quad reading allows 8,000 ticks per revolution, ...
111936's user avatar
  • 19
0 votes
2 answers
890 views

Undocumented industrial servo with 8-wire encoder: how to read this encoder?

I have scavenged an industrial servo with its attached ballscrew linear actuator from an old large format scanner, and I am trying to figure out how to make a 'servo drive' aka 'servo driver' aka '...
111936's user avatar
  • 19
0 votes
1 answer
732 views

Forward kinematics of a differential drive robot

I've been braking my head over this for the past few days and can't make it work.. So, I have a small robot with a rotary encoder on each wheel and i want to track its position (in x and y) on a flat ...
PotatoMan's user avatar
-2 votes
1 answer
685 views

How do you determine Lead Screw position using Absolute Encoder?

I need to control the position of a lead Screw Stepper motor using EMS22A Absolute Encoder? I've seen James Bruton do this in his video. can anyone help me? James Bruton Video: https://www.youtube....
Julius's user avatar
  • 91
2 votes
0 answers
2k views

read with Arduino SSI encoder signal

I'm stuck in my project, I try to read an absolute encoders angular position with my Arduino. I used and cabled a differential line receiver and driver between Arduino and the encoder, like explained ...
ian's user avatar
  • 21
1 vote
1 answer
2k views

Rotary encoder using interrupt

This is my first time working with a rotary encoder and interrupts. I am using a Pro Micro which has interrupt pins at pin0 and pin1. The code below works as expected. My question: do I need to use ...
user avatar
1 vote
0 answers
417 views

High speed rotary encoder with Arduino MEGA

I'm trying to develop length measuring system and I'm using a industrial rotary encoder as the sensor. A have decided to use an Arduino external interrupt for connect the encoder. But, Encoder will ...
user119o's user avatar
  • 225
2 votes
1 answer
161 views

Unexplainable int behavior in encoder/LED project

I am trying to use a rotary encoder to cycle through the brightest versions of R, G & B. And it works! Red goes to blue just fine. Then G happens. For some reason, the int for green goes ...
laffan's user avatar
  • 25
0 votes
2 answers
53 views

Encoder coupled with motor shaft.Encoder is giving larger redings than expected

I am a rookie and i dont have much experience on arduino. please help me. I intend to build a robot that will drive on a straight path even on nonuniform surfaces like the ones we see in agricultural ...
Gautam Vikhe's user avatar
0 votes
1 answer
103 views

How to add numbers to a position when controlling a seven-segment display

I'm recently having a hard time with my Arduino project. I'm trying to control a seven-segment display (it has a microcontroller on it) with an encoder, and I'm trying so that everytime I rotate the ...
OmerFlame's user avatar
1 vote
2 answers
684 views

How to sample incoming 600khz pin and divide it by 4 and generate low frequency signal at output pin of arduino

I am trying to divide a incoming high frequency signal 600kHz by 4 and output wave at arduino MEGA2560 digital pin. The input to arduino comes from incremental Encoder which is connected to motor ...
Vishal777's user avatar