Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to control five * 5v relays from a micro-controller. However I'm having issues powering more than two at a time

Some notes

Here is the circuit


I can power two relays but any more and they wont switch. I get the same result without the PIC, i.e. if I just provide 5v to the transistor or even the relays directly.

I have three concerns

  1. Should I be using a resistor in series with the relay?
  2. Why can I not power more than two at a time?
  3. I suspect my diodes are in the wrong place to protect the pic?


share|improve this question
2: Measure the 5V line from the 7805 and see if it falls below 5V when you apply more than two loads. – Dejvid_no1 May 31 '14 at 8:08
up vote 3 down vote accepted

Assuming you are using the 5V versions of the family of relays you've linked (005-360), the coil resistance is between 62.1 and 75.9 ohms. Under 5V, that's 81mA each, so you shouldn't have any problem powering 5 of these (403mA) on the current limit side: the 7805CV is internally limited to 750mA typical (1.2A max).

However, depending on your casing, the temperature overload protection might activate: for a T0-220 for example, the thermal resistance junction to ambient is 50°C/W and you're dissipating 5V x 400mA with 5 of them which yields a temperature increment of 100°C with respect to ambient. The thermal resistances are approximate, so that might put it beyond the 150°C limit (which also may be set lower).

Nonetheless this is for 5, it should not be a problem for 3 except if the thermal limit is really lower than operating range. If you want to add a current limiting resistor, beware of the pickup voltage which is 3.75V: any less voltage on the coil and it won't be able to pick up the contact. That means the resistor shall not be more than 20 ohms otherwise the voltage divider will leave less voltage for the coil (be sure to use at least >0.25W resistors). But I would suggest first to measure the voltage delivered by the 7805 while touching it briefly (caution, it may burn!). Then make sure that pickup voltage is really 3.75V by gradually increasing the applied voltage in order to select your current limiting resistor.

Also, you're not actually giving 5V, but 4.3V since the diodes are in series. Not only that but they can't fulfill their job which is to allow the current that can't briefly stop in the inductor to loop around: put them in parallel with the coils instead of in series. Otherwise, the coil will resist switch-OFF by producing a massive voltage between its terminals which may damage the transistor, the diode, or even the regulator.

share|improve this answer
I checked amps used per relay and I could not understand why they would not switch. Thanks for the explanation of the data sheet. I'll read it again now that I know what to look for. Correcting the diode placement (parallel not series) did get all 5 working. The 7805CV (T0-220) does indeed get very hot. Should I consider a second one and split the relays between the two of them? – Andre May 31 '14 at 11:57
It does seem like the relays need more than the stated 3.75v pickup voltage. Anything much under ~4.5 and they are not happy. I measured the 7805 and it holds the 5v now for all 5. – Andre May 31 '14 at 12:00
They did say "Pickup voltage [is estimated to] 75% of rated voltage" but I did not expect it to be that off. That makes your diodes in series the culprits (with the small Vce of the transistor). – Mister Mystère May 31 '14 at 12:09
All connected to the pic with 220ohm resistors on the data line (to npn base) and diodes in parallel and everything works 100% now. I'm using two 7805CVs and that seems to keep their temperature down. Thanks for all the tips. I've go re-read the relay data sheet now that I understand a bit more about it – Andre May 31 '14 at 13:21
You can drop the "seems to": since the current is split into two, the power dissipated "voltage drop x current" is also half, hence the same for the temperature rise. – Mister Mystère May 31 '14 at 13:27

For your diodes in the relay they aren't on the right spot indeed. It's called a flyback diode and should be wired like this.


Also check the Wikipedia site.

Secondly I see that you're giving the positive power to your relay using the 7805 IC. I suggest to give an output of your pic to high and connect the other side of the relay to the GND. Since the output of the PIC should be +5V.

share|improve this answer
I would never have done this, it seems counter-intuitive... Thanks for the link I'll go read up and try understand the theory. – Andre May 31 '14 at 13:22

I think you are drawing too much current.

Try inserting a small current limiting resistor in series with diode on either anode or cathode side.

Also, you might need a small resistor between the base and the PIC's GPIO to prevent drawing too much current from PIC's GPIO.

share|improve this answer
I added a 220ohm relay on the GPIO pins, thanks for spotting – Andre May 31 '14 at 13:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.