I found this circuit design for constructing a variable resistor. Its seems that the resistance can be controlled by the duty cycle of PWM on MOSFET. Would you explain what is the purpose of having capacitor connected in parallel with the MOSFET? In addition, how to determine a specific value for the capacitor?
3 Answers
1) There is no value in having the cap connected across the MOSFET.
2) Your PWM won't work to do what you want, all it'll do is toggle the value of the resistor pair between 1 and 11 ohms if the MOSFET can go from an open to a short.
3) All of the PWM circuitry is floating.
4) If you want a variable resistance, do your PWM like this:
As shown, the job of the capacitor is to destroy the MOSFET.
ie it is incorrectly shown.
When the MOSFET turns on it will dissipate the capacitor energy in the MOSFET.
This circuit would be better with inductive smoothing, when it would become a buck converter, but ...
Smoothing current waveform:
Instantaneous voltage changes across the capacitor must be avoided as in theory they are impossible and in practice attempts to cause then produce high currents and undesired energy dissipation. So,
Add second 1R or split 1R into 2 x 0.5R.
Connect capacitor across either or the two split-resistor portions.
Just smoothing ammeter reading:
Connect the capacitor 'across' the ammeter, from ammeter +ve to ammeter -ve.
The usually low impedance of the ammeter makes this hard to do well - ie a largish cap value is required for a given PWM frequency.
This will have a small smoothing effect overall but if Rmeter < 1/2 Ohm adding the capacitor across the split 1 Ohm is more effective.
It's a low-pass filter to smooth out the PWM signal.
The value would be such that the time constant of the filter is fairly large compared to the duration of the pulses. I assume the FET is either on or off (PWM pulse high or low), but you'd like your variable resistance to be fairly smooth over time. Then the filter needs to filter out the pulses and leave a resulting signal that's fairly smooth and proportional to the duty cycle. The trade off is ripple in the output signal (filter cut off is too high) and delay in changing the resistance (filter cut off is too low).