Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powering PIC 16F628A from 24v

Status
Not open for further replies.

techlist

Mechanical
Dec 27, 2006
16
0
0
US
Hi guys:

I need to power a PIC 16F628A from a 24v source. The 24v source normally controls a integrated step motor driver/controller and I'm using the PIC to turn that module on and off. Is a regular ol' 7805 type TO-220 the only option? Is there a better, or I should say, smaller way?

Thanks, Scott
 
Replies continue below

Recommended for you

Two resistors?
(a m s t r u g g l i n g to a v o i d s a r c a s m)

You have stated little about your requirements.
You didn't say SMT or thru-hole. Nor what current your micro/systems need. Nor if this is automotive. Nor what you plan to do about the intense noise your 24V supply will have on it. What kind of airflow is the regulator going to have flowing past it?
What will be the maximum ambient temperature?

There are a dozen other packages Vregs come in but they are all premised on the power they must 'waste'.

I am also serious about the two resistors. If you are not running any analog circuitry - PICs run on 5.5-3.0V. If you size the divider correctly so you never get above 5.5V you could drive the PIC satisfactorily.

You can also use the more common zener diode and a resistor.

Of course these latter solutions make no sense if you have lots of other loads like LEDs.



Keith Cress
Flamin Systems, Inc.-
 
> 2 resistors
:)
Sarcasm is OK. I'm a machine person, not an EE so I don't mind even a llittle. 2 Resistors would indeed be a spiffy solution if it would work.

So let's see:
thru-hole preferred, can do SOT-89 but hand soldering so don't want to go smaller if possible.

current need: under 1 mA for the uP, typical 1.5mA for a IR receiver but a max of 10mA. This will vary apparently, depending on if the reveiver is active. Receiver datasheet:

automotive=no

Nor what you plan to do about the intense noise your 24V supply will have on it.
470-500uF alum electrolytic at the device which is at the end of the PS's 70" cable.
PS datasheet:

What kind of airflow is the regulator going to have flowing past it? None to little

What will be the maximum ambient temperature? 100 F

Better?

After I posted I figured I'd jsut use a TO-92 LM78L05 with a .33uF in and .1 uF out per the datasheet.
 
Since you are going to drop 10 ma across about 20 volts, the power dissipation in the 78L05 will be 200 mw. That will make the TO-92 case run pretty hot. Use the 7805 and you won't need to be concerned about heating up the IC.
 
Thanks sreid:

You (or anyone) have time to take a quick look at teh datasheet for the IR receiver? I'm not sure I'm reading the right current for it's normal state of operation. I might not need 10mA, but only 1.5mA, or less.

Thanks again,
Scott
 
Yeah sez 1.5mA so maybe 3-6mA for your planning.
No air flow means very tough for a any linear regulator.

Often designers screw a TO220 to the case body so the regulator gets a large 'free' heatsink. Alternatively you can use one that is a SOT89 on 1 sq-in of trace for a board heat sink.

When doing regulators for systems I have not actually measured the current on with functioning firmware in place, I always proceed the VR with a resistor that can be used to share the dissipation duties. Make a stab at the resistor value so the regulator has to dump half the voltage and the resistor dumps the other half. The resistor would be on large traces too, of course. Some large SMD res like a 1206 body etc.

This way if you decide to add a 10mA idiot LED or some other indicator all you have to do is mess with a resistor value.

Call it 6mA.
24V
Vreg 5V

10V/6mA = 1666 Ohms
Res power disp = 10V x 6mA = 60mW
A SMD1206 style is good for 250mW so you are below the 'too hot to touch' level if you use one.

VR power disp = (24V-10V-5V) x 6mA = 54mW

Double check the allowed maximum input voltage as many small 78's do not allow 24V input.

Look at the:
L78L05ABUTR

I'd put that aluminum cap between the dropping resistor and the regulator along with a 0.001uf and a 0.1uf ceramics to try to keep the noise on your 24v supply out of the PIC and more importantly your IR chip.

Keith Cress
Flamin Systems, Inc.-
 
I might go for an SOT-23 package regulator (Zetex makes some inexpensive but quality units) with a smallish resistor at the front end to cut down on power dissipation through the regulator. Typically they're good for 300-350mW, but the resistor will give you as much leeway as you like.


Dan - Owner
Footwell%20Animation%20Tiny.gif
 
Thanks guys. Not being an EE I never thought of adding a resistor in series to cut the load on the regulator. Sounds like a plan.

The (plastic) case that this circuit board is in is mounted to a huge block of aluminum (the machine being controlled). I need to consider a way to mount these to take advantage of that sink which will help. Might be able to cut a hole in the case bottom and arrange to "lay" the back of a to220 against the alu frame with it's legs pointing up toward board.

 
You mentioned:

"Might be able to cut a hole in the case bottom and arrange to "lay" the back of a to220 against the alu frame with it's legs pointing up toward board."

Might be a tad carefull of that. The 7805 type regulators
(the 5V in the TO220 cases have there heat sink tab connected to the center pin of the device. I.E. Ground.

An insulating piece of mica, an insulating washer to the
screw terminal and some silicon heat sink compound will
isolate the logic ground from the "case" ground. These items
*SHOULD* still be available at Radio Shack. Alternatively,
you might be able to sweet talk the local computer repair
shop into letting you have some. I am assuming that this
is a "one off" design. If making a product, then the
insulating kits are available from most parts houses.

We try real hard to have the case gound and the logic
ground seperated (except at a very selected point in the
system), to help prevent "ground loops" where unexpected
currents might flow from the two grounds, causing no end
of hair pulling at times.

Best of luck. Shouldn't have any problems with the three
terminal regulators and the dropping resistor will absorb
the extra energy and waste it as heat. Just remember
that you will want to have at least 7V to the input of
the regulator (I would target a couple more volts). Some
of the newer regulators are a "low voltage dropout" types
which means they don't need the couple of extra volts on
the input to provide regulation. The 78XX series is a
little older......

Hope this helps.

Cheers,

Rich S.
 
Thanks Rich, RS has all but stopped carrying anything electronic. But I've got regular accounts with Digikey and Mouser, so no problem there. But it will be a munumental feat to get the TO220 to the alu structure anyway. Was just a thought..
 
OK guys, I've been trying to do my homework on this. After this conversation I got worried about the regulator glowing red :). Sanity check my work here:

Parameters refresh
24v source, need 5v output

Load current requirements:
uP: < 1 mA
IR rcvr: = 1.5 mA
Call the total 2mA to be safe

No significant active cooling (i.e fan), but I have added a way to get some ventilation (passive vents in the devices small enclosure) so at least the PCB isn't in a airtight box that might self heat.

Since with 24v to 5v I certaintly don't need a low dropout unit, I looked at the National website and the old 7805 sends one to the LM340 as a replacement:
Data sheet:
It comes as:
LM340LAH-5.0 (Metal TO-39 can)
LM340LAZ-5.0 (TO-92 plastic)

Calcs:
Dropping 19v (24v-5v) at the LM340 at 2mA so it will disip. 38mW (19*2).

The LM340 has a max input of 35V - OK there. 11V to spare.

I think a conservative estimate of ambient can be 60degC (too hot to touch IIRC).

It's data sheet graphs say it's maximum power disp. with no heat sink, at 60 C ambient is ~600+ mW. At 45 C, 700mW (metal can version).

The plastic T092 version says it's max with .125" lead length from PCB is ~550mW.

So, it would appear to my laymen experience that with my 38mW requirement, I would be ~8% of the total power capability of a TO92, or ~5% of the metal can, with no heat sink. Nice and safe, No?

I do have a "dummy" 10mA LED to add, but I can source it's current from the 24v with an appropriate limiting resistor; turn it on and off with the PIC's current sourcing ability. But even if I powered the LED via 5v from the LM340 (via PIC), my load would then be: [(10mA+2mA)*19V]=228mW; still only ~50% of what the datasheet says the LM340 is rated for with no heatsink.

This look right?

Presuming I didn't make an error, the ambient temp of the device won't be close to 60 C, good bit less if it's running warm (I think), which would solidify the 550-700mW capability without sink. Plus the LM340 ground will be tied to a ground plane so that might add some heatsink capability. This, with 2 solid tantulum caps appear to make a good, small solution.

If I add a resistor to the LM340 input, I can derate it even further at it's highest currents, but that does not appear to be necessary.

Please let me know if I have this all wrong or made some noob error <big smile>

Cheers,
Scott
 
Thanks Keith and all. Help much appreciated. It's a plan then. I did run some calcs with a pre-resistor and found that it casued the Pd in the LM340 to be in the 40mW range whether it was sourcing 12mA or 2mA, so at you guys original suggestion I believe I will add a 1.3k 1/2w resistor in front of the regulator.

Cheers,
Scott
 
Status
Not open for further replies.
Back
Top