Range input to pwm