Jaume Aragay Badia wrote: > I use a 16F84 to drive four relays fom pins 1, 2, 3 and 4 on PortB > and, when testing, I got that pretty 5V output, but now in circuit the > output lowers to 2V aprox. Am I sinking too much current? The four > relays never work at the same time, BTW the circuit a friend of mine > suggested is a 4N25 optoisolator driving a BD139 transistor to get > enough current for the relay coil, and a diode across this coil. The > circuit has to work in welding environment so I used the optoisolator. OK now, before you ask the question, you need to describe the problem. So far we know you are using: 1} Four relays of some sort. We don't know what current they draw. 2} A friend suggested an optoisolator and driver transistor. We don't know whether you are using this or are just thinking about it. 3} A PIC16F84. We don't know how big a regulator you are using to derive the 5V. A 78L05 shuts down at about 150mA. *IF* you are using opto-isolators, we need to know the circuit. In particular, the drive resistor from the PIC to the optocoupler LED, what optocoupler type and whether you are driving it from ground or the 5V rail. We need to know all the resistors associated with the phototransistor and relay driver transistor, the latter's type, what voltage it is driven by, how regulated and whether this is separate from the power supply to the PIC. In short the whole circuit. If you can supply that, we can talk. Of course, this discussion contains many subtle (;-) hints as to what may be the problem and quite possibly, you might fix it yourself. -- Cheers, Paul B.