Arduino Questions and Answers – Rotary Encoder

This set of Arduino Multiple Choice Questions & Answers (MCQs) focuses on “Rotary Encoder”.

1. What is the use of the rotary encoder?
a) To measure RPM or speed
b) To provide 3G Connectivity
c) To measure presence of gas
d) To measure Wi-Fi strength
View Answer

Answer: a
Explanation: The rotary encoder is used to measure the RPM or speed or any other such motion and angular velocity related parameters of any robotic system or any other system in general. It provides a series of ticks which provide us with the necessary information to decode that into our required values.

2. How many terminals does the rotary encoder have?
a) 1
b) 3
c) 5
d) 4
View Answer

Answer: c
Explanation: The rotary encoder has 5 terminals which include the Vcc for power supply, the CLK for clock, DATA which provides us the output wave, and SWC which switches voltage to 0 and GND which is required for completing the circuit through the sensor and grounding it.

3. What is the purpose of the CLK pin in the rotary encoder?
a) To provide pulse reference
b) To power the module
c) To shut down the module
d) To provide analog reference voltage
View Answer

Answer: a
Explanation: The rotary encoder has a CLK pin and a DATA pin. The DATA pin gives out pulses which vary in phase depending upon the direction of rotation of the rotary encoder. However we cannot determine these variations until we compare the wave pattern with another steady non-variable pulse train. The CLK pin provides exactly that.
advertisement
advertisement

4. What will happen if we supply a voltage of 25V to the Vcc of the rotary encoder?
a) Damage is caused
b) Module will shut down
c) Module will not respond for the time the voltage is applied
d) Module will function normally
View Answer

Answer: a
Explanation: The rotary encoders are mostly built to work on a voltage of approximately 3.3V to 5V. Any voltage lower than that and the board will not be able to power on, but however any voltage significantly above that and the board may suffer permanent damage.

5. What is the maximum output voltage that the rotary encoder can put out on its DATA output pin?
a) 1V
b) 140V
c) 5V
d) 10V
View Answer

Answer: c
Explanation: The maximum output voltage of the DATA pin on the rotary encoder is 5V while the lowest is 0V. There is no voltage level in between them as the DATA out pin is a digital pin and can represent only 2 logic levels.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. What is the purpose of the DATA pin in the rotary encoder?
a) To provide direction of motion
b) To power the module
c) To shut down the module
d) To provide analog reference voltage
View Answer

Answer: a
Explanation: The rotary encoder has a CLK pin and a DATA pin. The DATA pin gives out pulses which vary in phase depending upon the direction of rotation of the rotary encoder which is determined by comparing it with the non-variable pulse train of the CLK pin.

7. If the output of the CLK and DATA pins is given as:

advertisement
10101010
01010101

Which direction is the rotary encoder moving?
a) Swinging both clockwise and anticlockwise
b) Anticlockwise
c) Clockwise
d) Still
View Answer

Answer: b
Explanation: If the DATA pin is in sync with the CLK pin, then we can say that it is moving in the clockwise direction. However, here in this case, the DATA pin is not in sync with the CLK pin and has a 90 degree phase shift with respect to the train of the CLK pin so we can say that it is moving in the anticlockwise direction.
advertisement

8. If the output of the CLK and DATA pins is given as:

10101010
10101010

Which direction is the rotary encoder moving?
a) Swinging both clockwise and anticlockwise
b) Anticlockwise
c) Clockwise
d) Still
View Answer

Answer: c
Explanation: If the DATA pin is in sync with the CLK pin, then we can say that it is moving in the clockwise direction. Here, in this case, the DATA pin is in sync with the CLK pin and has no phase shift with respect to the train of the CLK pin so we can say that it is moving in the clockwise direction.

9. If the output of the CLK and DATA pins is given as:

10101010
11111111

Which direction is the rotary encoder moving?
a) Swinging both clockwise and anticlockwise
b) Anticlockwise
c) Clockwise
d) Still
View Answer

Answer: d
Explanation: If the DATA pin is in sync with the CLK pin, then we can say that it is moving in the clockwise direction. However, here in this case, the DATA pin is not changing at all with respect to the CLK pin and is stalled at 1. This will happen if there is no rotation on the shaft of the rotary encoder. Hence we can say that the encoder is sitting idle or still.

10. If the output of the CLK and DATA pins is given as:

10101010
01011010

Which direction is the rotary encoder moving?
a) Swinging both clockwise and anticlockwise
b) Anticlockwise
c) Clockwise
d) Still
View Answer

Answer: a
Explanation: If the DATA pin is in sync with the CLK pin, then we can say that it is moving in the clockwise direction. However, here in this case, the DATA pin, during the first half of the pulse train is not in sync and appears to have a 90 degree phase shift which entails that the rotary encoder must be turning anticlockwise. However, during the second half of the pulse train it appears to be in sync with the CLK pin, so it is turning clockwise. So, from that we can say that the rotary encoder must be swinging.

Sanfoundry Global Education & Learning Series – Arduino.

To practice all areas of Arduino, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.