A modular soft robot, which consists of three deformable spherical cells, the electromagnetic valves and the control systems, is constructed. According to the deflating action and the inflating action of the spherical cells, the size and the shape of each spherical cell can be changed. Thus, the soft robot can move through a narrow or low complicated passage. In this paper, the nonlinear relationship between the pressure (P) and the inflation radius (R) of each cell with different original diameters (r ) is described to control the change of the spherical cell. In order to move through a narrow or low obstacle, based on the different distances S i between spherical cell i and the obstacle, four kinds of different moving orders are obtained. For each kind of moving order, the nonlinear dynamic moving process is analyzed with the deflating and inflating modes of each cell. The theoretical analysis of nonlinear obstacle avoidance is proposed, and the moving conditions are presented in details. Last, a simulation and an experiment of three spherical cells are shown to emulate the obstacle avoidance process of the soft robot.