Hi all,
I have been attempting to put together a circuit to, under MCU control, vary the charge rate of an existing RC timing circuit. (Previous threads
here and
here.)
To summarise my application: The RC timing circuit is used to set a delay for periodic activation of a relay which switches a load (a motor). At the moment, the delay is set by a 0-47K pot in series with a fixed 13K resistor. I cannot modify any parts of the existing circuitry, save for substituting the pot (is external to the board, via 2-pin connector). The load-driven mechanism has a 'home' switch that serves two purposes: a) ensure the mechanism always completes one cycle, regardless of if the user presses the 'start/stop' switch; b) changes the polarity of the timing capacitor, such that when the cycle completes, it is discharged and the charging time can begin again.
I simulated the existing circuit:
In the sim, I am manually toggling the 'home' switch, but in reality this occurs automatically (due to the mechanism) about 100msec after the relay switches, and again when the mechanism cycle completes. Note the over voltage and negative voltage at the test-point 'TP'.
I simulated the new circuit, where I have a P/N-channel pair being PWM-ed to control the current flow to the capacitor by varying the duty cycle. It seemed to work quite well, so I built it up and tested it.
Unfortunately, while the circuit initially appeared to work fine, at some point the P-channel MOSFET died. I can't work out why that would be.
I started off my testing with the PWM duty cycle quite high - around 90 percent. This produced the desired short cycle time. I then adjusted the duty cycle down to minimum - about 5%. The cycle delay time got much longer (I wasn't timing, but it seemed like about 20 seconds), and when it came to switch the relay, something odd happened. I got a buzzing sound, which I presume was the relay, and the load motor started to move the mechanism, but then abruptly stopped, I think perhaps at the point it would have toggled the 'home' switch. The buzzing was still going on until I hastily shut off power.
The P/N MOSFET pair I was using for testing is a
Diodes Inc. DMC3028LSDX with both on the same IC. The N-channel is fine, but the P-channel is a dead short from source to drain, with a resistance of approx. 1 ohm. No visible damage or magic smoke released.
Does anyone have any ideas as to what killed the P-channel MOSFET, and what I can do to prevent it? Any help would be most appreciated.
I have a hunch that the relay contact buzzing may have been because I turned the duty cycle down too low, such that at my fairly low PWM frequency (122Hz), as the current through the BJT was just approaching the threshold for the relay to turn on, the PWM caused the contact to oscillate. But how that then causes damage the P-channel MOSFET, I have little idea.