Rotation Measurment with Encoders

In summary, the conversation covers two main topics - designing a code for Arduino and building a circuit connected with the Arduino. The circuit includes a rotary encoder, three 7-segment LED displays, and resistor arrays. The encoder is connected to pins 13 and 12, but there is uncertainty about where to connect from there. The goal is for the displays to read the angle of the rotary encoder, which does not have a zero position output. The group discusses potential solutions for using 21 pins to connect the displays directly or using alternative methods such as latches, decoders, or multiplexing. They also mention the need for more specific questions and further investigation into the drive capability and available output pins.
  • #1
Franklin Lopez
5
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
  • #2
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.
 
  • #3
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.
 
  • #4
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 Asymptotic

1. What is an encoder and how does it measure rotation?

An encoder is a sensing device that converts the rotational movement of an object into electronic signals. It is typically composed of a rotating disc with evenly spaced slots, a light source, and a sensor. As the disc rotates, the light passes through the slots and is detected by the sensor, generating a series of pulses that can be used to measure the rotation.

2. What is the resolution of an encoder and how does it affect measurement accuracy?

The resolution of an encoder refers to the number of pulses generated per revolution, which is determined by the number of slots on the disc. The higher the resolution, the more accurate the measurement of rotation will be. For example, an encoder with a resolution of 1000 pulses per revolution will provide a more precise measurement than one with a resolution of 100 pulses per revolution.

3. Are there different types of encoders for measuring rotation?

Yes, there are two main types of encoders: incremental and absolute. Incremental encoders generate pulses based on the relative movement of the rotating disc, while absolute encoders provide a unique code for each position of the disc. Absolute encoders are typically more accurate and reliable for measuring rotation, but they are also more expensive.

4. How do encoders compensate for errors and ensure accurate measurement?

Encoders may have built-in error compensation mechanisms, such as error correction algorithms or redundant sensors, to improve accuracy. Additionally, proper installation and calibration of the encoder is crucial for accurate measurement. Regular maintenance and cleaning can also help to prevent errors and maintain accuracy over time.

5. Can encoders measure rotation in both clockwise and counterclockwise directions?

Yes, encoders can measure rotation in both directions. The pulses generated by the encoder will indicate the direction and amount of rotation, allowing for precise measurement in both clockwise and counterclockwise directions.

Similar threads

  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
Replies
7
Views
1K
Replies
8
Views
2K
  • Electrical Engineering
Replies
15
Views
2K
  • Electrical Engineering
Replies
5
Views
4K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Replies
6
Views
2K
  • Programming and Computer Science
Replies
6
Views
2K
  • Electrical Engineering
Replies
5
Views
2K
Back
Top