In this paper, a battery State of Charge (SOC) estimation method based on the extended Kalman filter is proposed. In some known battery SOC estimation methods, it is assumed that the relationship between battery open circuit voltage and SOC is linear and static. However, this relationship is only piecewisely linear in practice and varies with the ambient temperature, as assumed in this work. The proposed model assumption matches better with the real battery behavior. A battery is modeled as a nonlinear system, with the SOC defined as a system state. The extended Kalman filter is applied to estimate SOC directly for a lithium battery pack. The effectiveness of the proposed method is verified on a power transmission line inspection robot. The experimental results verify the effectiveness of the proposed method.