Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LED as resistor

Status
Not open for further replies.

DirtyLude

Well-Known Member
This should be a fairly simple question.

I have a microcontroller activating a TIP120 that will drive a relay. I would like a status LED that tells me that the microcontroller is turning the TIP120 on. I figured I could kill 2 birds with one stone here and use an LED to show me the status and to limit current to the base of the TIP120.

I've tried it out and it works. I simply replaced the 10k current limiting resistor with an LED. Using a multimeter it shows the specific LED's I would be using have 8k resistance, which should be fine. Since the TIP120 is pulling current it also prevents the LED from getting too much current in turn.

I just wanted to make sure there's nothing technicaly wrong with doing this. Also, if the LED blows for any reason, will it stop the circuit all together, or will current still pass though?
 
DirtyLude said:
This should be a fairly simple question.

I have a microcontroller activating a TIP120 that will drive a relay. I would like a status LED that tells me that the microcontroller is turning the TIP120 on. I figured I could kill 2 birds with one stone here and use an LED to show me the status and to limit current to the base of the TIP120.

I've tried it out and it works. I simply replaced the 10k current limiting resistor with an LED. Using a multimeter it shows the specific LED's I would be using have 8k resistance, which should be fine. Since the TIP120 is pulling current it also prevents the LED from getting too much current in turn.

I just wanted to make sure there's nothing technicaly wrong with doing this. Also, if the LED blows for any reason, will it stop the circuit all together, or will current still pass though?

Let me see if I understand your setup. I am sort of guessing here so correct me if I am wrong. Your TIP 120 emitter is connected to GND, the base goes to cathode of LED, the collector goes to relay coil. The micro output goes to anode of LED (LED is in series with the base).

You are running a 5V system so the micro presumably outputs about this many volts when you "turn on" the TIP120? (+5V to anode of LED)

Is this how you have it hooked up?
 
I'm using a 3.3v microcontroller, but otherwise, yes, that's exactly it.

uC -> LED -> Base
Emitter -> GND
Collector -> relay coil

I have a protective diode here to catch the back current from the coil when it deactivates. Do I need this? I noticed that the internal schematic of the TIP120 shows a built in diode.
 
The LED same as zener diode with about 2V if this is a red LED (the voltage depend from LED color). The TIP120 is a darlington so the E-B voltage is 1.4V. Not a correct solution, because these voltages depending from temperature.
 
This is why I asked. It's never as simple as I want it to be.

The final circuit will need to work reliably in a fairly wide range of temperatures.

Thanks.
 
LED as a resistor

Leave the resistor from the uprocessor to the base of the TIP120. Connect a current limiting resistor in series with the LED, and connect this
series assembly in parallel with the relay coil. When the TIP120 is turned on the LED will be on also.
 
You mean put the LED on the other side of the transistor. The same power that activates the 12v coil?

This power is pretty dirty. This is going in a car engine bay, the relay itself will be powering some fans. I'm worried that voltage spikes will kill the LED's.
 
LED as a resistor

Sjould work fine, I have used this approach many times. That is assuming you have the relay connected between the collector of the TIP120 and + 12 volts, so when the TIP120 turns on the collector goes near ground and turns on the relay. If you use a 1.2K ohm 1/2W resistor the LED current will be about 10mA.
 
Very improper. An LED has a very nonlinear IV curve so that it NEEDS a current limiting resistor, something with a straight IV. It doesn't function as a current limiter.

It's not impossible that it turns on, but it's not limiting current the way it's supposed to and you can blow both the LED and transistor under the wrong conditions. So I'd recommend putting the resistor back in, and adding a resistor/LED combination to the logic output if you want to watch it turn on.
 
Okay, the final circuit then. I wanted to avoid putting the LED on the 12v side of the circuit, but it looks like the only way.

Thanks for your help.
 

Attachments

  • relay_sample.gif
    relay_sample.gif
    5.1 KB · Views: 739
Looks like the led is in series with the coil..I believe the led will stay lit all the time, dim with output low and bright with output high..
 
Oops. I made that incorrectly. I'll update the schematic. I have it here on a breadboard, I just copied it down wrong.

EDIT: updated.

Is the Diode in the right place, or should it be on the other side of the LED, or does it matter?
 

Attachments

  • relay_sample2.gif
    relay_sample2.gif
    4.9 KB · Views: 733
I always connect the indicator LED seriel with relay coil. If the desired current of LED e.g. 10mA, relay coil suck 50mA, need a shunt: LED voltage/40mA, about 47ohm.
 

Attachments

  • relay_sample2_106.gif
    relay_sample2_106.gif
    2.7 KB · Views: 346
What's the advantage to this method?

When I try it that way, it looks like the LED sucks 2 volts out of my 12volt power to activate the coil. It still works, but the coil needs at least 8 volts to activate. It gives me less leeway, and I'd like this to operate even if the 12v supply gets very low.

I can hear that the coil doesn't activate as stongly as it used to. I'm also worried, because the relay will see alot of vibration, if it's not held firm it may uncouple.

If this just helps reduce current consumption I'll do it the other way. Current saving isn't a priority.
 
LED as a resistor

The schematic of what I meant with the diode in parallel with the relay coil is the first drawing. The second drawing is simpler, and as long as there
is + 12 volts where the TIP120 is it should work also, and the relay can
be in another location without running an extra wire back to the LED circuit.

DirtyLude is correct, It is not a good idea to put the LED in series with the relay coil as it will drop the voltage about 2 volts, and if the LED current is lower that the relay current an additional resistor would be needed to drop the 2 volts at the relay coil current.
 

Attachments

  • RELAY_124.jpg
    RELAY_124.jpg
    11.1 KB · Views: 328
LED as a resistor

Led on indicator without relay
 

Attachments

  • LED_168.jpg
    LED_168.jpg
    8.2 KB · Views: 323
Re: LED as a resistor

k7elp60 said:
The schematic of what I meant with the diode in parallel with the relay coil is the first drawing. The second drawing is simpler, and as long as there
is + 12 volts where the TIP120 is it should work also, and the relay can
be in another location without running an extra wire back to the LED circuit.
Thanks. Looking at it quickly, it looks the same as my corrected one. I'll be using it as the final design.
 
Status
Not open for further replies.

Latest threads

Back
Top