Constant current power supply design