The invention discloses a two-channel
Gray code magnetic coding device which comprises a collecting device I, a collecting device II and a power supply, wherein the collecting device I comprises a magnetically sensitive element I and a
microprocessor I, and the collecting device II comprises a magnetically sensitive element II and a
microprocessor II; the magnetically sensitive element I is connected with the
microprocessor I, and the microprocessor I receives
magnetic field variation sensing signals collected by the magnetically sensitive element I; the magnetically sensitive element II is connected with the microprocessor II, and the microprocessor II receives
magnetic field variation sensing signals collected by the magnetically sensitive element II; and the power supply supplies
electric energy for the magnetically sensitive elements and the microprocessors. By using the technical scheme of the invention, the magnetically sensitive elements and the microprocessors are used for
processing detection signals to form two-channel coding data with extremely small repetition and error rate, interference between a completely independent two-
channel data processing system and a power supply
system can be avoid effectively, the stability of detection is increased, and the technical problem of
large size of an optical coder is solved.