measures power flow into and out of a battery, and turns an inverter on and off