DO design solution

Thread Starter

dr.luk.bgd

Joined Jul 6, 2023
7
Hi,

I am thinking what is the best solution to use NPN or PNP transistor in application for digital output. Below is sketch for comments.

1688699689545.png

If someone have explanation and suggestion what are benefits to use NPN or PNP transistor. All comments regarding schematic are welcome.

Thanks.
 

MrChips

Joined Oct 2, 2009
34,810
I think that you are asking the wrong question.

There is no best solution or advantages to NPN versus PNP.
It depends on the application and circuit configuration. Yes, there are some differences in the specifications of each transistor but in general they operate in the same manner on opposite voltage polarity.

In general, NPN transistor operates on positive current flowing from collector to emitter, while PNP transistor operates on negative current from collector to emitter. That is the fundamental difference.
 

Ian0

Joined Aug 7, 2020
13,131
With the circuit as drawn, there really should be another resistor between base and emitter to make sure that the transistor switches off.
If you uses a PNP , to make a Sziklai pair, then you can save one resistor, but you get 0.6V less across the relay.
Unconventional, but effective.
Screenshot from 2023-07-07 06-26-54.png
Or alternatively, get a opto-darlington that can switch enough current to drive the relay.
But as the relay isolate the final output from the microprocessor, what is the point of the opto? What is it isolating if both input and output are connected to the same ground? Just drive the transistor from the processor output.
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,082
Hi,

I am thinking what is the best solution to use NPN or PNP transistor in application for digital output. Below is sketch for comments.

View attachment 297830

If someone have explanation and suggestion what are benefits to use NPN or PNP transistor. All comments regarding schematic are welcome.

Thanks.
Why bother with opto-isolator U5 when you have the grounds on both sides of that opto connected to the same point? I'd certainly ask for a justification if you were working for me.
 

MisterBill2

Joined Jan 23, 2018
27,514
the answer will be more driven by logistics than performance. The supply of suitable NPN transistors is less likely to experience a disruption, and so I recommend an NPN device. In addition, servicing will be slightly simpler with the emitter at common . Functionally it would not matter, but logistics and availability does matter a bit.
 

MaxHeadRoom

Joined Jul 18, 2013
30,659
If using both common's connected and fed from a micro, why not use a logic gate level Mosfet, 2n7000 !
No need for the Opto !
 
Last edited:
Top