Voltage restrictor/limiter

Job ID: 32269021

Budget: $250 – $750 CAD

looking to input a variable voltage of 0-5 volts and if a switch is on then the output voltage is limited to a adjustable limit voltage regardless of the input for example output becomes 0-2 volts. Example 3.5v in now outputs to 2.0v, 4v in = 2v out. When switch is off the output is linear to input. example 3.5v in = 3.5v out, 4v = 4v