Battery magnetic flowmeter