This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

INA240: Bidirectional Current sensing of PWM input

Part Number: INA240

I am working on creating a current sense circuit for monitoring the current of source with below specs:

Current Source: Amplitude (-30mA to +30mA, 80Hz, 50% Duty cycle PWM). I would like to give the analog output of the Opamp to ADC.  can you help me with the implementation approach?

  • Hi,

    In order to narrow down the selection, can you provide a bit more details about the constraints? What would the voltage look like (thank you for describing the current BTW)?

    Regards, Guang  

  • Hi Guang, 

    As I mentioned above it's a current source of -20mA to +20mA ( Varies +-5mA from nominal value). Circuit is attached.

    What I am trying to achieve is that if the current falls beyond +-15mA, +-25mA, I shall be able to detect the difference on analog pin of ADC. 

    I have created the circuit using op-amp, and buffer, I am able to shift the Pwm to positive but when I convert to Analog to feed to ADC the margin i am getting is very less (0.05V). So i need some suggestion on that. 

  • Hi Deepak,

    Not sure if I totally get what you meant by “ the margin I am getting is very less (0.05V)”. I’m guessing this is referring to the output after the low pass filter?

    If so you would want to make R2+C1 much smaller. As it is reduced, you'll notice the nodal voltage starts to resemble V(out) more.

    Regards, Guang  

  • Hi Guang,

    As you can see from the circuit, I am sensing the Differential current (±15mA to ±25mA) across 18ohm resistor. Since current is negative going so I am offsetting it by 2.5V. 

    Output I am getting is as below at each current: I am feeding this Pulsating DC out to ADC pin and sampling the average of it. But the problem I am finding is that at both 15mA and 25mA the average is 2.5V so ADC won't be able to distinguish if the current is 15mA or 25mA. 

     

  • Hi Deepak,

    The PWM signal is symmetrical w.r.t. OFFSET. Regardless its magnitude, the average will be the OFFSET. The circuit is behaving exactly as it should.

    A different indicator should be measured instead. One option is to have a peak detector, where different magnitudes yield different peak values. There are examples of such circuit online, I believe you’ll be able to reference to and accomplish the design goal.

    Regards, Guang