Voltage and current control