Add a resistor between the collector of Q1 and base of Q2. As it stands you will be shorting the power supply via Q2 base - probably blowing either or both transistors. I don't know the current levels involved but something like 3k3 may be appropriate as a guess. And, as mentioned by Andre (below), a base-emitter resistor on Q1 will ensure it turns off in the event the input is open circuit. RP 2008/10/12 Andre Abelian : > You need to put pull down resistor on npn transistor. That's why it doesn't > Work correctly. You didn't mention how are you turning it on? Are you using > pic? > If yes then the schematic needs to be changed you may need to add opto > coupler instead > Of npn transistor other wise pic will get higher then 5 v. > > Andre > > > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of > Info > Sent: Saturday, October 11, 2008 4:44 PM > To: 'Microcontroller discussion list - Public.' > Subject: Relay replacement (High side switch) > > 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 > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist