The lifetime of wireless sensor networks deployments depends strongly on the nodes battery state of health. It is important to detect promptly those motes whose batteries are affected and degraded by ageing, environmental conditions, failures, etc. There are several parameters that can provide significant information of the battery state of health, such as: the number of charge/discharge cycles, the internal resistance, voltage, drained current, temperature, etc. The combination of these parameters can be used to generate analytical models capable of predicting the battery state of health. The generation of these models needs a previous process to collect dense data traces with sampled values of the battery parameters during a large number of discharge cycles under different operating conditions. The collected data allow the development of mathematical models that can predict the battery state of health. These models are required to be simple because they must be executed in motes with low computational capabilities. The article shows the complete process of acquiring the training data, the models generation and its experimental validation using rechargeable batteries connected to Telosb motes. The obtained results provide significant insight of the battery state of health at different temperatures and charge/discharge cycles.