Reversing a .5-4.5V analog sensor output to 5V-0V
If you had the code for the micro doing the PWM, this would be a trivial firmware change.  However, it seems you don't have access to the internals of the "control board".

What you need therefore is a inverting amplifier.  You want 500mV-4.5V to map to 5V-0V.  Or put another way, you want a gain of -1.25 centered around 2.5 V.  This is easy to do:



The gain is -R2/R1, which is -1.27 in this example.  R3 and R4 form a voltage divider to make the 1/2 supply level around which this circuit will amplify the input.  C2 attenuates supply noise on the 1/2 supply voltage.

Most rail to rail opamps would work.

Added:

Thanks to Anindo's comment, I see now the problem is really mapping 500mV-2.2V to 5V-0V.
That is a gain of -2.94 with some offset.  Specifically, you want

&nbsp;&nbsp;OUT = -2.94 * IN + 6.47

However, this circuit will essentially subtract first, then multiply by the gain.  It is therefore more useful to write the same relationship as:

&nbsp;&nbsp;OUT = -2.94 * (IN - 2.2)

That means R3 and R4 need to be adjusted to produce 2.2 V instead of 2.5 V, and R2/R1 should be about 2.94.  Rounding to standard 1% values we get:

R2 = 294 k&Omega; 1%
R3 = 12.7 k&Omega; 1%
R4 = 10 k&Omega; 1%