I am away from computer and can't inspect the schematic, but I suspect there is noise pickup from the FET circuit, particularly if it PWM-controlled. I would recommend adding small cap to filter out noise. Check incoming signal with scope.
1 of 1 people found this helpful
Not a bad thought, but I don't think this is a noise issue. I've used a battery as the power supply to the FET circuit to try and minimize the noise in that circuit but to no avail.
Adding 100nF across the current sense resistor and across the input supply did nothing at all to help the situation.
What *did* help was reassigning the ADC pin from where it was to another pin. I'll not get into why that was possible, but as soon as I changed the ADC from being on pin 0.4 to 0.2 the problem seems to have resolved. I'm wondering if that is somehow related to the fact that I'm using op-amp 2, and P0.4 is tied to the non-inverting input of OA2? Theoretically, the op-amp should be internally disconnected but practically, perhaps it wasn't? Or perhaps some noise bleeds across from the signal on the non-inverting input? I don't know.