Instruite wrote:
If I assume for drawing sake the resistors and other elements are not shown then also there is one problrm with the circuit
When Voltage due to current (at negative terminal of opamp) is equal to Vin, which is the desired state, the output of opamp will be 0V which will switch off the load.
Instruite, the op amp has extremely high gain (typically 175,000). In order to drive the MOSFET gate to, say, 5 volts, it would only need the noninverting input to be 29
microvolts greater than the inverting input (using Av=175,000). This is the principle behind all op amp negative feedback circuits. If we followed your reasoning, op amps would be worthless, except maybe as comparators.
Regarding the circuit, the IRL2910 is a poor match for the 3 milliohm resistor. It has Rds(on)=260 milliohms max. The INA169 has an input offset voltage of +/- 1mV max, so 10 amps (dropping 30mV) is about the miimum useable current if you want any accuracy. 10 amps will waste 2.6V across the IRL2910, and will cause it to dissipate 26 watts. The MOSFET needs to be "bigger" (lower ON resistance), or the sense resistor need to be a higher value. Which solution you choose depends on the maximum current desired.
It seems to me that implementing a current source with PWM, in a feedback loop, with a microcontroller in the loop, would require some serious programming to keep the loop from oscillating, but I must confess I've never tried it.
I think the circuit I posted above is the simplest solution.
Ron