Rotation Measurment with Encoders

AI Thread Summary
The discussion centers on designing a circuit with an Arduino Uno that incorporates a rotary encoder and three common anode 7-segment displays to read angles up to 360 degrees. The rotary encoder produces two quadrature signals, A and B, which are connected to pins 12 and 13 of the Arduino, respectively. However, the encoder lacks a zero position output, which necessitates an additional method to establish a reference point, such as an optical sensor or a press-button.The three 7-segment displays require a significant number of pins—21 in total—if connected directly. To address potential pin limitations, several alternatives are suggested, including using addressable latches, BCD to 7-segment decoders, or multiplexing the displays to reduce the number of required pins. The discussion emphasizes the importance of counting pulse edges from the encoder and the need to re-establish zero if steps are missed. Specific questions about the encoder model and display specifications are encouraged to facilitate further assistance.
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 Asymptotic
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top