Electron schreef op 28-Feb-15 om 11:10 AM: > Hello, > please take a look at the following circuit: > http://oi57.tinypic.com/256h0fa.jpg > > I use a high voltage (500V) PNP transistor as a high side switch. > With a PIC pin I turn it ON or OFF, through the NPN high voltage (500V) t= ransistor. > The 200K resistor is to partially turn ON the transistor when the PIC is = in tri-state (e.g. during brief reset time). Then the PIC will be either ON= or OFF, so it will be able to withstand also the leakage from that 200K re= sistor (2 mA worst case, the protection diodes can withstand it). 200K and = 2K resistors are of course rated for 400V (actually I use a couple of 200V = equal resistors (half resistance) in serie). > > Basicly the PIC knows the voltage of both sides, and turns ON the switch = when the left side voltage is higher than the right side voltage, with some= exceptions. > It's like a diode, but being in software it allows me to do things that a= diode cannot do. > Switching speed can be in the KHz region. The impedance is not really low= (currents are 100 mA peak max, and limited by the source anyway). > > Now the question: do you think that the Rb resistor is really necessary? > If so, why? > Static case: Without that resistor the off-current (leakage) of the NPN=20 will be amplified by the worst case (in this case: highest) Hfe of the=20 PNP. The resulting current will flow through the PNP, even when it is=20 supposed to be off. The Rb is there to 'take' this current without=20 causing the BE junction of the PNP to conduct. So this resistor must be=20 less than 0.6V/(NPN leakage). Dynamic case: When the NPN switches off, the charge on the base of the=20 PNP will keep it conduction for some time. The Rb resistor will amek it=20 switch off faster. Suggestion: add a 5V zener from NPN base to ground, and put the 2k in=20 the emitter lead. That makes the NPN stage a constant current sink, so=20 you will have more predictable properties. Wouter van Ooijen --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .