24VDC supply making 7805 too hot.

The project I'm working on requires 24VDC to drive pneumatic solenoids. I have a 24VDC regulated power supply rated @ 1.9A which should be enough to drive all the solenoids and the BBB arduino. I am using the standard 7805 to regulate the 5v for the arduino and that dude is getting real hot. I measured the current going to the circuit beyond the 7805 hovering around 200mA when all the components that can be engaged at once are under load. I figure with the 19 volt drop @ .2A it would be dissipating 3.8 watts in heat. I'm not sure what this would work out to in degrees but with a heat sink bolted to the 7805 it gets hot enough to sizzle when I lick my finger and touch it. (no comments on the safety of that please.. lol) I checked the datasheet on the 7805 and see that it can take up to a 35v input and source up to 1A which I am well within. I was thinking about dropping the voltage with a 7812 then going to the 7805 and bolting them to the same heatsink, but am not sure if that will solve the problem (either way it's got to dissipate 3.8w right?). I was reading here: http://arduino.cc/forum/index.php/topic,61557.0.html that I could use a different type of 7805 that is capable of sourcing 2A but don't know if that would help either. I also found this: 5V switching voltage regulator - 7805 replacements but it's kinda expensive and I am trying to keep costs down as much as possible because I'll be building several of these units.
I really don't want to have 2 separate supplies for the project as outlet space is valuable in it's environment.
I'm hitting a brick wall at the 11th hour here and cant use a fan because it would put me too close to the current limitation of the supply and make the project box too big. If anyone has any suggestions it would be greatly appreciated. It would be real nice if I could plug mains 110 into the thing and transform the voltage with internally, but don't really have alot of experience with that yet.

Buy a switching power supply, which will be much more efficient (24v->5v with probably 85%+ efficiency). That way, you won't be wasting as much of the power to heat, solving the heating problem. Linear regulators (like the 78XX) are not well suited to high input voltages.

djscurge:
The project I'm working on requires 24VDC to drive pneumatic solenoids. I have a 24VDC regulated power supply rated @ 1.9A which should be enough to drive all the solenoids and the BBB arduino. I am using the standard 7805 to regulate the 5v for the arduino and that dude is getting real hot. I measured the current going to the circuit beyond the 7805 hovering around 200mA when all the components that can be engaged at once are under load. I figure with the 19 volt drop @ .2A it would be dissipating 3.8 watts in heat. I'm not sure what this would work out to in degrees but with a heat sink bolted to the 7805 it gets hot enough to sizzle when I lick my finger and touch it. (no comments on the safety of that please.. lol) I checked the datasheet on the 7805 and see that it can take up to a 35v input and source up to 1A which I am well within. I was thinking about dropping the voltage with a 7812 then going to the 7805 and bolting them to the same heatsink, but am not sure if that will solve the problem (either way it's got to dissipate 3.8w right?). I was reading here: http://arduino.cc/forum/index.php/topic,61557.0.html that I could use a different type of 7805 that is capable of sourcing 2A but don't know if that would help either. I also found this: 5V switching voltage regulator - 7805 replacements but it's kinda expensive and I am trying to keep costs down as much as possible because I'll be building several of these units.
I really don't want to have 2 separate supplies for the project as outlet space is valuable in it's environment.
I'm hitting a brick wall at the 11th hour here and cant use a fan because it would put me too close to the current limitation of the supply and make the project box too big. If anyone has any suggestions it would be greatly appreciated. It would be real nice if I could plug mains 110 into the thing and transform the voltage with internally, but don't really have alot of experience with that yet.

That switching regulator would probably be a better solution - but I have to ask what kind of heatsink are you using? If the heatsink is getting that hot, it's probably not large enough; you might want to investigate buying or building a larger heatsink (look around for companies that sell alluminum heatsink extrustion profiles if you want to cut your own); you may also need forced cooling (ie, a fan). You also didn't say which 7805 you are using - that is, what case style? For what you are trying to do, I would go for TO-3 mounted to a larger heatsink, with a small fan providing forced cooling if the heatsink wasn't enough. You can probably get by with a TO-220 cased 7805, but the heatsink will have to be fairly beefy. You might find that the cost of the larger TO-3 7805 and/or heatsink and/or fan may end up being close in cost to that switching regulator, so price things carefully...

It's the TO-220 package and the heat sink is wimpy, I scavenged it off a old satellite TV board. I found this: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=102-1715-ND which isn't too pricey and it is a drop in for the 7805 TO-220 so I wont have to modify the board layout (done that way too much in the past week, hand rerouting is getting tedious) and I really need to get these board gerbers sent out to get them back in time to be able to solder up hundreds of components. (70+ per board * 5 boards, ugg). Sure do wish I could use some type of 7805 TO-220 though, would save $9 per board.

djscurge:
It's the TO-220 package and the heat sink is wimpy, I scavenged it off a old satellite TV board. I found this: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=102-1715-ND which isn't too pricey and it is a drop in for the 7805 TO-220 so I wont have to modify the board layout (done that way too much in the past week, hand rerouting is getting tedious) and I really need to get these board gerbers sent out to get them back in time to be able to solder up hundreds of components. (70+ per board * 5 boards, ugg). Sure do wish I could use some type of 7805 TO-220 though, would save $9 per board.

That's an interesting part and will likely work fine; just noticed that the datasheet had some info about using a coil to reduce ripple - not sure if you'll need to take that into account or not (plus whether any of your caps on the input or output side will need changing). Certainly a cheaper replacement than that other switching reg...

Heres another drop in replacement that will save you about 4 bucks http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=811-2196-5-ND&x=11&y=21 I just got one in, all I've had a chance to do is breadboard it with an led and 9v battery, but it was putting out a steady 5.2v and seemed to be working well.

For 4W or so perhaps the best heatsink solution is to swipe a chipset heatsink and fan from an old PC and bolt the 7805 onto that (and you might want a 7812 to power the fan(!)). With forced air cooling even a fairly small heatsink can be effective - if you've an old computer to canibalize then its free!

@iggykopa,
Nice find. I'm gonna keep those in mind for future projects.

Got the V7805-1000 and it works great, provided you don't put it in backwards. :blush: The diagram I was looking at on the data sheet was apparently a top down footprint drawing and I smoked a Atmega328 and a 7404 in one shot. Oh yeah and as the white smoke was rolling out of the 7404 I noticed the dot on the package. Of course it would be on a Friday and absolutely no one locally stocks them. I have a spare 128 and several 7404's but I needed the extra EEPROM. RTFDS (thoroughly)!

The switching regulator is the best solution. However, I'd like to know why you are drawing up to 200mA from the 5V supply, because this seems a little excessive given that you also have a 24v supply available. If you can't reduce that current, then a simple fix would be to connect a 47 ohm 3 watt resistor between the 24v supply and the input to the 7805. This will drop about 10 volts and take 2 watts of the power. You may also need to connect a capacitor between the input and ground pins of the 7805 to keep it stable.

Having said that, if the 7805 is still delivering 5 volts then it isn't overheating - these devices have built-in thermal protection and will reduce the output voltage (thereby reducing the current) if they start to overheat.