In this paper we present a load matching task scheduling algorithm for energy harvesting real-time embedded systems using a realistic model for the battery charging and discharging processes. The proposed approach addresses two important issues that have not been considered by previous work: load matching and battery charge/discharge overhead. The new algorithm increases available energy by managing the system load through task scheduling so that the energy harvesting module delivers maximum power output. It further improves the system wide energy efficiency by considering the charging and discharging overhead when deciding if the harvested energy should be used to charge the battery or directly on the circuits. Experimental results show that, comparing to the best of the existing techniques the proposed algorithm improves the system wide energy efficiency by 8.0% to 56.3% and reduces deadline misses by 13.3% to 81.8% under different workload conditions.