Controlling a valve with 0-6 V regulation

Or feedback from the driver to the µC. Here is the right place for a low pass filter.