At 05:52 PM 7/23/01 -0300, Edson Brusque wrote: >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? You aren't turning on the transistor much. What's it's beta value? You need to divide the solenoid current by that value, which will give you the base current. Then, re-calculate your 10k, to provide enough base current. The pull-down resistor can be much larger, it only needs to swamp out the max leakage from the PIC when it's in the low, or high-z state. A series diode with the 10k may help assure an OFF off state. -- Dave's Engineering Page: http://www.dvanhorn.org I would have a link to http://www.findu.com/cgi-bin/find.cgi?KC6ETE-9 here in my signature line, but due to the inability of sysadmins at TELOCITY to differentiate a signature line from the text of an email, I am forbidden to have it. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.