Abstract:The major bottleneck for wireless sensor networks is the limited and irreplaceable power source of the sensor nodes. The network congestion and uneven energy consumption will result in the wastage of energy. Therefore, it is quite important to avoid the network congestion and balance the energy consumption for the routing protocol. This paper proposes a grid-based routing algorithm, GECR, which can avoid the network congestion and balance the energy consumption. At first, for a special grid model, the “Relative Coordinate” is set for every node. In order to minimize the routing cost, each node will establish multiple paths just according to the “Relative Coordinate” of its neighbor nodes. Meanwhile, we also utilize the “Weight value” to avoid the network congestion and balance the energy consumption. On this basis, this paper further considers the case that the nodes are deployed in uniform and random way. A virtual grid is used to establish grid model with the help of the “Relative Coordinate” and “Network Coordinate”. Then, we establish multiple paths and set “Weight value” for every path. This routing protocol can release the network congestion and balance the energy congestion by updating the path. The simulation results show that the routing algorithm not only can guarantee the data transmission, but also can reduce the loss rate and balance the energy consumption.