3
\$\begingroup\$

Generally and briefly, are there any direct application of gray code in electronics? If so, what are they?

\$\endgroup\$
  • \$\begingroup\$ Gray codes can be used for logic minimization (karnaugh map) \$\endgroup\$ – efox29 Jan 9 '15 at 20:52
  • \$\begingroup\$ It can be used for coding states in state machines. \$\endgroup\$ – Lord_Volt Jan 9 '15 at 20:53
10
\$\begingroup\$

Absolute optical encoders are an obvious and common example. Since only one bit changes at a time minor misalignment between bits in the pickup does not matter as much.

\$\endgroup\$
  • \$\begingroup\$ +1 for pointing out the big advantage of a grey code for encoders... \$\endgroup\$ – copper.hat Jan 10 '15 at 4:33
7
\$\begingroup\$

It is also used in digital modulation schemes like, for instance, in this 8-PSK modulation here: enter image description here

Because of the noise, sometimes the receiver might incorrectly detect an adjacent symbol instead of the correct one. If gray encoding is used, the adjacent symbol will only be 1 bit apart. The received binary stream will therefore be closer to the correct one, and might be eventually corrected if an error correction mecanism is in place.

More about constellations here: http://en.wikipedia.org/wiki/Constellation_diagram

\$\endgroup\$
3
\$\begingroup\$

Grey code is used in rotary encoders.

enter image description here enter image description here

\$\endgroup\$
1
\$\begingroup\$

We used grey code for a non-ferrous optical encoder to track joint position in MRI kinematic studies. Due to the high level of RF noise from the MRI transceiver, and the high magnetic field, errors might occur sending an incorrect position of (knee, elbow, etc) joing in the positioning system.

\$\endgroup\$
1
\$\begingroup\$

Something that wasn't mentioned yet is the use of gray code in Karnaugh maps.

This site gives a good explanation: https://www.allaboutcircuits.com/textbook/digital/chpt-8/logic-simplification-karnaugh-maps/

\$\endgroup\$
0
\$\begingroup\$

In the 1980's one of the defense industries proposed developing a guided hypervelocity missile (Mach 5) for air-to-ground attacks. The missile was to be guided by a rear-facing optical sensor which would be illuminated by a pulsed laser in the launcher. The output of the laser would produce a modulated pattern in the far field which was specified to be gray-scale encoded. That is, it would provide a "checkerboard" pattern with each successive pulse producing a different pattern, and the result of a series of pulses would be a gray code representation of the location of the particular spot with respect to the aiming axis of the launcher. This would allow the missile to know where it was with respect to the desired line of flight without the need for the launcher to track it and issue guidance commands, as the missile itself would figure out its error and correct its flight path.

I suppose that's only barely real-world, since the system was never funded, but I know they did preliminary work on it and were fairly certain it would work.

\$\endgroup\$
0
\$\begingroup\$

A gray code can be used to minimize transition power, when a counter value goes on a bus with a large enough capacitance to warrant the overhead of encoding (if any).

A gray code is also often used in read&write pointers in asynchronous dual-port FIFOs to prevent wrong transitions being detected by the two asynchronous clock domains.

\$\endgroup\$
0
\$\begingroup\$

Switching between vectors in Space vector PWM is another one. Switching only one half bridge at a time reduces harmonics. Its much less direct than the other examples though. You have to go out of your way not to use it though in this case since there is a physical correlation with the phases that naturally arises as a gray code

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.