Electronic – Slew Rate Adjustability

microcontrollerpmosraspberry pislew-rateswitching

PMOS switching circuit

A SPST switch connects HB1 and HB2, to control a lamp connected to HB OUT. I am looking into modifying this circuit to make the slew rate adjustable when switching the output to VCC (around 12V). I would like to be able to control the slew rate with a controller such as Arduino or Rasperry Pi.

The slew rate seems to be affected largely by C1. I found some digitally controlled pots like this one: https://www.sparkfun.com/products/10613 , but there don't seem to be digitally controlled capacitors.

I have also been looking into adding circuitry such as this op amp design from TI to control the slew rate: http://www.ti.com/tool/TIPD140#0

I am a beginner when it comes to electronics so any suggestions/insight would be greatly apprecitated.

Best Answer

The conduction of the MOSFET is controlled by its total gate charge \$Q_g\$: operating a MOSFET is equivalent to charging and discharging its gate capacitance, bringing it from its "OFF" state (zero conduction between the drain and source electrodes and \$Q_g=0\$) to its "ON" state (full conduction between gate and source electrodes and \$Q_g=Q_{g\max}\$) and the other way around. The process is exactly the charging of a (nonlinear) capacitor: if you want to control the "speed" of the transition between these conduction states, the simpler way is to control the charging current. Looking at your circuit, the best way is perhaps to change you input saturated switch \$\mathrm{Q}_2\$ with a properly controlled "amplifying" current mirror: the current charging the gate is controlled by the potentiometer \$\mathrm{PT}_1\$, which can be a digital one.


simulate this circuit – Schematic created using CircuitLab


  • By using this circuit, you can control the charging speed of the gate of \$\mathrm{Q}_1\$ without varying its gate capacitance (i.e. without changing \$C_1\$). Lowering the value of \$\mathrm{PT}_1\$ rises the \$I_{C2}\$ current which in turn rises the \$I_{C3}\$ current (the amplifying factor is a function of the values of \$\mathrm{R_{E1}}\$ and \$\mathrm{R_{E2}})\$ and lowers the charging time of the gate of \$\mathrm{Q}_1\$, lowering the rise time of its output. On the other way around, rising the value of \$\mathrm{PT}_1\$ lower the output rise time.
  • Of course you can design a better current controlled gate charging circuit than the one I proposed, but the latter one can be designed to be very fast, if needed.

New edit

A relationship between the input current \$I_{in}\$ from the \$\mathrm{HB}_1\$ switch and the \$I_{C3}\$ discharge current as a function of the resistors \$R_{E1}\$ and \$R_{E2}\$ which can be deduced from the circuit properties of the bipolar junction transistor is the following one: $$ I_{C2}\approx\frac{h_{FE}}{(h_{FE}+1)\frac{R_{E2}}{R_{E3}}+1}I_{in} $$ where

  • \$h_{FE}\$ is the current gain of \$\mathrm{Q}_2\$ and \$\mathrm{Q}_3\$ (assumed to be the same).
  • \$I_{in}=\frac{V_{in}-V_{BE1}}{R_{E2}+R_{E3}}\approx\frac{V_{in}}{R_{E2}+R_{E3}}\$