I am trying to design a circuit to control the potential difference across 2 stainless steel wires. The two wires are connected together at one end (common node) and on the other end, one wire is connected to +ve and the other wire is connected to -ve. With a DC bench power supply, I performed a voltage sweep from 0V to 20V, with a maximum of 200mA of current drawn by the wires @ 20V. I would like to replace the DC bench power supply with a computer-controlled alternative.
My question is, how to use a simple Arduino microcontroller to do so, my main issue is how to convert the simple PWM single and amplify it to a voltage range of 0 to 20V, taking into account the current requirement of 200mA. One idea is to connect the PWM to a low pass filter, basically extract the DC element, followed by using an opamp to amplify the signal. Can anyone advise me on what would be the best approach ?
I attached a sketch of the wire setup.