oops, forgot to recalculate that from my 12V usual. Thanks for catching that (again). Bill -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Spehro Pefhany Sent: Friday, March 19, 2004 4:31 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE]:Urgent help needed with high voltage logic switch. At 04:03 PM 3/19/2004 -0500, you wrote: >Steve, >1. Try something like this: > > (view only with fixed-pitch font) > > +160VDC > | > | > x---x--------------x > | | / | > [47K] /-- | > | /\ 15V S | > | | |--x P-channel MOSFET > x---x---------| | > | |--x > [8K] D | > | | > | [ R limit] > PIC |/ | > o-----[Rg/Rb]----| | > |\E {lots of LEDs} > | | > | | > 0V-----------------x------------------x > >You can use your BS170 to drive the power fet or just a generic NPN. >Don't forget a clamping diode on the base / gate of the npn / nchannel. >I use this a lot for driving LEDs, but the voltage source is only 12V. > >2. If you can, switch over to just an N channel power fet and sink the >load. Fewer parts. This will work. The MOSFET you have is pretty low gate charge so it should switch fast enough. However, this circuit dissipates 3.2W unnecessarily in the 8K resistor. The same result can be had by swapping the 8K with a 47K 1W resistor and putting a 10K or so where the 47K is. The zener voltage isn't critical, 12V would work fine too. Using an N-channel MOSFET and switching the low side would be better, as has been said. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.