An Arduino-based NiMH/NiCd/Alkaline/Li-Ion Battery Capacity Tester