[SOLVED] L7805 regulator problem

Hi, I'm making an LED controller and I'm having a slight issue with a L7805-CV regulator. I'm trying to convert a 12v power supply to 5v to power a attiny84 microcontroller. I'm using a tip31 to flash the lights with music, but when I turn a 5V relay to connect the tip31 with ground of the circuit, I experience problems with the L7805. If I start playing music, the L7805 starts getting hot, and the circuit starts to malfunction. If I stop playing music everything starts working again. So my thinking is that maybe noise from the audio may be my issue, but I'm not sure. I have decoupling caps on the L8705 and I've tried putting a decoupling cap on the attiny between VCC and GND. I even tried putting a decoupling cap between the tip31 and ground. Can someone help me figure this out? Is there a better alternative than the L8705?

Here's the schematic of the circuit:

In this diagram PE just means it returns to the negative lead of the power supply.

First thing I see (just a quick glance though), is that you drive the relay from the attiny output.
From the datasheet, the relay coil resistance is 55 Ohm -> 90mA !! too much for the attiny output.
he won't like it very long.
I don't know the BT module, but I think it uses a few mA, the arduino too.
With only the relay 90mA , the power in the 7805 is (12-5) * 0.09 = 0.636 W
If we add the current for arduino + BT module....

Okay so if I've understood correctly, the relay is drawing too much current from the L8705, causing it to overheat. Can you think of anyway I can safely drive that relay? If I add a resistor in between the output signal and the coil, the relay won't switch on. Or is there a better regulator out there that can handle this much load?

no, that is not what I meant.
Actually, I don't know exactly why the 7805 is too hot, but I'm pretty sure the attiny can't source 90mA.
And I don't know how it reacts when you do. Maybe that this is the cause of the malfunction, and the heat of the 7805 has nothing to do with that.
No, a resistor is not the solution, the relay will not switch. And a "better" regulator won't help either.
What you need is a transistor (or a logic level mosfet ) to drive the relay .
About the regulator, you need to know how much current it sources. You'll be able to calculate the power it dissipates. And put a heatsink on it.

What kind of heat sink do you have on your 7805? What package style is it?

Agree and repeat, driving the relay directly from the ATTiny is going to result in a dead IO pin.

I'm using a tip31 to flash the lights with music, but when I turn a 5V relay to connect the tip31 with ground of the circuit

Well... the 7805 is getting because you're drawing (and wasting because of the nature of how a linear supply works) enough current to do so, where is your supply for the lights and relay coming from? the 7805 right? if so forget it...

You need to hook up a second power source rated at what you need to drive the lights and maybe even relay, and use only the Arduino for the 5v regulator... your other option is buying a switching regulator or even using a TIP31 to take the load off the 5v Regulator.

What package style is it?

The 7805 is TO-220

where is your supply for the lights and relay coming from? the 7805 right?

No the lights are being powered directly by the 12 power supply, they're rgb, the attiny is just writing which color they will be, and that is being driven by power mosfets too.

that drawing is accurate then? is see no mention of mosfet only the tip31 " between the tip31 and ground"

So are you using mosfets or tip31's (power npn transistors) ?

What I'm saying is I'm writing different colors using mosfets. They're Q1, Q2, and Q3 near the top of the drawing

mwhite494:
What I'm saying is I'm writing different colors using mosfets. They're Q1, Q2, and Q3 near the top of the drawing

ah yes sorry, i completely missed the tip31 on the right hand side, I thought you'd use those instead of mosfets nearer the top...

my bad.

Time to switch to a switching regulator I think...

http://www.ebay.com.au/itm/DC-DC-LM2596-Step-Down-Module-Adjustable-Power-Supply-CC-CV-Output-DC-1-3V-35V-/360680412440?pt=AU_B_I_Electrical_Test_Equipment&hash=item53fa3a5518

You'll have to spend a whopping $1.20 for it with free shipping though....

Ok so now I'm trying to drive the relay with a logic level fet but it won't switch on. I'm using a PSMN022 (http://www.nxp.com/documents/data_sheet/PSMN022-30PL.pdf) because its the only logic level laying around my house. I have it hooked up with the gate connected to the attiny pin, the drain going to the relay, and the source connected to ground. That's the right way to hook it up correct? Is this just the wrong type of fet?

do you have a spare tip31?, it can handle 3 amps right? the 7805 can not.

So what you do is look up a "pass transistor" circuit ,basically supplying 5v to the base of the tip31 (via a transistor) then you can power your relay from the tip31 thus keeping it cool enough to operate as normal.

But the coil voltage is 5v so if I used a transistor I would need a 5v power supply at the collector and the only part outputting 5v is the 7805. I just tried doing something similar but replaced the 5v relay with a 12v relay and used a tip120 to connect the 12v power rail to turn on the relay, but for some reason it won't turn on, and I think that was because the tip120 has too much internal resistance.

But what I'm wondering is why the PSMN022 won't drive the relay

a 800ohm-1k resistor from the 7805 to the base of the TIP31, and hook it up like like that, then feed the relay and whatever you need to that to take a load off the 7805...

I still don't see a mention of a heat sink on the 7805. It'll be moot if you use a SMPS regulator, but you should know that a TO-220 package cannot dissipate much power without a heat sink. With everything powered from the 7805, and 12V feeding it, you have almost 1.5 times as much wattage burning up the 7805 as the entire circuit is dissipating.

Um, I think there WAS mention of a heatsink....

The only mention of a heatsink was a suggestion to use one, and someone (before me) asking if he was using one.

mwhite494:
Ok so now I'm trying to drive the relay with a logic level fet but it won't switch on. I'm using a PSMN022 (http://www.nxp.com/documents/data_sheet/PSMN022-30PL.pdf) because its the only logic level laying around my house. I have it hooked up with the gate connected to the attiny pin, the drain going to the relay, and the source connected to ground. That's the right way to hook it up correct? Is this just the wrong type of fet?

Should work .
If you have a multimeter, check the voltage on the gate (I hope the tiny isn't damaged)
I would put a 120 Ohm resistor between the output pin and the gate, and a 15k or 22k between the gate and GND .
And again, a heatsink on the 7805