Drive a relay coil AND an led with one digitalOut?

Hi All,

I'm making a small circuit board with three relays and three push button switches. I want to also have LED indicators when the relay coil is being powered but I want to reduce the number of wires going into my circuit from the arduino. I thought of having the output that powers the coil also power the LED but it doesn't appear to be working and I think it's because the 40mA output just isn't enough to power the coil and LED. How can I up the current to power both ?

Thanks in advance,
Mark

Use a transistor to power them both. I would have thought there wasn't enough power to power a relay coil with the direct output.

Are you using a LED and resistor in series across the relay coil?

Yes I'm using the LED and resistor in series.
I'm currently using a transistor. I guess I just need one with a higher current.

I guess I just need one with a higher current.

No I wouldn't think so, I can't imagine a case where a relay would work but an extra LED and resistor across that relay stops it from working. My guess is you have something else wrong. Try it with just the relay and then just the LED.

Can you show us a drawing of how you are trying to wire the relay and LED, a picture is worth megawords and your transistor switch should be able to handle both.

Lefty

I can't show a drawing right now but I can say this.
I tested with just the relay and it worked fine. Then I tested with just the LED and it worked fine.

I have the relay coil and the led with resistor connected to the emitter of the transistor and it just doesn't work. I have the LED in the right way and I am using a small 100 resistor.

I will try to upload a drawing soon.

Mark

"I have the relay coil and the led with resistor connected to the emitter of the transistor and it just doesn't work. I have the LED in the right way and I am using a small 100 resistor."

Normally a NPN switching transistor has it's emitter connected to ground. The collector should go to the relay and LED and the other end of the relay and the LED's resistor should both go to the positive voltage source. A picture can confirm if you have it wired correctly or not.

Lefty

Actually I just checked the datasheet for my transistor and I DO infact have the collector connected to the coil director. The emitter is connected to ground.

What value of base resistor are you using, maybe that is too high considering the gain of your transistor. Try halving its value.

I have the relay coil and the led with resistor connected to the emitter of the transistor and it just doesn't work. I have the LED in the right way and I am using a small 100 resistor.

The LED/resistor is not in series with the relay coil is it?

It should look like this:-

Thanks a lot for that.
I'm going to double check my circuit when I get home.

You should also be able to put the LED in series with the base resistor of the transistor; that lets you save a resistor...

Thanks guys for your help. I got it working.