The purpose of this paper is to develop an automatic guided vehicle (AGV) based on ultrasonic sensor (US-AGV). Developing an intelligent cleaning robot is the long term main goal of this research. Microchip PIC18F452 micro processor was used to be the core of the control system of US-AGV. Ultrasonic measurement system, DC motor velocity control and related system operating calculations were all integrated by the PIC18F452. This US-AGV can get the environment information relative to the wall, and it can move in the unknown environment autonomously. It has three modes of motion. The first mode is that along the wall. The second mode is that dodge the obstacle. The third mode is that interior spiral intact surface path planning and walking automatically. These motion modes are the basic function of a cleaning robot.