Energy Management in Wireless Sensor Units