measuring the voltage and using a constant current supply