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:
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.

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
symbol AdcValue = b0
init:
low OutputPinFail
low OutputPinOK
main:
do
low OutputPinFail
readadc ControlPin, AdcValue
if AdcValue < 210 then
goto BattLow
else
goto BattOK
endif
loop
BattLow:
low OutputPinOK
high OutputPinFail
' debug AdcValue
goto main
BattOK:
high OutputPinOK
' debug AdcValue
goto main
I'm not too familiar with voltage dividers, and Mosfets, so any thoughts and comments are welcome.
