I have a hall effect current sensor with a 0-5V output. Zero current flow is 2.5V out.
It is monitoring a 20khz motor drive signal.

I want to pass thru signals from 0-2.5V unmolested but want to reduce signals over 2.5V by an amount lets call it 20%.

What could we do to do that?

I was thinking OP amps, but I can't think of way to only reduce the signal once it is over 2.5V

I also thought about a PIC with adc in and then a pwm out with low pass filter.
But I don't think it will do 20khz.

Any brilliant ideas? Thanks Peter