[Schematic Review Request] Solar Powered macropad review request - Page 1
Forum section: electronics / beginners

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 04, 2025, 04:40:16 am
content: Hi! I haven't designed any circuits in about a year, and I'm getting started again, I barely remember anything...i was wondering if any of you could go over my schematic and give me advice or see if there's potential issues? I'm starting again after a long time so I'm sure the schematic is full of flaws...(PS, the U1 is a nice!view clone I got off AliExpress, it'll be changed to a nrf54l15 module so that's why I have a separate TP4056 circuit and a separate 3.3v, I might switch it to a modern and safer alternative with built-in safety features such as a time, but for a first attempt, it's simpler and easierI'll not solder those components/leave them empty depending on what I do, Or maybe if this revision looks good I'll just do it now and save myself the trouble.Thanks! I'll clean it up once it's approved and make it look neater.

author: Analog Kid
author_rank: Super Contributor
timestamp: April 04, 2025, 04:52:43 am
content: Question, if you don't mind: are you a woman?I ask because of your user ID, and also because there are so few women here, so it'd be an interesting data point.You are not, of course, required to answer this ...

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 04, 2025, 05:11:00 am
content: Quote from: Analog Kid on April 04, 2025, 04:52:43 amYeah I am.I do electronics for fun, I am(was) a software engineer I've taken a huge break and I barely have any of my skills left, tho I'm sure I'll pick them back up quickly!I'm sure there's more of us behind less obvious usernames

author: Analog Kid
author_rank: Super Contributor
timestamp: April 04, 2025, 05:19:27 am
content: Quote from: AmeliaBuns on April 04, 2025, 05:11:00 amI hope so!

author: bookaboo
author_rank: Frequent Contributor
timestamp: April 04, 2025, 08:08:06 am
content: At a glance I don't see any glaring errors.What part is U1?Is it a module with onboard debug/prog?One suggestion would be to breakout the 5x spare pins to a header and/or LEDs to help with firmware development.

author: Peabody
author_rank: Super Contributor
timestamp: April 04, 2025, 04:41:52 pm
content: I believe Q1 - your power path mosfet - is oriented backwards. The body diode and the shottky should both be pointing to the load. Otherwise, the 5V supply could send current back through the body diode to the battery, which you don't want. See the orientation used here:http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 06, 2025, 05:44:37 am
content: Quote from: Peabody on April 04, 2025, 04:41:52 pmWait, wouldn't the body diode pointing at the load (VCC which goes to regulator) mean that the mosfet is always conducting the battery to the load trough its body diode? but the VBUS charging the battery is a good catch, fire prevented! I should be more careful with Li-Po

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 06, 2025, 05:54:36 am
content: Quote from: bookaboo on April 04, 2025, 08:08:06 amIt was originally going to be a nice!nano clone because they're cheap, but I'm actually going to switch to a random NRF module instead. the nice nano sadly doesn't have it's SWDIO pins on the headers, so I have to unplug it and manually connect it each time I program, that's why it's not wired.I do think the spare pins and a debug LED is a good idea, I didn't add any as they consume too much power, but they'll only turn on for debugging I assume.I'm thinking of one of these ones:https://www.aliexpress.com/item/1005008589699276.htmlhttps://www.aliexpress.com/item/1005007218800421.html

author: Peabody
author_rank: Super Contributor
timestamp: April 06, 2025, 01:54:45 pm
content: Quote from: AmeliaBuns on April 06, 2025, 05:44:37 amNo, because when the main supply is connected, which is higher than the battery voltage, the body diode will be reverse biased, so no current will flow through it. And when it's not connected, the mosfet will turn on and the body diode will be bypassed so the battery can power the circuit. And if for any reason the mosfet doesn't turn on right away, the output can still be fed through the body diode.I know it seems backwards because you're used to seeing a mosfet used as a switch. But in this case, the body diode and the shottky make up a two-diode OR circuit, where the source with the higher voltage feeds the load, and both sources are protected from reverse current. Except that if the battery is the higher voltage, the mosfet turns on, which eliminates the voltage drop.Here's another link showing the same orientation:http://blog.zakkemble.net/a-lithium-battery-charger-with-load-sharing/

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 07, 2025, 04:07:40 am
content: Quote from: Peabody on April 06, 2025, 01:54:45 pmOh thank you I think I get it now! In a way, we're using it as a very efficient diode here.? We'd need a different circuit for a different battery voltage.I now realized by reading the document further that my new problem is the diode reverse leakage current... I'm gonna thoroughly read the document and the article you sent instead of skimming trough it for answers! I'll let you know once I change the circuit. I didn't know Schottky diodes are so leaky...EDIT: oh you can just BUY nice diodes... the more you knowPMEG10020AELP is really low leakage at 200nA reverse leakage.EDIT2: Oh wait it has a 0.7v forward voltage...I think I'm taking a nap before proceeding... I'm acting stupid.

author: rteodor
author_rank: Frequent Contributor
timestamp: April 07, 2025, 04:58:09 am
content: C12 (ENCODER_BTN) should be to GND I think.Not sure what you wanted to do with R1 in series with the button. Maybe button would be shorting the C, R1 would be gone and instead use internal pull-up resistor (like presumably with C10 and C11).

author: Peabody
author_rank: Super Contributor
timestamp: April 07, 2025, 02:24:31 pm
content: The reverse leakage current is particularly important in high current situations. The reverse current increases exponentially with temperature, so if the diode has been carrying all the current for a while, and has become a bit toasty, you'll get lots of leakage current when it changes state, at least until it cools down. And yes, it seems you can have low forward voltage, or low reverse leakage current, but not both.As discussed in the Zack Kemble post, the key to dealing with reverse current is the choice of the gate pulldown resistor. And I guess using a mosfet with a low threshold voltage will also help.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 08, 2025, 05:25:40 am
content: Quote from: rteodor on April 07, 2025, 04:58:09 amOh nice catch! it's meant to smooth the bouncing a bit. tho It's probably useless and I need to do hardware anyway? Specially for the encoder as it's changing faster.the R1 is for the RC filter but I haven't made stuff in so long it might be in the wrong place.I'm using the IC's internal pull-up.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 08, 2025, 05:39:05 am
content: Quote from: Peabody on April 07, 2025, 02:24:31 pmIt's only carrying 150ma max I think? it's to charge the battery.Also, I just realized, the path for the reverse current in this diode is to ground trough a 3.8Mohm resistor, meaning I don't have to worry about it? Although I just finished reading the article which made me realize, the MOFSET turning on is a bigger issue and likely at such a high resistance. I could split 3.8 into two resistors to create a voltage divider. to have both a reduced reverse current and not turn on the MOSFET. Would that work?What other solutions do I have to reduce the reverse voltage leakage? 150uA might not seem like a lot but it's a lot when your solar panel is only providing 100uA and the device consumes 30uA (in sleep/idle)The BQ24030 might be a solution, from what I understand, without VBUS or VAC it consumes 5uA which is accetable.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 08, 2025, 05:56:39 am
content: Looks okay!C8 and C9 do not appear to be wired up.On U3, CELL and VDD are wired up like they are joined on the chip. I think the intention of CELL is to be asensewire. Typicaly these don't carry current to avoid drop. You could consider separating these. However, the MAX17048doesn't actually wire up CELL internally, so it would just be to avoid confusion of yourself in the future to make the intent more obvious.I would also try to make the schematic hint the pcb design of U2, eg C2 is a input capacitor that makes boost circuit, it should be placed closer to L1 imho to make it more obvious.However, I assume you're doing this for fun, so that could also be nitpicking on my end.If you were to commercialise it, there may need to be some more ESD diodes around the battery/solar inputs and the buttons (with possible current limit resistors).

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 08, 2025, 06:31:13 am
content: OK so I think I figured out some solutions, not sure which is best yet but I think choosing another charging IC is smarter!first of all, with a BAT20J diode, the discharge isn't high enough to lose sleep over or worry about. it's only 0.65uA which is almost nothing. the voltage drop at 100ma is 0.4v and at 1A it's 0.62v max, it's all within acceptable levels.there are 3 ics I found, two of which support power path integrated into them and consume only 4uA or 300nA which is close to negligible.the BQ25170 has only 350nA battery consumption when idle and the datasheet states:QuoteBQ25185 / BQ25188 have power path integrated into the IC and the datasheet states:– 4-μA in Battery Only mode.which isn't as low as the other one but it's still very acceptable.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 08, 2025, 06:47:44 am
content: Quote from: Jeroen3 on April 08, 2025, 05:56:39 amAll great tips, I am doing this for fun, but one day, I dream of making products to sell, so having those tips is handy, and I appreciate knowing which ones are mandatory for function and which ones are for commercialization as I'm taking it very slow! this way I can focus on getting anything that works, then optimizing it.VDD and CELL are wired up on the datasheet the same way, and the datasheet says it's just to sense the output voltage. I'm not sure what you mean by wiring it separately? for MAX17048 it say: "Not internally connected" anyways.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 08, 2025, 01:41:33 pm
content: The intent of the CELL pin is to measure voltage of the cell. Not the cell plus voltage drop over pcb traces, because your device is taking current from the cell.

author: rteodor
author_rank: Frequent Contributor
timestamp: April 08, 2025, 04:02:51 pm
content: Quote from: AmeliaBuns on April 08, 2025, 05:25:40 amYou can drop R1 then and make button debouncing the same as for the encoder signals. I use 10nF with cca. 10Kohm pull-up and it works fine for both encoder and button.

author: Peabody
author_rank: Super Contributor
timestamp: April 08, 2025, 05:34:06 pm
content: Quote from: AmeliaBuns on April 08, 2025, 05:39:05 amNot sure what you mean. The diode in question is D14 in the power path block. The reverse current could turn off the mosfet.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 09, 2025, 05:17:55 am
content: Quote from: Peabody on April 08, 2025, 05:34:06 pm'I was hoping for a lower gate voltage but it was a bad idea, as I mentioned in the previous comments, ZI am probably either going with the different IC or just switching to the diode I mentioned which has less reverse current.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 17, 2025, 06:52:48 pm
content: I'm slowly giving up on the panels as they're 50cad for just extra battery life but I found this interesting article that might help others in similar situations. it's still great for the charging part. I'm opting to go with a charger with this feature built in myself however.https://hackaday.io/project/169422-iot-ups/log/203175-power-path-management-diode-or-ing