> > > On Oct 11, 2008, at 5:44 PM, Info wrote: > > Hi, I am trying to build a high side switch as a replacement > for an old relay using a PNP transistor. The load must be driven > from 24vdc comming from the relay then back through GND. The > coil was driven by 24v then to GND. > > See attached schematic. > I got the PNP switch working. If the base floats or > is connected to GND the output is off. When its connected > to 24v the load is switched on. So far so good. > > Unfortunately that is the opposite of what is needed so > therefore I added the NPN inverter which works fine by itself. > The problem comes when the two circuits is connected toghether. > The PNP doesnt switch off when its connected to the NPN inverter. > > Why doesnt this work, what is needed to make the PNP switch > off by the NPN ? > > If there is some major problem with my approach I am open for > other solutions. This is a one off btw. > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist 1) The PNP will be off if the base is floating or the base is connected to 24V. ( not as you said to gnd ) Perhaps you do not have a PNP for Q2. That might explain the problem. 2) You may want to consider limiting the current flowing from the base of Q2 by using a series resistor. This would protect Q2 ( and not change the operation of the circuit ). 3) You may want to put some voltage limiting circuitry across the relay inductor. ma -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist