Relay and LED Circuit...Nooby Needs Help

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Phrazemaster

Well-known member
Joined
Oct 2, 2006
Messages
2,010
Location
Southern CA
Gentlemen and gentlemen,

I know this is crazy basic, bear with me. I did well in electronics physics in High school, but that was almost 25 yrs ago! I've just ordered a basic electronics book off amazon, so I'm learning.

However, until I get myself up to speed, I'm lost with the basics.

I have a SPDT illuminated switch I will be using to power HPF and Phase circuits. I plan on using an LED and relay with the switch. After a couple of questions and posts, it's clear I can arrange this with the relay coil in series or parallel with the LED. So far so good.

It was also pointed out if I wire in series and the LED goes, the circuits won't function--a good thing I think, because a non-illuminated LED tells me either the relay coil or the LED is blown. So I thought series would be better. With me so far? I hope this is making sense.

So now it comes to actually choosing the components. I'm mystified as to how to go about picking the parts. I don't know how closely to match the voltages of the LED/relay, etc.

My noobie thinking is, get a relay and LED within similar operating specs and it should work. To that end, I've found a 4.5V relay with a coil on V of 3.38 and a current rating of 31ma. I found a white LED with 3.5Vf and 30ma operating current.

So, how do I go about knowing/deciding if this is "close enough" and will work; are there some calculations or rules of thumb to consider? Does this sound reasonable? In my beginner thinking, I can use a coil-on of 3.5V for the relay, and this matches the LED Vf. The currents are very similar at 30ma vs 31ma. So, this is a slam dunk easy? Or is there something else I'm missing? Do I need to consider the resistance of the LED and the coil as part of the circuit, and what about putting in the legendary current-limiting resistor for the LED? I hear LEDs can go thermal on you...

Seems to me I should be able to just wire these in series and they should work beautifully...whaddya think?

PS for the curious I am thinking of using this relay: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=255-1230-5-ND

with this LED: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=160-1735-5-ND (Oh, the main page says this operates at 20ma but the spec sheet says 30ma...unless I'm misreading it)

Thank-you!

 
> I thought series would be better

ONLY if the relay current is suitable for the LED. Many relays draw more current than many LEDs can stand, moreover a max-current LED may be blindingly bright.

Also you have to raise the supply voltage 2V-4V.

Also: a common fault in semiconductors is SHORT. Now the relay is energized, the death-ray (or whatever) is active, but the LED is out and you think the death-ray is "off". (Not So dangerous when switching a HPF....)

> I can use a coil-on of 3.5V for the relay

It barely-works at 3.5V. It is nominal 4.5V, suitable for a 5V system with transistor driver.

5V relays are for 5V chip drivers. Given free choice, 12V and 24V are popular relay voltages. 12V wall-warts are found in junk-bins. Therefore your supply is 12V.

DigiKey has Tyco V23105A5303A201 Telecom DPDT at $2.14. Nominal 12V (9V-24V), 720 ohms, nominal 17mA.

In |parallel| with that coil you run an LED and probably closer to 5mA. 12V supply to 3.5Vf LED leaves 8.5V. 8.5V at 5mA is 1,700 ohms, try 1K or 2K in series with the LED.

Total switch current is 17mA+8mA= 25mA at 12V exact, 54mA if your "12V" wall-wart un-sags to 24V. 24V puts the relay coil 0.3V below rated max, the LED+1K at 20.5mA. You prefer to be closer to 12V but even this poor regulation is nominally safe.

If you "MUST" know if the relay clacked, it may be better to work the indicator from a relay CONTACT. This has problems too: you may need a bigger relay to have the extra contact, which is a less-reliable part, and it is still possible the death-ray circuit closes while the LED contacts have a moth-flake and don't close (a "bug").

My Honda must have two dozen relays, from headlights to some obscure O2 heater. None have failed in 8 years. My microwave oven is from 1983, has at least two relays, has been hit by lightning, and the relays still work. Keep relay systems simple, work them AT nominal voltage, don't put a dozen taillights on a $5 contact, and do NOT worry about reliability.

Can't you find White LEDs for a lot less than $1.60? Note that with 12V supply and a designer-selected series resistor, you do NOT have to hit any specific LED voltage spec. Radio Shed stocks generic White LEDs two for $2, so $1.60/pop is way high. Not really about money, but about design approach which does NOT leave you looking for specific-spec parts.
 
OK, shocker, I think this is starting to make sense...

Can anyone double-check my thinking?

Running the relay and LED in parallel, dealing with the relay branch, using PRR's example:

I have a 15v psu coming into the circuit. The relay is 9-24v. R=720, nominal current is 17ma. I assume we want to run the relay at its rated ma.

Therefore 15v/.017A = 882R for this branch. We already have 720R from the relay itself, so since they're in series I take 882R-720R and get 162R roughly needed to get the coil in optimal operating current. I'm starting to understand the concept of "close enough" and "up to the next standard value," etc.

Is this the right way to think about this?

And for the LED, I actually hooked up a little red one tonight to a 9v and used an 8.25K resistor, found it still lit up with 0.9ma, so I'm learning, I'm learning, I'm learning! I thought you had to run these things at 20ma, 30 ma, etc...amazing what a little actual experimentation will do! I can control the brightness of the LED with the current limiting resistor...yes I think this is all starting to sink in (SLOW PROCESS!)

So anyone care to double-check my thinking about the relay branch?

Thanks!

Mike
 
This is how I see it

V=IxR
for the branch:
15 volts in, you want about 12 for the coil.
dif is 3= 'V'
'I'=.017
solve for unknown 'R'
3=.017xR
rearrange

Voltage dropping R=3/.017
 
Phrazemaster said:
I actually hooked up a little red one tonight to a 9v and used an 8.25K resistor, found it still lit up with 0.9ma ... I thought you had to run these things at 20ma, 30 ma, etc..

I only use 20ma when I'm making a flashlight  ;D  ;D

Usually 1 or 2 ma is plenty with new production LEDs.  And with a blue LED, even that current will cast a light across the room.

You can quickly find different values of current or resistors with my online calculator: http://www.muzique.com/schem/led.htm

regards, Jack
 
shabtek said:
This is how I see it

V=IxR
for the branch:
15 volts in, you want about 12 for the coil.
dif is 3= 'V'
'I'=.017
solve for unknown 'R'
3=.017xR
rearrange

Voltage dropping R=3/.017

@shabtek:

Thank-you, this makes sense. Since the coil itself has a resistance, do I subtract this from the resistance value I obtained from 3v/.0117? Do I even need to figure this in, and if not then why do they publish that with the specs?

Also, do I need to worry about the coil current rating, and figure this in somehow? I'm sure I'm overly complicating it, but I just don't know.

@AMZ-FX:

Thanks! Just the kind of info I needed to know.

Thanks again everyone for your eyes and minds; I really appreciate it.

Mike
 
> Since the coil itself has a resistance, do I subtract this from the resistance value I obtained from 3v/.0117? Do I even need to figure this in

Not sure what you are asking.

You have 15V available, want about 12V in the coil. So that 3V is NOT "in the coil", must be added.

> why do they publish that

It's traditional. V, I, and R are all related.

12V/720 ohms = 0.016666A = 16.667mA
12V/17mA = 705.8 ohms (rounding error)
17mA*720 ohms = 12.24V

You only need 2 of the 3. Which 2 are most useful? Well, covering all bases (3 columns) is better business than losing a sale because a designer was too lazy to do his math.

What if you are out of 162 ohm resistors? How close do you have to be?

The spec says 9V to 24V will work.

I encourage you to get a 12V relay (Radio Shed has some, though not this exact current/resistance) and try it with various resistors. With 15V no resistor it will work fine, but clack loudly and run warm. With 720 ohms series (to give 7.5V) it is not supposed to work at all (but it might clack if you tap it). The Radio Shed 12V relay worked reliably with a fresh 9V battery, quit when the battery weakened.

You should be able to solve a voltage-divider problem with 9V across 720 ohms and the rest of the 15V across a resistor: what value? That's your maximum series resistor. Minimum is zero: 15V is safe though warmly wasteful.

The number I get is 480 ohms. Which does NOT mean a standard 470 ohm will always work. There is 10% or 5% tolerance on the resistor, and some tolerance on relay resistance. Clearly a hi-R "470" resistor and low-R relay could land below 9V.

Personally I'd call it 100-220 ohm +/-20%, just so production is never halted for lack of 162 ohm parts.
 
OK, I'm doing my homework, promise. Voltage divider. Vsourse, Vout, R1 and R2. Vo =Vs* R2/(R1+R2)...makes sense!

Good point about using off-the-self instead of oddball components; will keep in mind.
 
OK, here's a sophomoric schematic for this pathetically simple task (not so easy for me to figure out, but I'm getting there).

Does this look right?

I'm also going to post another view more of the layout concept including the switch a little later.

Thanks any eyes,

Mike
 

Attachments

  • relay-circui3t.jpg
    relay-circui3t.jpg
    13.9 KB · Views: 28
And by the way, how much larger should I make the flyback in terms of voltage? I've heard up to 4x coil voltage; is this too high or should I just get the highest reverse voltage/largest peak forward current/fastest schottky I can find?
 
OK, thanks for bearing with me. I am attaching a quasi-schematic/layout drawing attempting to illustrate more or less a layout for the parts...in other words, my fledgling attempt to translate the schematic into a real layout that I can build. The schematic drawing is a couple posts ago.

Have I done this correctly? Any thoughts about this?

Thank-you,

Mike
 

Attachments

  • relay-circuit---layout-concept.jpg
    relay-circuit---layout-concept.jpg
    20 KB · Views: 8
OK, I thought about it and I think my layout/schematic was wrong. Here's the updated layout.

Note the crossing of the wires has no connection.

 

Attachments

  • corrected-relay-circuit---layout-concept.jpg
    corrected-relay-circuit---layout-concept.jpg
    22.1 KB · Views: 8
Also, Here's a proposed board layout for etching/creation. I'm just including one section, which is one preamp's worth. 2 of the LEDs will run off a relay, and the 3rd (phantom) I have a DPDT switch for pwr and LED so don't need the relay.

The reason the relays sit on a 14pin DIP is I'm going to use a 12v relay that fits a dip socket. The relay only actually has 10 pins, so I'm using the closest available DIP socket for it. The first pin and its mate are the coil. I thought using a socket would be smart, just in case one goes bad over the years. I can easily replace it.

What do you think? Anything glaringly wrong with this?
 

Attachments

  • pcb_LED.jpg
    pcb_LED.jpg
    131.5 KB · Views: 9
That first wiring feeds both 2.4K and relay THROUGH the LED. The second plan may be more complicated than it needs to be?

The spike diode may not be essential when driving a relay with a switch.

It sure does not have to be fancy. 15V reverse voltage.

Without going through all the thoughts: 1N4007. (Not that you need the '07, just that '01 and 1N4148 are no longer cheaper and you should have a big bag of 1N4007 for all ordinary diode uses.)
 

Attachments

  • relay-circuit---layout-fix.gif
    relay-circuit---layout-fix.gif
    8.9 KB · Views: 15

Latest posts

Back
Top