power supply with battery - Page 1
Forum section: electronics / projects

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: January 18, 2014, 01:08:40 pm
content: Hello,for my mobile game console project I need a battery powered supply that generates 5V and 3.3V. The 5V will be used by a raspberry pi which draws around 600mA and the 3.3V will be used by an LCD which draws about 400 mA. The battery should be recharged by a wall adapter. I don't have any experiences with rechargeable batteries yet. In addition, it would be good if when the power switch is turned off, the raspberry pi has enough time to properly shutdown before the power is turned off. Furthermore, size matters because I don't have so much space in my case. So it would be good if I only need 1 or 2 chips to solve my problem.What chips or designs would you suggest?

author: mariush
author_rank: Super Contributor
timestamp: January 18, 2014, 03:58:11 pm
content: If price is not a concern...LT1308 to get 5v @ 1A from 3 AA batteries or a lithium battery 3.6-4.7v90% efficient between 300-700mA, 600kHz so small surface mount inductors and diodes are possible, but you have to pay attention to layout (datasheet has very good information)* Datasheet :http://cds.linear.com/docs/en/datasheet/1308i.pdf* Farnell :http://uk.farnell.com/linear-technology/lt1308acs8-pbf/dc-dc-conv-singl-cel-1a-5v-8soic/dp/1663406* Digikey:http://www.digikey.com/product-search/en?k=lt1308&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=0&pbfree=0&rohs=0&quantity=25&ptm=0&fid=0&pageSize=25LT1616 to get 3.3v @ 400mA from 5v:1.4 mhz step down regulator , about 85% efficient at doing 5v to 3.3v , same story with tiny surface mount inductors (ex only 10uH required) and small diodes and capacitors and resistors* Datasheet:http://cds.linear.com/docs/en/datasheet/lt1616fs.pdf* Farnell :http://uk.farnell.com/linear-technology/lt1616es6-trmpbf/sw-reg-st-d-1-4mhz-0-5a-sot23-6/dp/1663765* Digikey :http://cds.linear.com/docs/en/datasheet/lt1616fs.pdfBy placing the lt1616 after the lt1308, you basically make sure the lt1308 always has some load on it, so you raise its efficiency.. like I said, its efficiency is best around 500-700 mA and the pi will vary its current consumption (i assume) but the lcd should be relatively constant at power consumption (i assume the backlight eats most of the power).

author: mariush
author_rank: Super Contributor
timestamp: January 18, 2014, 06:25:18 pm
content: A bit of a late addition but hopefully you can read this.I was looking at the actual board layout on both A and B versions :http://elinux.org/RPi_HardwareScroll down tohttp://elinux.org/RPi_Hardware#Schematic_.2F_Layoutand you find this picture there for model B:http://www.raspberrypi.org/wp-content/uploads/2012/09/sony-rasp-pi.jpgIt looks like the Raspberry pi has two linear regulators, one 1117-33 ( linear regulator, 0.8-1a max, 1.2v voltage drop) and one 1117-18 ( up to 0.8a max in that package, 1.2v drop etc)The 1.8v regulator is probably used only for low current stuff, maybe 20-100mA (network chip, sd card etc). The 3.3v regulator is probably powering the actual processor, making the assumption simply because it's such a large package with plenty of area for heatsinking it. The 5v from usb input is basically used only for usb outputs (200-300 ma for keyboard, mouse etc)You may be able to desolder the 3.3v linear regulator and use a step down switching regulator to power both 3.3v LCD AND the 3.3v of the raspberry from a switching regulator like... let's sayLTC3564(2.25 mhz, up to 96% eff. , 1.25a max etc) and then use a smaller boost switching regulator for 5v 200-400mA (lt1308 which can do up to 1a would still work).Basically, you'd get more battery life this way because if the 3.3v linear regulator is used for the main processor you're wasting a lot of power as heat in the linear regulators.You should put a current meter on the output of that 3.3v linear regulator, and that 1.8v

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: January 19, 2014, 03:44:33 pm
content: Quote from: mariush on January 18, 2014, 03:58:11 pmPrice is not really a concern.Thank you for all the information. I think your idea of desoldering the 3.3v regulator sounds good. I lifted on leg of the 3.3v regulator and measured the current. It was about 320-340 mA with no external devices connected. Unfortunately, I destroyed the pad of the outputpin when I tried to lift the legI am not sure if I measured the other regulator correctly though. The regulator seems to have two output pins, which are not connected on the pcb. Thus, I measured the current of them seperately, but it was only some micro amps. The Raspberry Pi has also a 2.5v regulator(http://www.raspberrypi.org/wp-content/uploads/2012/10/Raspberry-Pi-R2.0-Schematics-Issue2.2_027.pdf). I think I will only replace the 3.3v regulator, because it handles most power of the RPi.I forgot to mention that the console will have a usb and hdmi output, for this reason the power consumption can sometimes be higher.

author: mariush
author_rank: Super Contributor
timestamp: January 19, 2014, 04:21:32 pm
content: The 1117 is somewhat different than the classic 78xx regulators. The first pin is Adjust/Ground , the second pinand the tabis the output and the third pin is the input.So in your case, you can solder the 3.3v to that large tab or anywhere on that large piece of copper and the ground to any ground point, let's say the negative side of that C11 tantalum capacitor.The 2.5v regulator is that RG3 chip that has "LONB" written on it, on the right side of the 1.8v regulator. That's a low current regulator, around 50mA at most, and it's fed from the 3.3v... so in worst case scenario there's going to be (3.3v-2.5) x 0.05A = 0.04 watts or 40mW wasted as heat.This is basically too small to be bothered to replace it with a switching regulator, you won't achieve any significant efficiency increase doing it.The 1.8v regulator is also powered from the 3.3v regulator, and it's probably only going to do 100-200mA. While it's capable of 1A max, there's just not enough area around it to cool adequately if it were to produce 1A ... Remember, 3.3v in , 1.8v out ... you'd have (3.3v-1.x 1 = 1.5 watts of heat.As it is right now soldered on the PCB with barely any copper around the tab, the chip can probably do about 0.3-0.5 watts which works to about 150-300 mA max. Again, kind of too small to be worth replacing it with a separate switching regulator.So like I said, I would concentrate on a step down switching regulator that can do around 1A (400mA for the lcd, 400-500mA for the pi, 100mA reserve).. the LTC3564 I mentioned in previous post is capable of doing this. Then, I'd do a 0.5a-1a boost regulator for 5v ... the pi will use probably under 100mA on 5v and the rest will be used by usb devices... hdmi will use very little 5v. The LT1308 i mentioned can do up to 1a and it's quite efficient even at 2-300mA on 5v.If you're concerned about the ripple generated by the 3.3v switching regulator, you could add a LC filter (and inductor and a capacitor, the datasheet should say it somewhere) after the output capacitor of the switching regulator. If you're really paranoid, you could configure the switching regulator for 3.6v and then use a MIC2941 linear regulator to go down to 3.3v.. this one needs only 0.3v above output voltage to output stable 3.3v @ 750mA.later edit: if you look in the schematic you can see there that is says for the 3.3v linear regulator that power dissipation is up to 800 mW.. or 0.8 watts. ( 5v - 3.3v ) x ? A = 0.8 ... so the regulator is designed to output up to 470mA of current. So you're good to use a 3.3v 1A+ switching regulator.

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: January 19, 2014, 05:33:16 pm
content: Quote from: mariush on January 19, 2014, 04:21:32 pmSo I measured the input current, not the output. But because it is a linear regulator, the current of the output should be the same as the current of the input, right?Quote from: mariush on January 19, 2014, 04:21:32 pmThe datasheet has a formula to calculate the inductance of the coil for the desired ripple current. My problem is, that I have no idea how much ripple current is ok or not.I did not want to make a custom pcb for the switching regulator. Do you think it would work if I solder the components directly to the pins and put a piece of metal on the back? Or would it affect the effiency too much?Thank you very much for not only suggesting me what to do but also explaining to me how you calculate.

author: mariush
author_rank: Super Contributor
timestamp: January 19, 2014, 05:55:04 pm
content: Yes, the input current should be more or less the output current (the regulator uses maybe a couple of mA internally).No, you can't use these high frequency regulators directly on the pi pcb.You must make pcbs for them and you MUST place the components very carefully, as explained in the datasheets, otherwise they'll be unstable or have high ripple. The inductors and schottky diode s (if used) are critical as well. Use the recommended layout if you have to.It's just a guess... I think about +/- 20-50mV ripple on the 3.3v would be fine. The LTC3564 would probably need about 1.8-2.2uH inductor for 3.3v out @ 1A .. you can probably use an identical inductor for the LC filter.With a bit of patience you can make a pcb out of a bare copper pcb with a very sharp blade (exacto knife) but nowadays it's very cheap to make pcbs at factories and in a few hours you can learn enough DipTrace (freeware for <300 pins and non commercial stuff) to make the pcb design for both regulators and send it to some pcb manufacturer.

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: January 21, 2014, 05:18:19 pm
content: I started using KiCAD. I made a schematic of both 3.3V and 5.V DC/DC converters. Currently, the run pins are directly connected to the battery but later I want them to be controlled by a microcontroller. The microcontroller should check if the power switch is turned on and then enable both regulators. When the switch is turned off again the microcontroller should tell the raspberry pi that it has to shut down and after the raspberry pi has shutdown it should disable both regulators. Therefore, I thought I will use an ATTiny45 which will be directly powered from the battery.For the 5V regulator I just copied the layout and values from the typical application schematic for a single Li-Ion cell to 5V/1A DC/DC converter from the datasheet of the LT1308cds.linear.com/docs/en/datasheet/1308i.pdf. I don't think that I will need 1A output current, so can I use a smaller, non polarized cap at the output? Maybe the same ceramic cap that is used at the output of the 3.3V regulator? And what would then happen if someone plugs his external usb-powered hdd in the usb port? Will the components be damaged?In addition, I am wondering how the battery will be charged. It would be good if it could be charged by a micro USB connector. But if higher or lower voltage is more practical, a 2.1 DC connector will be ok as well. Furthermore it would be great if you could play while the battery is charging. Any idea how to design the charging circuitry?Quote from: mariush on January 19, 2014, 04:21:32 pmIn the datasheet they don't say anything about a LC filter. But I can add that of course because I will probably have enough space for that on my PCB.Quote from: mariush on January 19, 2014, 05:55:04 pmOk, I will send it to a pcb manufacturer.

author: mariush
author_rank: Super Contributor
timestamp: January 21, 2014, 06:15:21 pm
content: I can't stress it enough.. read the datasheets carefully and pay attention to the layout recommendations (Page 5 on LT1308 datasheet, Page 14 on LT3564 on LTC3564 datasheet).Search Digikey and Farnell/element14 for some inductors that match the recommended parameters in the datasheet (peak current, minimum resistance etc ) and make the pads in DipTrace to support it.The LT1308 can work with good quality electrolytic on the output (use 100uF 16v or higher for low esr). The other one needs tantalum or ceramic capacitors.Use only X5R or X7R or NP0/COG ceramic capacitors and use ceramic capacitors rated for higher voltage. A 10uF 10v ceramic capacitor will only be about 4-6uF with 5v on it. Use ceramic capacitors rated for 25-50v at minimum.On LT1308, design the pcb so that you'll be able to use two resistors instead of one where needed. For example, you'll have a hard time finding a 301k resistor but you should be able to put 220k + 82k and get 302k so then you'll have 1.25v (1 + 302/100) = ~ 5.025v at the output.On LTC3564, the inductor is very important. Make sure the one you buy will have good parameters.Also, this LTC3564 needs ceramic or tantalum, can't work with electrolytic capacitors. Use recommended layout from page 14 or get as close as possible to it. Very short traces between IC and inductor like on LT1308. You can work around and not use VIAs by using 0 ohm resistors for example.Same story about derating ceramic capacitors with voltage - you should use minimum 25v rated ceramic capacitors on input, at least 16v rated on output.22uF 25v ceramics are kind of expensive in small quantities (around $0.3 a piece), so you may want to modify the layout slightly and use 2 x 10uF 25/35/50v ceramic in parallel instead. A 10uF 25v rated ceramic is about 10 cents in small quantities.For charging the battery, look into battery charger ICs, there's a whole category of them here:For example, MCP73832 can charge up to 4.2v and 450-500mA so it will work straight from USB :http://www.digikey.com/product-detail/en/MCP73832T-2ATI%2FOT/MCP73832T-2ATI%2FOTCT-ND/1979806(datasheet is here:http://ww1.microchip.com/downloads/en/DeviceDoc/20001984F.pdf)If you need faster charging there are that can go up to 1A and more, as long as your battery permits it. It shouldn't be a problem to charge while running the pi.later edit: external hard drives shouldn't pull much current from 5v on your pi, they should be powered from external adapter.

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: February 06, 2014, 08:14:52 pm
content: I changed from KiCAD to diptrace, because KiCAD does not have the LT regulators in its library.Quote from: mariush on January 21, 2014, 06:15:21 pmOh I did not know that ceramic capacitors change their capacity on different voltages. I changed my components and the price rose significantly but not so hard that it would hurt.The new schematic is attached. It is still work in progress and I have not started with the pcb design yet.As a battery I want to use this one:http://www.ebay.de/itm/PolarCell-Akku-Samsung-Galaxy-S4-mini-GT-i9190-S4-mini-LTE-GT-i9195-EB-B500BE-/370946250005?pt=DE_Handy_PDA_Akkus&hash=item565e1e9515I couldn't find any good battery on farnell for my purpose so I decieded to use this one because it has sufficient capacity and the right size to fit in my case.Quote from: mariush on January 21, 2014, 06:15:21 pmDo you mean that I can power the regulators from the battery while the IC is charging it? Or do I have to let the ic charge the battery seperatly while the 3.3 regulator will be fed by the 5V from the USB, the 5V regulator will be turned off and the 5V from the USB will be routed to the internal 5V rail?If the first option is what you mean I will simply use a battery charger IC with a higher output current, right?

author: mariush
author_rank: Super Contributor
timestamp: February 06, 2014, 09:38:02 pm
content: I didn't check if you wired the pins correctly but it looks good overall.Like i said, if you want to make it cheaper, it's possible to put two ceramic capacitors in parallel instead of a single more expensive one.That battery doesn't tell the maximum current it "likes" to be charged at. But considering it's for a phone, I assume up to 500mA would be fine. It may even work at 1A but its life may decrease. I'm really not knowledgeable at this.The charger IC I recommended can charge anything at a fixed 4.2v and a current of up to 450mA. The chip will monitor the battery and try to fill it so I'm not sure what would happen if you run the pi at the same time. That 4.2v x 0.45A = 1.9 watts will most likely be too low to power the pi at full load.You know that pi can run from usb (they say 5v @ about 750mA) and since they use a linear regulator for the heaviest power consumption, that may be 3.3v @ 750mA or about 2.5 watts. Considering the efficiency of the regulators above of about 90%, the battery or the charger would have to be able to give about 3 watts.I guess (I'm really not sure) that you may be able to browse the internet or run something using little power on the pi while charging, but I don't see it playing games while charging.You could change your project to add a switch that would connect the two regulators straight to 5v coming from usb and leave the charger IC to slowly charge the batteryA double pole double throw like this one would work :http://uk.farnell.com/c-k-components/js202011cqn/switch-dpdt-0-6a-6vdc-tht/dp/2320018Instead of slide switch, you could probably also use a few mosfets or some latching relays or something like that to switch between battery and regular input.This way, the charger IC will do its business pulling up to 450mA from the input and charge battery, while the regulators work straight from the input voltage. Now of course, you have to be careful to have the usb input capable of giving power for both the charger AND the pi.A usb jack on your computer can only provide 500mA, a hub (where up to 4 connectors are connected in the computer) can provide up to 2 amps. The pi - with these switching regulators you don't need 750mA anymore like i said above so the pi will probably run straight from 500mA if it doesn't have to charge the battery, and if you have to charge battery you could probably do with 5v 1A charger.There would be another thing you could do... the charger has configurable charge rate - you could detect if power is coming from usb and then if pi is running reduce the charge speed to 80mA or something low, and switch the pi to run straight from input connector automatically. When pi is turned off, change charge rate to the max of 450mA.I know there's some battery monitoring ICs that would do this stuff automatically (switching something from battery to dc in when voltage is detected on the dc jack) but I can't remember any right now.Maybe others would like to suggest stuff.

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: February 06, 2014, 10:08:53 pm
content: Maybe you mean theMCP73871It looks like it does exactly what I need. I will probably not use usb for charging but a normal wall plug to be sure that enough current is flowing.

author: mariush
author_rank: Super Contributor
timestamp: February 06, 2014, 10:33:32 pm
content: There's all kinds of charger ICs.The MCP73781 is fine chip, BUT it's only available in QFN footprint which is almost impossible to solder with an iron, you'll need solder paste and hot air gun to solder it.Everything I linked to was in packages that can be soldered by hand with a regular iron and regular solder wire... that's why the one I recommended was both cheap and only capable of maximum 450mA.

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: February 08, 2014, 10:39:21 pm
content: Quote from: mariush on February 06, 2014, 10:33:32 pmOh you're right I totally forgot that when I read the datasheet. I don't want to have an extra switch. It should switch automatically to external power if the plug is inserted. If there is no hand-solderable IC out there then I will use relays or mosfets.I attached a picture how I would make the circuit. I am not happy with the diode I use, because the voltage drop will cause a lot of power loss. It would be good if I could it substract with another mosfet, but I don't know how to drive it corectly, has somebody any ideas how to do that?

author: mariush
author_rank: Super Contributor
timestamp: February 08, 2014, 11:47:58 pm
content: You'll probably want to look for something like TPS2115 or a similar chip from that category of PMIC chips:http://www.digikey.com/product-detail/en/TPS2115APWR/296-16940-1-ND/652794

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: February 09, 2014, 12:08:42 pm
content: Quote from: mariush on February 08, 2014, 11:47:58 pmThe chip looks like it would do the job. But I am unsure if the maximum current of 1.25A is enough. The bigger one TPS2115ADRB with 2.5A output current is only available in 8-VDFN footprint. I didn't found any suitable chips from other manufacturer. If on both rails 1A is drawn, and the efficiency of both regulators is 85%, a power of (3.3V*1A)+(5V*1A)/0.85 = 9,76W is needed. This would need a current of 9,76W/3.8V= 2,57A from the battery. I don't know if the battery would support that, but it would be the maximal imagineable current.Do you think the circuit I drawed would work? It would be cheaper than the IC and capable of more current. For the diode I would use a schottky with 350mV forward voltage.

author: jwm
author_rank: Regular Contributor
timestamp: February 10, 2014, 02:21:59 am
content: Quote from: Heribert Hechtersheim on February 09, 2014, 12:08:42 pmTo simplify things, you could use a 5V lithium ion cell phone booster pack like10000mah battery backup. It will take care of the battery and charging circuitry and let you concentrate on the efficient 3.3V step-down and modifications to the ras-pi. I'm a little wary of doing my own li-ion charging circuits since seeing a li-poly battery explode once (not by my circuit, by cheap ebay charger supposedly designed for li-poly). You can even get ready made 5v->3.3V step down modules like3.3V step down supplybut then you don't get to build anything.John

author: Heribert Hechtersheim
author_rank: Contributor
timestamp: February 10, 2014, 05:54:48 pm
content: I want to design the whole circuit by myself. The cell phone booster pack stores a nice amount of power, but it would be too big.I watched some videos of overcharged lithium polymer batteries with very impressive explosions. If my charger will fail, I will keep the board for next sylvesterBut to be safe I decided to use the TPS2115 with the maximum of 1.5A current. I can monitor the temperature of the battery with the attiny as well because it has an temperature-dependent resistor built in.Now I can start with designing the pcb.