Codiode

Why Gray Code Is Used in Shaft Encoders

EasyLogic CircuitAnalyze

Physical position sensors use optical or mechanical disks to translate mechanical rotation into digital values. A system compares a standard 3-bit binary encoder disk and a 3-bit Gray code encoder disk side by side. The sensors continuously read the current position as the disks rotate from state 3 to state 4.

In standard binary, this transition is represented by the bit pattern moving from 011 to 100. In Gray code, the exact same physical transition is represented by the bit pattern moving from 010 to 110.

Analyze the intermediate states produced if the physical sensors do not align perfectly when crossing the boundary between these two positions. Determine the potential erroneous outputs for both encoding schemes and identify why one scheme is preferred for mechanical sensing.

Constraints

  • Assume the mechanical sensors can read either the old bit or the new bit independently during a transition.
  • The system samples the encoder asynchronously relative to the physical movement.
  • Standard 3-bit reflected Gray code is used.

Topics

BinaryGray CodeEncodersGlitches

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Part of Digital Foundations

Problem 16 of 58 in the Digital Foundations track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.