International Institute of Electrical and Electronic Engineering (IEEE) holds an international micromouse competition each year, it is a competition full of challenge. It is needed that the competitors must master hardware circuit designs, High efficiency shortest path algorithm, searching way algorithm and controlling system. Turning function is one of the serious problems in the control of micromouse, especially to control it when it is right-angle turn. This paper describes a new method for the value margin of the black and white part of its wheel is widened and the noise margin is increased by enlarging the relative distance between black and white stripes and infrared sensor and then the measurement accuracy of the sensor for coding wheel and reliability of the measurement are greatly improved. This method has some practical value and can be realized easily.