See attached peak detector schematic. R1 is the current sense resistor. (R2 + R3)/R2 defines the op amp gain, and C1 * (R2 + R3) defines the time constant, which should be large compared to 1/f where f is the PWM frequency.
So if I want to get the voltage value of Rsense I have to integrate the diode drop voltage ?
Vc1 = Vr1 * gain - Vdrop
Otherwise my Ir1 evaluation will be lowered by a 0,7v factor !
Is that right ?
No, the circuit is designed (i.e. op amp feedback resistor taken from the cathode of the diode) so that the diode voltage drop does not enter the equation.