Wireless Sensor Networks (WSNs) are composed of a large number of very small devices used for biomedical or environmental monitoring applications. These devices measure various natural processes at different locations, and cooperate in order to aggregate the information. In this paper we propose an accurate model based on the TinyOS simulator (TOSSIM) for wireless sensor devices, which can be used to precisely estimate the network performance or the power consumption of real-life sensor nodes. This model helps us to evaluate the impact on network performance of making changes in the node architecture or in the communication layers. To show the efficiency and versatility of our model we have tested it with the Sensor Cube nodes, developed by IMEC, and measured and tuned the power consumption for different Medium Access Control (MAC) protocols.