The invention relates to a drive, code discrimination and
coupling integration micro electromechanical code lock, comprising a shell, a pawl, a
ratchet wheel, photoelectric inductors, an upper
stator,a lower
stator, spindles and counter-intervention meshing gears, wherein the pawl and the
ratchet wheel are arranged at the outer side of the uppermost surface of the shell, the
ratchet wheel is installed on the spindles, the pawl is installed on the shell and is embedded into a tooth groove of the ratchet wheel, two spindles penetrate through the code lock, the lower
stator, the counter-intervention meshing gears and the upper stator are arranged in the shell and are sequentially connected in series to the spindles, and the photoelectric inductors are respectively arranged in the shell corresponding to the positions of the counter-intervention meshing gears. By using a drive, code discrimination and
coupling integration micro electromechanical structure, the invention integrates three parts of a drive, a code discrimination mechanism and a coupler into one part, therefore, the structure of code lock dynamics is reduced, the installation is convenient, and the reliability is higher.