Abstract: A direction control device of a joystick includes a joystick seat, a hemispherical joystick structure, a U shape piece, a substrate, and two fan-shaped encoder structures. At least two infrared detectors are installed on each side of each of the fan-shaped encoder structures. When one set of the infrared detectors has detected movement of openings in the encoder structures, the signals 0 and 1 will be generated and used to control the positions of the coordinate axes of the joystick. When the joystick is released, the encoder structures will return to a central point at which a second set of the encoder structures detects reset holes positioned above the openings in the fan-shaped encoder structures.