Solar Charger AND battery charger, will this circuit work? - Page 1
Forum section: electronics / beginners

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: March 31, 2025, 04:04:20 am
content: Hi, I'm making myself a cute little macropod and a mechanical keyboard with a solar panel (Yes, a bigger battery would be a better way to achieve more battery life, but you gotta admit, a solar panel is cute, a good learning opportunity and more "green" even tho the power doesn't make a difference).my problem is that I'm not so sure what would happen if I plug in the USB charger as both will try to supply power to the battery, and depending on the conditions, one could have a higher voltage and feed power into the other one. This is a rough terrible schematic for what I'm doing.also as a secondary question, just for curiosity, how would I go about making a device powered by an AA/coin cell battery (non rechargeable) use a solar power to power/extend the runtime? If you put voltage trough the AA it'll explode/be damaged, but the solar cell is only powering the device PARTIALLY and all that.Thanks! <3PS: Just in case my handwriting is bad, the ICs I am using are: BQ25505 energy harvester and BQ24075 li-po charger. the devices will probably draw 5-10uA when asleep (a majority of the time) and 50-80uA when in use, they have no RGB or anything like a display, so just a boring basic display and every uA counts.

author: ME
author_rank: Frequent Contributor
timestamp: March 31, 2025, 04:53:16 am
content: why not just use a tp4756 modual?.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: March 31, 2025, 05:13:49 am
content: Quote from: ME on March 31, 2025, 04:53:16 amWhat's that?Googling it does not give me any results.I'd also like to know if/why my circuit would work or not.

author: Peabody
author_rank: Super Contributor
timestamp: March 31, 2025, 04:15:47 pm
content: @ME may have meant the TP4056.I've never seen any circuit where a rechargeable battery is charged from two different sources, and have no idea how it could possibly work. You would normally have one charger, the input to which could come from two different sources through something as simple as a diode OR circuit.Where is the load in your schematic? Does it have a regulator (what voltage?), or is it driven directly from the battery? And is the battery a single-cell lithium? What solar panel are we talking about?

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: March 31, 2025, 10:05:09 pm
content: Quote from: Peabody on March 31, 2025, 04:15:47 pmHey Peabody!I didn't put the load in my schematic but it's connected to an LDO 3.3v regulator which powers an NRF54L15 or NRF52840 module (Depending on the availability at the time I'm done).this is a really simple mechanical keyboard, so not much going on, just a key matrix and that's almost it. maybe encoders etc, and maybe a reflective LCD screen to show the current layer/battery/connection status?I've linked another person's project as mine is almost nearly identical. Their project really looks neat and like they know what they're doing, so I based of my ICs off of them (tho blindly trusting someone is never a good idea 😅https://hackaday.io/project/189688-aloidia-wireless-split-solar-powered-keyboardEDIT: I'm a bit tired from schematics but I found the IC SPV1050 and it looks like a better IC for the same price for my projects. I might switch to this IC.

author: Peabody
author_rank: Super Contributor
timestamp: April 01, 2025, 12:47:45 am
content: It looks like the Hackaday circuit really does have the battery connected to both the charger and energy harvester. I've never seen that, but as you say, the author seems to know what he's doing.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 01, 2025, 06:06:14 am
content: Quote from: Peabody on April 01, 2025, 12:47:45 amthe more I think, the more I start to consider that I shouldn't blindly consider his circuit. do you think it's okay? My gut tells me that it'll mess with the current sensing to end the charge, but thankfully it might only end slightly early and not continue.also, do you think I could put a MOSFET between the USB charging circuit and the battery+ to disconnect the IC when in solar mode? The IC draws 6uA when Input is disconnected which for my application is actually a lot!

author: Peabody
author_rank: Super Contributor
timestamp: April 01, 2025, 02:53:10 pm
content: My problem is that I understand how the charger chip works, but have no experience with harvester chips. I don't know what algorithm, if any, it uses on the battery pin, other than to just charge it to a set voltage. But does it terminate charging?What are the specs of the solar panel you will be using? Is it a 5V panel or some lower voltage? Will it be out in the sun?Will your device be plugged in to USB most of the time, or only occasionally to charge the battery?In general the circuit shown below can be used to switch automatically between USB and a battery or solar panel, but it only works if USB is the higher voltage, so it will supply all the power if it is present. Of course you can connect any number of power sources to the load through a wired-OR circuit using diodes, and the source with the highest voltage will power the load. But then you have the voltage drop across the diode, and replacing the diodes with mosfets can get complicated. You might take a look at this project to see what you might be up against:

author: Peabody
author_rank: Super Contributor
timestamp: April 01, 2025, 04:06:42 pm
content: I think the circuit shown below would work, assuming the charger is the BQ24075. But that chip may draw too much current for what you have in mind. If so, then maybe the Hackaday circuit will work if the charger is only involved when USB is connected. I've just never tried anything like that.I have a question mark on the harvester chip because I don't know how it works, and I don't know if it is even needed. A 5V or 6V panel in good light will supply as much current as it can at the battery voltage or slightly above. But indoors the panel's open circuit voltage might be below the battery voltage, so you would need the harvester's boost function.Edit: I'm going to change my mind. I think the Hackaday circuit will work. It has two separate paths for charging. One is USB to charger, and the other is solar to harvester. Their outputs meet at the battery. Then whether there is USB power or not, battery current can flow back through the charger to the load outout (VDDH). The only question is whether solar input will mess up the battery charging when USB is present. I don't think so. It might make it terminate early, but then the harvester will just continue to charge. So it looks like it works.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 01, 2025, 08:39:50 pm
content: Quote from: Peabody on April 01, 2025, 02:53:10 pmThe panel is an SM141K04LV and the open circuit voltage is 2.75v. it'll be rarely out in the sun, mostly next to a window getting sunlight, a lot of the time with ambient lighting from the bulbs/desk lights.The USB-C port is going to be used probably like once a year considering the solar panel.

author: Peabody
author_rank: Super Contributor
timestamp: April 01, 2025, 08:45:44 pm
content: Ok, well then you do need the harvester chip. So as I said in my edit above, I think the Hackaday circuit should work.