The RRT algorithm is widely used in the high-dimensional path planning in a dynamic environment, and well adapted to the dynamics of motion of the mobile node needs. However, in large scale wireless sensor networks (WSN), the RRT algorithm lacks stability and is easy to deviate from the optimal path. In this paper we proposes a path planning algorithm called E-RRT to improve the problems that RRT has. The method proposed includes the coverage density of obstacle for initialize searching area for the exploring random tree, and the gradually extended region used to ensure the path to be found. The method also adopts the greedy algorithm to delete the intermediate point in the point sequence of path for an optimal path, and the quadratic Bezier curve to smooth the path for the mobile sensor node. The path found can be the shortest, collision-free and smoothing, and therefore to satisfy the requirement of path planning for mobile sensor nodes. The simulation results show that the E-RRT algorithm outperforms the RRT algorithm.