Off Grid Solar: A handbook for Photovoltaics  with Lead-Acid or Lithium-Ion batteries