Reverse charging of solar panels