Strange oscillation when drving motor with PMOS

dc motoroscillationpmos

I am trying to drive a 24V DC motor with IRF5305 PMOS. I am generating ~300Hz PWM signal with an AVR microcontroller and level-shifting it to 12V-24V signal to drive MOSFETs gate.
I need to use a PMOS because this will get added to an existing machine.

I am also measuring current tru the motor with ~1 Ohm resistor on the source. But am getting some weird measurements. MCP6022 op amps are powered from 5V so I need to reduce the voltage then get the difference across the resistor (24V is not totally stable) and then amplify the difference by the same amount which then gets feed to a comparator. Also inverting and non-inverting inputs on OA1 have clamping schottky diodes to 5V.

This is how I got everything set up:

schematic

simulate this circuit – Schematic created using CircuitLab

And these are the results I get when driving the motor:

scope

Blue trace is MOFETs gate which gets a nice 12-24V signal. Pink is connected to the MOFETs drain pin where these oscillations occurs. And yellow trace represents output from AO1 the differential amplifier, weird shapes.

I was expecting to see a sawtooth yellow trace without these giant bumps and peaks. Also the pink trace looks a bit weird, when the blue trace is high (24V) shouldn't the pink trace gradually approach ground (as the power is dissipated by the diode)?

What is going on? How can I fix it?

P.S.

I have to admit I've used a 12V motor connected to 24V line but it was under no more than 50% duty cycle and I turned it off more or less as soon as I got the readings. Did I damage the motor? (it looks like it is spinning ok)

Best Answer

I agree that that the oscillations are probably due to the commutator in the motor.

You could try equal value capacitors across R9 and R11 to filter the higher frequencies.

To represent zero current you will need a negative power supply to the MCP6022. This may also be causing it to saturate during the FET off time as the feedback loop will go open, it may take a significant time to come out of saturation.

What tolerance do you have for the 13K and 2.7K resistors? They need to be precision parts to get a reasonable common mode rejection.

Why not put the sense resistor in the grounded end of the motor - you would then be able to sense the current during the FET off time as well to get a motor average current - is this because it is added to an existing machine?

Also you are going over the max VGS for the MOSFET - it is only rated to +/- 20V or it might breakdown.

Related Topic