Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 5th May 2004, 10:10 PM   (permalink)
Default LED as resistor

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?
__________________
Mark Higgins
DirtyLude is offline  
Old 5th May 2004, 10:30 PM   (permalink)
Default Re: LED as resistor

Quote:
Originally Posted by DirtyLude
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?
Optikon is offline  
Old 5th May 2004, 10:48 PM   (permalink)
Default

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.
__________________
Mark Higgins
DirtyLude is offline  
Old 5th May 2004, 11:57 PM   (permalink)
Default

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.
Sebi is offline  
Old 6th May 2004, 12:44 AM   (permalink)
Default

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.
__________________
Mark Higgins
DirtyLude is offline  
Old 6th May 2004, 02:47 AM   (permalink)
Default

Yes, you need the back swing diode, it prevents the voltage from going too high. The internal diode prevents the voltage from going too low.
__________________
see my website: www.geocities.com/russlk
Russlk is offline  
Old 6th May 2004, 04:22 AM   (permalink)
Default 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.
__________________
The great thing about electronics is unlimited ways to do the job. The only limit is one\'s imagination. I generally think my way is best.
Show me a different way. I have an open mind.
k7elp60 is offline  
Old 6th May 2004, 02:02 PM   (permalink)
Default

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.
__________________
Mark Higgins
DirtyLude is offline  
Old 6th May 2004, 08:16 PM   (permalink)
Default 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.
__________________
The great thing about electronics is unlimited ways to do the job. The only limit is one\'s imagination. I generally think my way is best.
Show me a different way. I have an open mind.
k7elp60 is offline  
Old 6th May 2004, 10:27 PM   (permalink)
Default

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.
Oznog is offline  
Old 7th May 2004, 01:49 AM   (permalink)
Default

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.
Attached Images
File Type: gif relay_sample.gif (5.1 KB, 606 views)
__________________
Mark Higgins
DirtyLude is offline  
Old 7th May 2004, 02:23 AM   (permalink)
Default

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..
__________________
gerty
gerty is offline  
Old 7th May 2004, 02:30 AM   (permalink)
Default

No, Gerty, when Q1 turns on, the LED goes out.
__________________
see my website: www.geocities.com/russlk
Russlk is offline  
Old 7th May 2004, 02:33 AM   (permalink)
Default

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?
Attached Images
File Type: gif relay_sample2.gif (4.9 KB, 592 views)
__________________
Mark Higgins
DirtyLude is offline  
Old 7th May 2004, 02:38 AM   (permalink)
Default

Russell, you're right.. Q1 will shunt the led...Tooo tired ...must sleep. ops:
__________________
gerty
gerty is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 10:01 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker