We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [rotary-encoder]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
84 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 ...
1
vote
1answer
91 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 ...
-1
votes
1answer
29 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 ...
0
votes
0answers
165 views

ESP8266 rotary encoder ISR not in IRAM

I am trying to connecting rotary incremental encoder with NodeMCU Lua V3, ESP8266, CH340G. This tutorial is what I want to do https://www.youtube.com/watch?v=Y6BjnfwfzKE but here is the warning ...
0
votes
0answers
37 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 ...
0
votes
0answers
30 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, ...
0
votes
1answer
58 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 '...
0
votes
1answer
47 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 ...
-2
votes
1answer
65 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....
0
votes
0answers
17 views

Why is my quadrature encoder writing as irregular intervals in serial monitor after working fine?

I'll try to keep this brief and add code/output at the bottom. I am using an Arduino Uno with a Pololu motor shield and two Pololu motors. I am driving speed control using the encoders at the ends of ...
1
vote
0answers
124 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 ...
0
votes
1answer
72 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 ...
0
votes
0answers
104 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 ...
1
vote
1answer
79 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 ...
0
votes
2answers
23 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 ...
0
votes
1answer
22 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 ...
0
votes
2answers
78 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 ...
0
votes
0answers
59 views

More than 3 SPI devices read by a single arduino

I've been working on a project that involves SSI Rotary Encoders from CUI. They are being read through the SPI interface, and I am bit-shifting appropriately to account for the differences between SSI ...
1
vote
0answers
29 views

How can I get the count of pulses of two encoders on the serial monitor?

I have two encoders; I connected them to pin 2 and 3 and I want to count the pulses of them to make two DC motors to work until it reaches a specified number of pulses, than stop working. I have ...
0
votes
3answers
291 views

Will a simple RC filter work with my mechanical rotary encoder, or do I need a Schmitt trigger?

I bought some incremental rotary encoders online https://www.bourns.com/docs/Product-Datasheets/PEC12R.pdf The spec sheet for those suggests a filter circuit for the outputs of the encoder that ...
-1
votes
2answers
273 views

Reading a rotary encoder using digital pins of Mega 2560 directly using port registers?

I'm trying to write an interrupt service routine for an Arduino Mega 2560 to decode a quadrature rotary encoder. I've got an ISR (Interrupt Service Routine) that responds to the falling edge of ...
0
votes
2answers
59 views

Can't you easily use “quadrature” incremental rotary encoders at 2X or 4X their number of “stops”?

I bought a 12-step "quadrature" incremental rotary encoder as an input device for a project I'm working on. When I wrote the code to track "ticks" of rotation, I made it respond to any change in the ...
0
votes
0answers
293 views

Encoder code using interrupts design question

I have an Arduino Mega 2560, an Omron Optical encoder with an Index (360 steps), a 60 led NeoPixel ring (no Clk wire) and another Arduino Uno. Here is my question, I have some code written that works ...
0
votes
1answer
84 views

Calculation error with Optical Encoder

I have corrected my code for reading the optical encoder index but I am now getting a different calculation error. At the index the encoder reset's to zero but now my readouts are as follows: Index ...
0
votes
1answer
50 views

How to get the encoder position while the rotary motor is moving

I have a question with encoder and the rotary motor. When the motor is moving, I can't access the position of the motor. I have run the code separately, it is perfectly fine. But when I combine, ...
-1
votes
1answer
2k views

Arduino NOOB - Stepper Motor + Rotary Encoder Control

I have a very basic Arduino setup : Arduino Uno Rotary encoder Nema 17 stepper motor + A4988 driver How can I control the rotation of the motor with the rotary encoder? How can I get it to make one ...
0
votes
1answer
61 views

Optical Rotary Encoder Index issue [closed]

I have the following code working correctly except for the Index portion. I am not sure if I have the syntax correct for the hardware. The end result I am looking for is to have the encoder reset to ...
0
votes
1answer
269 views

rotary encoder spamming output

im building my second arduino project. Im very new to this all so I could certainly use some help fixing everything. Im trying to make a controller for a pc port of an arcade game. It uses two rotary ...
0
votes
1answer
51 views

Uno to Mega and where is the error for the interrupt that isn't delared?

I want to read a Omron E6B2-CWZ6C Incremental Rotary Encoder w/Index (360P/R). A couple questions, I found out that an Uno can only handle 2 interrupt pins and I think I need 3 for the Index. What do ...
1
vote
1answer
93 views

Problem with encoder count on a segway handlebar

I'm trying to implement a steering mechanism for a segway project. The idea is to sense the tilt of the segway's handlebar with an incremental rotary encoder (omron e6j-cwz 600ppr). This way when I ...
0
votes
1answer
2k views

Interfacing with an SSI sensor?

I'm trying to interface with version RM08S of this rotary encoder using an Arduino Mega. The sensor supports a "Synchro serial interface (SSI), single ended" interface. I'm unfamiliar with this ...
1
vote
1answer
343 views

Problem in reading data from encoder with arduino

Hello guys I am trying to count the number of the steps of a stepper motor with an encoder (Avago heds). I found an Arduino sketch to count that steps and display them on the console and I found ...
0
votes
1answer
549 views

ESP8266 Arduino and Rotary Encoder

I'm trying to use the sketch bellow to work with my WeMos D1 mini (ESP8266 Arduino platform) together with Rotary Encoder KY-040 or MJKDZ, and it's not working for some reason, but the same sketch is ...
0
votes
1answer
158 views

Flashing a specified digit 4x7 segment display and shift register 74HC595N

I have a project that is simply a relay timer. The code is not complete so you will see 'in progress' sections not related to my question in my code. However, my question is... I am creating a timer ...
0
votes
0answers
58 views

Is the ATMega328P powerful enough to deal with a lot of SPI data while reading a rotary encoder?

I need to: Output data to a 128x64 screen with ug8lib (via SPI) Keep track of the position of a high-precision rotary encoder (1024p/r) Send about 2 bytes of data up to 120 times per second via an ...
2
votes
1answer
4k views

Reading several rotary encoders

Have an upcoming project where user input will be based on spinning a large cog and I have several UNOs available Since rotary encoders need two pins, only a Mega would be able to handle the 7-8 ...
0
votes
1answer
152 views

Arduino Rotary Encoder Pulses?

I made an program so if I turn on my rotary encoder the position and the rotation comes on a LCD screen. But I need to change it a bit up for my teacher, she wants to see the graph of the pulses on ...
0
votes
2answers
3k views

How to control a DC Motor with absolute encoder using Arduino and Motor Driver?

I am a beginner in Arduino, I have only basic knowledge and a big appetite :) I'm working on my cable-cam project. I've made all the mechanical parts by myself, bought all electricity parts through ...
1
vote
2answers
295 views

How can I make a rotary encoder change between neopixel programs?

I am making a program to use a rotary encoder instead of a button in the buttoncycler example in the Adafruit NeoPixel library. I am using the US Digital S1-256-250-IE-B-D. Datasheet can be found ...
2
votes
2answers
8k views

Arduino Mega 2560 interrupt pins and port mapping with rotary encoder

I am trying to use port manipulation in interrupts to read a rotary encoder. I found code for a Uno, so the port call for pins 2 and 3 are different. I think on the Mega they are PORTH3 and PORTH4 ...
1
vote
1answer
959 views

Weird behaviour of rotary encoder values

The plan is to control a NEMA 17 stepper motor with an endless rotary encoder. First, I found a code to read the rotary encoders data on www.HowToMechatronics.com by Dejan Nedelkovski. It basically ...
1
vote
1answer
4k views

Rotary encoder I2C LCD menu

I am trying to make a menu for a monitoring/control system. I am not sure how to make this without interrupting my current code which needs to be monitoring my system at all times to shut off if it ...
1
vote
3answers
325 views

How do I read a sub-degree angle? [closed]

I need to measure (and record changes over a short time) the angle of a lever at a sub-degree resolution (The fulcrum can be the sensor) using an Arduino. I've looked at rotary encoders, but even ...
0
votes
1answer
285 views

How to change a code for an I2C 16x2 to a 20x4?

I have found a sketch that someone wrote for a rotary encoder controlled LCD menu. The code is for an I2C that is 16x2 and I have an I2C that is 20x4. With the code that I found, the layers are all ...
0
votes
1answer
246 views

Switch setting 'running' state boolean doesn't hold

I have a rotary encoder and I want to use the switch to stop the rest of my code running, essentially switching off what I have going on. I have this boolean running = true; void setup() { ...
2
votes
4answers
8k views

Using rotary encoders with pin change interrupts

I'm using an Arduino Uno and two (3-pin) rotary encoders for a project. Since the loop takes a bit long and accuracy is important, I'd like to use interrupts to read the values from the rotary ...
0
votes
2answers
502 views

Encoders for precise robot turns

So I recently purchased: DFRobot Wheel Encoders DFRobot 3PA and 4WD Rovers (2pk) Romeo V2 Arduino Controller I was doing a bit of research online and I'm trying to figure out how to use the ...
0
votes
1answer
586 views

Why is my code only reading the change of the encoder's pin A?

I am writing code for reading in a quadrature encoder. I used attachInterrupt on pin 2 and 3, but by using the same ISR. int encAPin= 2; int encBPin= 3; volatile int encAValue= 0; ...
1
vote
3answers
530 views

Absolute encoder vs Accelerometer for calculating angles

I've been toying with this idea for a while and after some thorough research I'm more than happy that the project is realistic. However I'm in need of some direction in terms of the sensors I should ...
1
vote
2answers
2k views

Problem to convert rotary encoder output to angle

I'm using this incremental rotary encoder with a rotating disc. Here is my system: I will explain the system briefly and above is the illustration for that: The rotary encoder(blue) is attached/...