Solar charging to prevent power shortage