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

author: Lion_Tamer
author_rank: Contributor
timestamp: February 28, 2017, 09:07:37 pm
content: Hi allI would be grateful if those in the know could look over my design and tell me if I am looking to be on the right track and maybe suggest how I could improve it. I would class myself as just above beginner in many ways and mostly self-taught so I am sure that there will be mistakes that are glaringly obvious to you. This is also my first foray into designing with rechargeable lithium batteries so I want to make sure that it will be safe (or as safe as reasonably possible).First let me start by outlining the challenge:The challenge is to make an internal rechargeable battery pack for some 1990s laser combat gear; this gear is currently powered from a 9V battery which has to be changed after every game as it has no voltage regulation so the volume and range of the weapons drops. I am not currently allowed to change the internal control system on the weapons but can add my board to the unit. The weapons are metal cased but do occasionally receive some abuse from the kids when in use with the occasional barrel being shunted (compressed) into the body damaging the main board, because of this I have only been able to identify 1 safe location for the batteries and have decided that I would rather not use pouch batteries as there are various screw etc inside the case that could rip them open in the unlikely event of the battery becoming unsecured. Due to the mounting location I also have to keep to surface mount components for 95% of the design as the battery holders will take up most of one side of the PCB.I have used a power supply through a 1 ohm 50W resistor with my scope to get some measurements of the current profile/draw for the weapons at power on and when a shot is fired as shown in the images below. The general standby current (between shots) is an average of 20mA with an occasional 60mA peak.The batteries that I intend to use are 2 x 18650 cells which may or may not have internal protection but will come from a reputable brand (I currently have some LG HG2 unprotected cells which will be used for the initial testing). I have attached the schematic that I have come up with so far which I have tried to separate into blocks for ease of reading. I think that it should work but I do wonder whether the soft start circuit will be effective enough, whether I should add some more electrolytic capacitors to the boost output and whether the boost circuit will cope with my requirements (it is my first boost circuit of any decent current requirementThank youJem

author: PCChazter
author_rank: Contributor
timestamp: March 01, 2017, 02:09:48 am
content: Sounds like a fun project! With risks like the damage you're describing, I would almost get batteries with built in protection, then you can take yours out, or leave it as a redundant protection. That way if through rough-housing in the off chance the wires from the battery get severed or broken, even if they short out, the batteries will be protected.Also, with the batteries, I'm not too sure how good having them in parallel would be. I have heard that because of the slight difference in internal resistances and capacities, one battery may charge or discharge faster than the other, and will cause one battery to work much harder than the other.The charging voltage will need to be more like 4.5V. The peak voltage of lipo is 4.2V, and there will be a drop across the mosfet. Speaking of the mosfet, is there a reason why that mosfet is there? I looked at the datasheet for that charger, and it will do 1A at the Rprog you have in there on it's own. Just keep in mind the junction temperature of that charger at that current will get on average 30 to 90 ºC (depending on which package you use) hotter than ambient, hotter if it's still in the suit while charging with nowhere for the heat to go.I'm not sure if you are doing more with that pic than turning the power on and off to the unit, but if you wanted, you could also drive T6 from ~PG with a pullup resistor, then when the power is plugged in for charging, ~PG will be pulled low and the mosfet cut off, or better yet, cut off the power before your boost converter in the same way, and put your switch in the appropriate spot.As for the boost regulator keeping up, best thing to do would be to put a spot for another cap, and DNP it. That way you can add it later if needed. Do you have a ballpark of the max current requirements?Anyways, good luck! And have fun with it. There's something about getting your first board printed that is just so satisfying.

author: Lion_Tamer
author_rank: Contributor
timestamp: March 01, 2017, 09:35:43 am
content: Quote from: PCChazter on March 01, 2017, 02:09:48 amI may well get protected batteries for the final units once I have confirmed what the peak current draw from the battery is.I shall be mounting the batteries on one side of the PCB usinghttp://www.keyelco.com/product.cfm/product_id/919, they will then have a couple of cable ties through the PCB to keep them there, I am also planning to cover the back side of the PCB with a piece of acrylic this way it should only be under the most extreme and violent of circumstances that they would get damaged or shorted out.Quote from: PCChazter on March 01, 2017, 02:09:48 amI had read/heard about this but it also seems to be a general consensus that as long as they are matched before being put in parallel that it should be fine but I am happy to be corrected if required. I will be making sure that they are bought as pairs and then kept in their pairs for their lifetime.Quote from: PCChazter on March 01, 2017, 02:09:48 amI hadn't thought about the voltage drop so may have to look again at the charge circuit.I was planning to use the 10 pin MSOP package as it is slightly easier to solder by hand.Which mosfet - T1?Quote from: PCChazter on March 01, 2017, 02:09:48 amI am aiming to use the PIC to show the battery charge state on the two state LEDs by measuring the internal voltage reference within relation to the PICs VDD pin, when ~PG goes low the pic will sense this and then release the STATE_1 and STATE_2 lines for the charge to control.I can't easily fit a toggle switch anywhere to the unit but can just about hide a momentary push button switch under the butt cover of the weapon (which is just clipped onto the back of the weapon and currently hides the battery compartment), the other advantage of hiding the switch under this cover is that it can't be accidentally activated.I am aiming to use T4 as the main on/off control with T5 and RT2 providing the soft start function.Quote from: PCChazter on March 01, 2017, 02:09:48 amI may well add a couple more capacitors of different sizes but then wonder if I am being paranoid, I am hoping that I will at least halve the start up current and maybe smooth out the shot current but the shot current doesn't worry me as much as the start up current.Quote from: PCChazter on March 01, 2017, 02:09:48 amThis is most definitely proving to be an interesting learning exercise, I just hope that I can pull it off.

author: DBecker
author_rank: Frequent Contributor
timestamp: March 01, 2017, 06:15:26 pm
content: My interpretation is that the start-up current is charging an internal capacitor. The 5 amp transient is unimportant since it will change base on the source resistance.It appears that firing a shot is a 100-200mA event. That should be the design target. Handling that is pretty much trivial with a boost converter and a single smaller cell.I would prototype this with FleaBay modules. Get a 4056 charger and one of the adjustable boost converters. See if it works on the bench.You might consider using a single 14500 lithium cell. It's small (AA size) and AA cell holders are inexpensive. The downside is that it might be confused for a conventional AA battery.

author: PCChazter
author_rank: Contributor
timestamp: March 01, 2017, 08:19:10 pm
content: Quote from: Lion_Tamer on March 01, 2017, 09:35:43 amSounds like you've got the safety of those batteries covered!Quote from: Lion_Tamer on March 01, 2017, 09:35:43 amI haven't done much with multiple cells, it's just something I have heard of being a concern. If you have done some research on the subject, and that is what you have come up with, then I would go with that. Also, if the batteries have internal protection, that will help if the batteries have a difference in potentials.Quote from: Lion_Tamer on March 01, 2017, 09:35:43 amT3 - I see now it is your load sharing circuit. I also did not notice your 5V inputs, so it was confusing me. That is also why I mentioned you would need 4.5V, but your 5V input is sufficient.The 10 pin MSOP junction (internal) temperature will be closer to a 147ºC difference to ambient, more depending on how far the battery gets depleted. Take a look at the first attachment. If you have 5V on your input, and your battery is on average 3.7V, the average drop across the charger will be 1.3V power=current * voltage so 1.3V*1A = 1.3W of dissipated heat. At a junction resistance of 113ºC/W, the junction temp will be around 147ºC higher than ambient if there are no limits by the chip. If ambient temperature is around 18ºC, the junction would potentially be 165ºC. If your battery is at 3V, the power dissipated is much higher, so the temperature difference higher as well. However, the chip will limit the current as the temperature goes up, and will stop charging completely at 150ºC (second attachment). You can remedy this with a heatsink, or a lower charge current. Perhaps you can use the metal case of the unit as a heatsink?Quote from: Lion_Tamer on March 01, 2017, 09:35:43 amI wouldn't try to drive those lines like that from the MCU, see the third attachment, when the charger is sinking it low, if your MCU is driving it high, you will have a theoretical short. Another option if you want to relinquish control to the MCU is to put pullup resistors on those outputs, read them with other pins, then you can do your logic and drive the LEDs from separate pins. Sounds like you pretty much want to leave the MCU in there either way though, to control the power with the pushbutton.Quote from: Lion_Tamer on March 01, 2017, 09:35:43 amYou more want to watch the voltage drop at your output of the boost converter. If it is not keeping up, the voltage will drop.DBecker posts a good point, that 5A spike is not very long, so if 100mA-200mA is your peak current, you may be overkilling it a bit as well. Like he said, you should prototype on a bench with your circuit first, either with prebuilt boards on a breadboard, or a single run of the board design.Quote from: Lion_Tamer on March 01, 2017, 09:35:43 amNever stop learning! Electronics is an exciting and unlimited field that never ceases to intrigue me. It sounds like you are on the right path to pulling it off, don't give up.

author: Lion_Tamer
author_rank: Contributor
timestamp: March 02, 2017, 12:35:41 am
content: Quote from: PCChazter on March 01, 2017, 08:19:10 pmI hadn't even thought about the chip temperatureLooking again at the data sheet I may well try and swap to the DFN package as it will have less than half the heat rise.Quote from: PCChazter on March 01, 2017, 08:19:10 pmI did start the design with those output feeding other pins on the pic but I was thinking that if I put those port pins on the PIC into open drain mode that it would work and that I could do 2 jobs off of 1 pin but I may be wrong, I was vaguely hoping that I might be able to swap to a smaller chip later on if I can get the pin count low enough.Quote from: PCChazter on March 01, 2017, 08:19:10 pmYou may well be right, I have a habit of trying to make things more robust than they need to be. I will be getting a set of 5 boards etched initially so that I can verify that it works and setup the PIC code, this should also give me the chance to optimize the components before I finally produce a "real" module.Quote from: PCChazter on March 01, 2017, 08:19:10 pmI am glad that it doesn't sound like I am completely bonkers in the design, I expected that I would have missed/failed to think about a few things which is why I thought I would ask the communities guidance.Thank youJem

author: PCChazter
author_rank: Contributor
timestamp: March 02, 2017, 11:47:54 pm
content: Glad to help. You may find more that was missed after you get it all built and on the bench, but that's what testing is for. FYI, 3mmx3mm DFN-10 packages with an exposed pad can be a bit finicky to hand solder, but is still do-able (much easier than a 2.2mmx2.2mm TDFN-10...don't recommend trying that at all)

author: Lion_Tamer
author_rank: Contributor
timestamp: March 03, 2017, 12:15:23 am
content: I used to work in a hand solder department so it doesn't really phase me that much but I do like to keep life easier when I can, I do also have a hot air station which I use occasionally when repairing things.

author: PCChazter
author_rank: Contributor
timestamp: March 03, 2017, 07:56:06 pm
content: Quote from: Lion_Tamer on March 03, 2017, 12:15:23 amI didn't even know they still had hand soldering shops outside of China! I used to work in a shop installing and wiring strain gauges. Tedious work, but nothing compared to a TQFN-10 package! I also don't have a hot air station though, that's something I still need to get.

author: Lion_Tamer
author_rank: Contributor
timestamp: April 14, 2017, 11:26:01 am
content: I have finally managed to find time to sit down and solder up a prototype.Now it is on to programming and verifying the basic design before I try and optimise for low current consumption.Jem