# Powersupply with LM78L05, uC, IRL2703 and LM338K

#### nerdegutta

Joined Dec 15, 2009
2,676
Hi.

I'm working on a powersupply, and I would appreciate some second thoughts.

Background:
I got a Raspberry Pi B+, and a D-Link router. The Pi works on 5v at appx. 1200mA. The D-Link works on 7.5v at 1500mA. They are connected with standard network cable. The router is set up as a DHCP.

I'd like to make this batteryoperated, and I've drawn the attached schematic.

Schematic:
The circuit is planned working from a 12v car battery, that's connected to X1. The LM78L05 regulates the volt from 12v to 5 volts, and power the uC. This is a PICAXE 08m2. The uC, checks the voltage from the 12v battery, using ADC. If the voltage is more than 11v, the uC sets pin C.2 high, which turns the IRL2703 on, lighting the green LED and opens for power to go to the two LM338. These in turn regulates the voltage to the Raspberry Pi with 5v, and the other regulates the voltage to 7.5v to the router. If battery voltage is less than 11v the red LED goes on and stays on.

The circuit has a ICSP pin header to program the uC. This is the PICAXE program:
Code:
' Read volage on C.4
' If voltage is greater than 11v then set C.2 high
' If voltage is less than 11v then set C.1 high
' PICAXE 08M2

#no_data

symbol OutputPinFail = c.1
symbol OutputPinOK = c.2
symbol ControlPin = c.4

init:
low OutputPinFail
low OutputPinOK

main:
do
low OutputPinFail
goto BattLow
else
goto BattOK
endif

loop

BattLow:
low OutputPinOK
high OutputPinFail
goto main

BattOK:
high OutputPinOK
goto main
This will make sure the RPi and router have enough juice. (At least that's what I hope.)

I'm not too familiar with voltage dividers, and Mosfets, so any thoughts and comments are welcome.

#### spinnaker

Joined Oct 29, 2009
7,835
If you want this to be battery operated then the 7805 (linear regulators in general) is going to be a poor choice. You would do better with a switching regulator. Lots of choices out there. TI has a couple that are very easy to wire up. Or the 34063 has been around for a very long time. Not the most efficient chip but tons of support on it. If you don't feel like wiring it yourself you can pick up one of those automobile USB chargers. That is what is usually inside.

But you will have to "roll your own" or hack the USB charger to get your 7.5V.

#### nerdegutta

Joined Dec 15, 2009
2,676
The idea was that the LM78L05 would power the uC, the uC would control the IRL2703, which in turn controls the LM338K. There's two LM338, one is configured to regulate 12v to 5v, and the other to regulate 12v to 7.5v.

I'll check into that chip you mention.

Thanks.

#### takao21203

Joined Apr 28, 2012
3,695
there are LM2596 PCBs which can output upto 2A

its not so interesting to build these circuits yurself all the time, infact, its pretty boring and takes a lot of time.

anyway, yu can get the blank ICs too + required part

#### nerdegutta

Joined Dec 15, 2009
2,676
there are LM2596 PCBs which can output upto 2A

its not so interesting to build these circuits yurself all the time, infact, its pretty boring and takes a lot of time.

anyway, yu can get the blank ICs too + required part
It might be simple and boring to you and that's ok with me. I added the uC, to widen my horizon. I'll check the LM2596 PCB. Thanks.

#### spinnaker

Joined Oct 29, 2009
7,835
The idea was that the LM78L05 would power the uC, the uC would control the IRL2703, which in turn controls the LM338K. There's two LM338, one is configured to regulate 12v to 5v, and the other to regulate 12v to 7.5v.

I'll check into that chip you mention.

Thanks.
It really doesn't matter how you configure them, those linear regulators will cause you to dump a lot of your energy in heat. Especially stepping down from 12V.

That 34063 while old is really versatile. You can configure it to step up, step down or invert.

#### nerdegutta

Joined Dec 15, 2009
2,676
That 34063 while old is really versatile. You can configure it to step up, step down or invert.
I will order a few of them.

Thanks!

#### spinnaker

Joined Oct 29, 2009
7,835
I will order a few of them.

Thanks!
Take a look at the datasheet first. You would need coils, caps and a sensing resistor. I guess you can always use a trimpot if you can't find the proper value.

#### spinnaker

Joined Oct 29, 2009
7,835
But it cant handle 1.5 A
Rats I missed that in the requirements.

Well the OP might also want to check out The RBs website

http://www.romanblack.com/

I will bet there is a switching regulator that will fit the bill.

Also TI has a number of easy to use switching regulators with some pretty cool design calculators.

#### nerdegutta

Joined Dec 15, 2009
2,676
Also TI has a number of easy to use switching regulators with some pretty cool design calculators.
I'll check the TI calculator. Thanks.

#### spinnaker

Joined Oct 29, 2009
7,835

#### nerdegutta

Joined Dec 15, 2009
2,676
Thanks, I've been playing around on TI's design tools and component guide.

Great site!

#### takao21203

Joined Apr 28, 2012
3,695
BTW Tako is wrong. The 34063 is capable of 1,5A. Unless he mean the "dollar" store version and for that I would not know.

You could also go with something like this
http://www.ebay.com/itm/3-Terminal-5V-1A-Switching-Voltage-Regulator-Power-Supply-/261243604047?pt=LH_DefaultDomain_0&hash=item3cd3550c4f

You would need to change the sensing resistor to get your needed voltage. It is only 1A but if you search around you might find a 1.5A version.
Sure, did you use the IC some time?

#### Attachments

• 99.3 KB Views: 36

#### spinnaker

Joined Oct 29, 2009
7,835
Sure, did you use the IC some time?
No idea what you mean, again.

I have a 34063 right in front of me that I built. I have not yet tested the current limits of the circuit.

#### takao21203

Joined Apr 28, 2012
3,695
No idea what you mean, again.

I have a 34063 right in front of me that I built. I have not yet tested the current limits of the circuit.
you'll find you dont get 1.5 Amps out, sooner than that, the IC gets very hot

Even in optimal situation the efficiency isnt much greater than 80%, and theres is some limit what the small IC case can distribute. You dont want a sizzling hot IC perhaps.

From my experience 0.5 Amps is the absolute limit you can do with the IC

#### takao21203

Joined Apr 28, 2012
3,695
1.5 Amps output is demanding even for the larger LM2576, which has a thick metal tab (TO220)

#### nerdegutta

Joined Dec 15, 2009
2,676
I've played around on TI's web page and imported a BOM to my Mouser account.

When I entered my criteria, one of the suggestions that came up was LM25085.

Vin 11
Vinmax 14
Vout 7.5
Iout 5

It came with a nice schematic, and a BOM.