Help with PCB design (battery charger + boost converter) - Page 1
Forum section: electronics / beginners

author: hiban
author_rank: Contributor
timestamp: January 28, 2025, 07:57:57 pm
content: So i'm working on this personal project, which is a small PCB containing a battery charger + boost converter, with other added functions. I did a similar one about 2-3 years ago using a TP4056, but i found it's extremely slow at charging the 4000MAh battery i'm using. It takes about 8+ hours for a full charge, with a charging current set at about 750mA because the TP4056 got quite hot at 1A. so i decided i would do another one with a 2A charger IC, so i don't die of old age every time i need to charge that battery.Anyway, i think i'm pretty much ready to order the PCB, but since the switching nodes can radiate into nearby PCB traces and make everything not work as expected, i'd like some experienced eyes to take a look at it. So every suggestion is welcome.Keep in mind the PCB is smaller than your index finger, so the space is limited to what you see. One of the reasons why i chose this specific charger IC is because, aside from the input/output capacitors and the led indicators, which are common for every charger, this one only requires 1 inductor and 1 resistor. I also dont want to use components smaller than 0805, because my soldering skills are not superhuman. So i have to fit "big" components into a small PCB.Circuit schematic and PCB images are attached. I also attached the datasheet from the battery charger IC (it's been autotranslated from chinese). Oh by the way, i'm using moulded inductors like the ones in the attached pic.My questions are mainly about the battery charger part of the circuit. I've used some linear charger ICs before, but it's my first time with buck chargers.First question is about R2 (labeled as RS in the datasheet). According to the datasheet, value of that resistor determines the charging current of the IC, so in my case R2 is 0.05 Ohm, with equals to 2A charging current.I'm using a 0805 sized resistor, which is rated as 250mW 150V ±1%. But since the charging current is 2A, i'm concerned about this resistor.In the datasheet of the IC, it's a bit ambiguous, but it makes it look like the charging current does not pass through the resistor, and it comes from the BAT pin instead. But i have seen other datasheets of buck chargers, and in those datasheets it makes it look like the charging current is coming from the SW node, and therefore it indeed goes through the resistor.So i don't really know if i'm fine with the current resistor, or if i should use a bigger package, like a 1210 sized one which is rated as 500mW 200V ±1%. However, this bigger resistor uses more space in the PCB. And as you can see in the attached pics, the space is quite limited.My concern is that, since according to Ohm's law this resistor may be dissipating 0.2W for maybe about 3-4 hours, inside a small case with little to no ventilation, and it's rated for 0.25W, maybe it could get a bit hot? or is that ok?EDIT: I decided to go safe and replaced it with a 1206 sized one, 50mΩ ±1% 1W ±50ppm/℃ . Price goes up from 1 cent to 3 cents per unit, but hey... what's a couple more cents? I'll only buy 20 of them instead of 100.Second question is about the orientation of R2 in the PCB. As you can see in the images, i've placed R2 so the trace from R2 to the VS pin (output current detector pin, according to the datasheet) is as short as possible, since it is quite close to the L1 inductor. However, this placement of R2 makes it so the output node of the inductor is a bit longer. So depending on how i orient the R2 resistor, i have to choose between having a smaller trace to the VS pin, or a smaller output node of the inductor. I think i made the better choice, but what do you guys think?EDIT2: Nevermind, i think the resistor is ok now.Another question is about the BAT pin (pin 6). The datasheet seems to be a bit ambiguous in the translation, so it does not make it too clear whether the BAT pin is just a sense pin, or if enough amps can pass through that pin so the trace must be wide. I personally think chances are higher that it's just a sense pin and the trace can be narrow, but it's better to ask.Any other suggestions about the PCB are welcome. If you think there is something wrong, or something which could be better, i'd be very grateful for any advise. Thank you!

author: jwet
author_rank: Frequent Contributor
timestamp: January 31, 2025, 01:53:09 am
content: Looks good overall- things to potentially look at:Check foot print of R2- these current sense R's are usually 1206The loop between L1 and C2 and C3 could be tightened up, this is the most critical area on a switcher.Foot prints for LED's at bottom look like cap foot prints- double check.The peak current limit on your little 3-5 boost is 4 amps, the FET at Q2 is 50 mohm and rated for 4A max, I would elminate it or beef it up. Consider increasing C6

author: hiban
author_rank: Contributor
timestamp: January 31, 2025, 06:30:31 am
content: I forgot to say that the load on this circuit will never be more than 500mA. Typically between 100-300mA.Thank you very much for the suggestions, i will revise the circuit.

author: daisizhou
author_rank: Super Contributor
timestamp: January 31, 2025, 09:12:04 am
content: If you want to achieve smaller EMI, perhaps these areas need to be adjusted because the smaller the high-frequency loop area, the betterI have provided an example layout diagram for MT3608, which you can refer to.Each component is not randomly placed, especially in the high-frequency part

author: jwet
author_rank: Frequent Contributor
timestamp: February 01, 2025, 01:46:38 pm
content: That's fine. Note that the 4 amp peak current is baked into the 3608. At lighter output loads it will still draw 4 amp peaks just less often (PFM mode).

author: Peabody
author_rank: Super Contributor
timestamp: February 01, 2025, 03:26:10 pm
content: When reverse-engineering a couple charger/boost modules from the Far East recently, I found that they use protection chips that have brought the mosfets into the chip. So these chips have three pins - B-, ground, and B+. No external mosfets.These are the FM5056 and the XB7608A. These specific parts may be underpowered for what you need, but there may be more capable versions available. Also, on the 2P 18650 charger I looked at, they used two of these chips in parallel. I'm not sure that really works, but that's what they did. But they also used four parallel mosfets and two parallel shottkys in the load sharing circuit. Apparently parallelism is a thing in the Far East. See below.

author: hiban
author_rank: Contributor
timestamp: February 01, 2025, 06:41:22 pm
content: I have done some changes:- Replaced the battery protection IC (U2) with a similar one which triggers overdischarge at 3.0v instead of 2.9v. It's not 3.2v like i wanted, but it's close enough (i have located one which triggers at 3.2v, but it's being discontinued so availability is not good). Good thing is that all these ICs (i've made a list of like a dozen with similar specs) use the same footprint and pinout, so i can easily swap them.Anyway, by replacing that IC i could get rid of the voltage divider i was using there (so that's 1 resistor less), and implement that part of the circuit the proper way with both OC and OD mosfets. I used a dual mosfet IC (FS8205A) which allows me to save some space aswell.- Replaced the schottky diodes (D1 and D2) with smaller package ones, which apparently have same specs as the bigger ones, so that way i can save a bit more space, and moved some components around the MT3608 to make the loops just a bit smaller and bring the capacitors a bit closer to the GND pin (i don't think i can get them closer than that).I'm not sure about the small feedback trace between C7 and R8, is that ok? or do i need to make that loop smaller aswell?Also, you see i got 8 GND vias in that area, is that a good spot to place them? or maybe it would be better to place them under the MT3608? Moving them under the MT3608 would allow me to place the input capacitor (C6) even closer, and move the feedback trace between C7 and R8 closer to the pack, but i'm not sure whether that's better or not, since that trace is supposed to be a feedback trace and those are supposed to be kept far away from switching nodes and EMI generating areas... I've attached a picture with both options side by side.- I've also made small changes in the charger IC area (U1), reworked the traces next to the input and GND pins and moved the input caps (C1,C2) a tiny bit closer to the IC so the input loop is a bit smaller. Haven't been able to make major changes there because the space i have is quite limited, and i have 2 zones in the PCB in which i cannot place any component (there will be 2 plastic pieces there touching and holding the PCB, so i cannot fit any component in those areas).

author: jwet
author_rank: Frequent Contributor
timestamp: February 01, 2025, 09:13:03 pm
content: I think you've reached the point of diminishing returns- send it! It looks pretty darn good.The R7 path is no problem, its guarded by ground. The issue about the stitching around the 3608, either way. You pick up inductance going through Vias so keeping as much on one side is the safest bet if it fits. Once you're into a 2 sided load for components though- don't be shy with things that work, you're going to pay the double side charge either way.

author: hiban
author_rank: Contributor
timestamp: February 01, 2025, 09:29:03 pm
content: I dont plan on sending it until monday, which is when chinese holidays end and they start processing new orders. So i have some time to try to improve it.So what do you think is better? Vias under the MT3608 or the previous layout with vias away from it? I have both versions of the PCB already designed, so choosing either one is the same effort for me.

author: jwet
author_rank: Frequent Contributor
timestamp: February 01, 2025, 09:51:25 pm
content: Happy New Year to our chinese breathren- give them a day or two to settle back in after all that revelry.For me, at these frequencies, it kind of doesn't matter much but I guess I prefer the vias if all else is the same.Good luck, I hope all goes well. Its fun to interact a little- thanks for the updates. Post when it works great in couple of weeks!

author: hiban
author_rank: Contributor
timestamp: February 01, 2025, 10:19:45 pm
content: Sorry, your answer is a bit unclear for me, as both options have vias, so which one do you think will be better?I could also, as a third option, scatter some vias evenly around the ground planes, but i don't know if it's good for this kind of design. I've seen PCB with lots of vias scattered across ground planes, and other PCBs with isolated groups of 8-10 vias on each ground plane. So i usually get a bit confused on where and how to place the vias.

author: jwet
author_rank: Frequent Contributor
timestamp: February 02, 2025, 01:34:06 am
content: So sorry, I like the vias under the IC marginally but don't think its a major issue.

author: daisizhou
author_rank: Super Contributor
timestamp: February 02, 2025, 01:39:44 am
content: Regarding your confusion, this is a complex game compromise process.Through holes are mainly used for heat dissipation.It's hard for me to tell you in general terms, so I recommend you watch the video belowhttps://space.bilibili.com/28143041/lists/62088?type=seasonI hope you can watch these 13 videos carefully and they will be helpful for your design.It includes DCDC BUCK step-down circuit and BOOST step-up circuit, as well as some game-related compromise issues.Contains some Eastern wisdom, hope it can help you

author: hiban
author_rank: Contributor
timestamp: February 02, 2025, 02:03:14 am
content: Thanks for that collection. Right now i was watching a 2 hour long video about proper grounding, EMI, and AC in PCBs. It's quite interesting:I will make sure to take a look at the vids you linked aswell, thanks!

author: daisizhou
author_rank: Super Contributor
timestamp: February 02, 2025, 03:06:52 am
content: I hope you have no difficulty understanding Chinese.February 3rd is not a good day.China is still on holiday,A reasonable date is February 24th.The best option is after March 3

author: hiban
author_rank: Contributor
timestamp: February 02, 2025, 03:59:14 am
content: Yeah, i don't understand chinese at all.