Other Parts Discussed in Thread: INA240,
Excuse this somewhat rooky question. I am a retired systems engineer who now develops electronic 'features' at our local model town. Some years ago, I developed a model train controller using PWM to control speed. Unfortunately one of the staff accidentally shorted the Motor Drive Board and destroyed it. I and another volunteer at the model town, decided to add an over-current circuit, but this has proved harder than I expected owing to the fact that the current is pulsed and traditional sense amplifiers reproduce the pulses exactly. We saw that the INA240 offered PWM Rejection, so we bought an EVM to try it out. Here is the circuit that I've used to prototype the over-current Module:
I have a dual Bench PSU that produces the 15 V Drive for the PWM and the 3.3 V for the INA240EVM. The Function Gen is a cheap hobby type but it seems to produce a clean output. I set the Function Generator to provide a 5 V rectangular wave with a 2.5 V offset at 10 kHz, the PWM Modulator is a MOSFET and I monitor the INA240EVM output using a fully isolated scope. Unfortunately, the signal appears as a DC level with the PWM pulses superimposed on it. I was expecting the output to be more like the signal shown in Figure 9.4 in the Data Sheet.
Is there something fundamentally wrong with my test circuit, or have I misunderstood what the INA240 is supposed to do?