Wireless sensor networks (WSN) are one of most interesting emerging technologies. WSN can be used to perform monitoring, surveillance, sensing and measuring operations. In order to further increase these applications, minimizing energy consumption is one of the most critical issues. Therefore, accurate energy model is required for the evaluation of wireless sensor networks performance. In this paper, the energy consumption over a link is analyzed. The optimization mechanism is subject of certain QoS requirement in term of total end-to end delay time and bit error rate. The simulation results show that the proposed algorithm can reduce the consumed energy of the sensor nodes.