On Saturday, Jan 17, 2004, at 13:48 US/Pacific, Anthony Toft wrote: > With Mr Lathrop's comments in mind, I have reworked the schematic as > best I know how, and the image and web page along with it. > Much better. You comment that the resistor's base resistor is sized to match the current requirements of the solenoid (presumably taking into account the transistor beta.) In general, that's a mistake; when using a switching transistor, you want to drive it well into saturation, and let the solenoid itself limit the current.) You definatly DON'T want a transistor to be operating in it's linear region, cause it's not really a "power" transistor. So you want the base current to be much higher than Ic/beta; I'd go ahead and set it so that you're getting near the PIC's Maximum output current (20mA?), which puts Rbase at about 200ohms. With 20mA of base current, you only need a gain of 60 or so to get into saturation, which is well within the specs of the transistor you picked. With the 1.1k resistor you have, you need a gain of over 300, which starting to get into the range where you have to be careful AND lucky to get the right transistor. A lot of designing transistor circuits seems to be correcting for the fact that a transistor's gain is NOT one of their tightly controller parameters... BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads