I need to generate 0-15V output PWM singal ( max out put current is 4.5 mA only), using micro controller PWM feature. I observe one Design by using Two Transistor(PIC 1) ,I don't why two transistor needed for this , I think this can be done by sigle transistor only (PIC1). Tansistor used is MMBT2222A NPN.

enter image description here

Q1) One reason I can think , to keep same polarity of both input and output signal, but does it matter if some load need PWM input to drive it.

Q2) R1, R3 and R7 is to protect transistor from floating base condition , Correct me if i ma worng.

  • \$\begingroup\$ Without knowing speed, rise and fall times and load it's impossible to answer specifically. \$\endgroup\$
    – Andy aka
    May 16, 2016 at 9:32
  • \$\begingroup\$ Load DC motor , 15V, 2.5mA is control signal to control speed of DC motor , PWM speed 500 Hz Max \$\endgroup\$
    – Bharav
    May 16, 2016 at 10:11
  • \$\begingroup\$ Why don’t you replace R3/R8 with your load? Or is it supposed to represent your load? If power consumption is important you should also use MOFETs to avoid the base currents. \$\endgroup\$
    – Michael
    May 16, 2016 at 12:58
  • \$\begingroup\$ No it not my load, its control signal (15V 2.5mA) to Control the speed of my load.(DC motor) \$\endgroup\$
    – Bharav
    May 17, 2016 at 4:05

1 Answer 1


You are right on both points. First schematic preserves polarity from input to output. But it is often unnecessary. Because most of the time, you can decide on the polarity of the signal from your firmware, you can counter-balance the fact that the polarity is modified if you choose the second schematic. And it uses less components, so I'd go for this option.

R1, R3 and R7 is used to force the transistor off when the PWM output is floating. But once again, it is most of the time unnecessary. From the firmware, make this output a push-pull output, and you can get rid of those resistors. There would be eventually a uncertain zone during the time the MCU powers-up until you configure the output, but this is a very short time, and BJT tansistors don't usually turn on by themselves anyway, unless you are in a very noisy environment. Thoses resistors would be more useful for mosfets, but for BJT, you can avoid them.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.