Rotation Measurment with Encoders

Click For Summary

Discussion Overview

The discussion revolves around the design and implementation of a circuit using an Arduino to read the angle from a rotary encoder and display it on three 7-segment LED displays. The focus includes both the hardware connections and the programming aspects necessary for this project.

Discussion Character

  • Technical explanation
  • Exploratory
  • Homework-related

Main Points Raised

  • One participant describes their setup involving a rotary encoder connected to an Arduino and expresses uncertainty about the connections needed for the 7-segment displays.
  • Another participant explains the function of the rotary encoder, noting that it produces two quadrature signals and asks for the encoder model and data sheet.
  • A participant mentions that the rotary encoder does not have a zero position output and provides the part number for the 7-segment displays being used.
  • Concerns are raised about the need to count pulse edges from the encoder accurately, suggesting the implementation of a method to re-establish zero position if steps are missed.
  • Multiple potential solutions are proposed for connecting the displays, including using addressable latches, BCD decoders, multiplexing, and considering the available output pins on the Arduino.
  • Participants are encouraged to ask more specific questions regarding their setup and requirements.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to connect the displays or handle the encoder's output, indicating multiple competing views and unresolved questions regarding the implementation.

Contextual Notes

Participants highlight the need for careful consideration of pin availability and the drive capability of the components used, but specific limitations or assumptions are not fully detailed.

Franklin Lopez
Messages
5
Reaction score
0
I am trying to both design a code for Arduino and build a circuit connected with the Arduino which uses 3 anode 7 segment and 3 resistor arrays with 7 pins to connect to the Arduino Uno. The encoder is a rotary encoder. I have Pin A of the rotary encoder connected to pin 13 of the Arduino and Pin B connected to the pin 12. From there on I am not sure where to conncect from. I do believe to connect all 3 7 segments I need to use one of the arrays in parallel with the rest and then connect to the Arduino Uno. I need the 7 segment LED's to read the angle at which the Rotary Encoder is currently at. Up to 360.
 
Technology news on Phys.org
You have two quite separate problems.

Firstly you have a rotary encoder. That will produce two signals called A and B. Those are in quadrature. There may also be a zero position synchronise output available. What model is your encoder? Do you have a link to a data sheet?

Secondly you have a three digit, seven segment display. If you were to use a display with a serial interface you would need less wire but it would take a little more code. An LCD would need less current than an LED display. Have you selected a display. What is the make and part number.
 
The 3 different LED 7 segments are required for this project to display the angle. The rotary encoder I have has he serial number faded but I know for sure it does not have a zero position output available. The LED 7 segments are common anode part # 5611BH. All connected to the Arduino Uno thru 3 different resistor banks.
 
The counting of pulse edges from the encoder will be critical because you will have to re-establish zero if you miss a step. That suggests you will need an optical sensor or a micro-switch to detect when the encoder axis passes zero in a particular direction. Alternatively, a press-button to set when the angle is at zero.

You will need 21 pins to connect the three 7-segment displays directly.
If you do not have enough output pins available, you will need an alternative solution.
Maybe consider;
1. Three addressable latches to hold the segment bits and drivers to sink the segment current.
2. Decoders from 4 bit BCD to 7 segments will reduce the bits output to 2+4+4=10 bits.
3. You might multiplex the LEDs with one digit powered at the time. That will need 3 anode transistor drive bits, plus 7 segment bits = 10 bits total.
4. Or multiplex with a four to seven decoder chip with three anode driver transistors = 4 + 3 = 7 bits.

You need to investigate the drive capability and how many output pins are available.
Ask much more specific questions.
 
  • Like
Likes   Reactions: Asymptotic

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 2 ·
Replies
2
Views
4K