Your drive to the transistor is rather weak. Do you know how much current the solenoid draws? The part number of the transistor would help too. Can you give us the transistor voltage when it is turned on? The first thing I would try is to reduce the 10K resistor. Changing it to 1K or even 220 ohms would drive the transistor harder and make it turn on more completely. Sherpa Doug > -----Original Message----- > From: Edson Brusque [mailto:ebrusque@TERRA.COM.BR] > Sent: Monday, July 23, 2001 4:53 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [EE]: How to control a 24V solenoid with a PIC and a > transistor? > > > Hello, > > I'm trying to turn a 24V solenoid (electro-magnet) with an NPN > transistor (TIP41) wired to a PIC. Here's the circuit: > > > 24V-----------+ > solenoid (with reverse diode) > C-----------+ > PIC----10K--+----B > | E > 1K | > | | > GND GND > > It's not working. It seens the transistor have a much > larger resistance > (when on) than the solenoid (about 5 ohms). When I disconect > the solenoid, > the multimeter shows 24V ok when PIC pin is high. With the > solenoid, it > shows below 1V (more like a hundered millivolt). > > Please, someone can help me? > > Thanks, > > Brusque > > ----------------------------------- > Edson Brusque > Research and Development > C.I.Tronics Lighting Designers Ltda > (47) 323-2138 / (47) 9993-6453 > Blumenau - SC - Brazil > www.citronics.com.br > ----------------------------------- > > -- > 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.