Breadboard circuit works, PCB doesn't ;_; - Page 1
Forum section: electronics / beginners

author: sdutcher
author_rank: Newbie
timestamp: March 10, 2025, 05:33:02 pm
content: Hello, I'm new to the forum but I've been watching Dave's channel for years and years. I'm struggling with a basic circuit and I thought I'd see if I could receive some help and beratement. If this isn't the right board for this, please move it (to projects?).The circuit is a solar MPTT charger for a 3s1p lion pack, a comparator, triple 5 timer, and a motor. What I'm trying to accomplish is to use the comparator to switch a transistor when the solar panel is at higher voltage than the battery, which puts another resistor in parallel to the 555 increasing the frequency. The 555 drives a mosfet that switches ground to the motor. So the idea is at night or a cloudy day the motor spins slower conserving power.The MPTT charger is based on the example circuit from the CN3722 datasheet and an aliexpress module.The PCBs I got back from JLCPCB power the motor, seem to charge the battery, but the comparator circuit is always driving the transistor on so the motor is always running at high speed.

author: ledtester
author_rank: Super Contributor
timestamp: March 10, 2025, 07:00:27 pm
content: I would isolate the comparator + 555 part of the circuit and test just that part of it by using power supplies to set the battery_pos and solar_pos. Make sure that part is working as you expect.Maybe just build up only that part of the circuit on a PCB. Find the smallest part of your circuit that isn't working as intended.Also - is U1B used in your circuit? If not, there are design guidelines for how to configure it:https://e2e.ti.com/support/amplifiers-group/amplifiers/f/amplifiers-forum/986661/lm239a-ep-how-to-terminate-an-unused-comparator

author: ahsrabrifat
author_rank: Regular Contributor
timestamp: March 11, 2025, 07:47:12 am
content: It is possible that there is a manufacturing error. Maybe some broken traces or short circuit.

author: Zero999
author_rank: Super Contributor
timestamp: March 11, 2025, 08:26:34 am
content: Did you use exactly the same components on the PCB as the breadboard, i.e. unwired them and moved them to the PCB? I assume not.I'm not surprised it doesn't work. The circuit is marginal. It might have worked by luck on the breadboard, but is presumably not working on the PCB, because the components are slightly different.For a start, the LM393 is going to struggle with R4 = 510R to pull down U2's base enough to turn it on. What does U2 do anyway? Presumably add R5 in parallel with R6 to increase the frequency. Why have you done it like that? You do know that current flows in both directions through C1. Whilst BJTs do work in reverse, the hFEis much lower and breakdown voltage is typically not much more than 5V.I haven't looked at the CN3722 part, which appears to be similar enough to the circuit on the datasheet, so should be fine, assuming the layout is good.

author: sdutcher
author_rank: Newbie
timestamp: March 11, 2025, 03:55:23 pm
content: Quote from: Zero999 on March 11, 2025, 08:26:34 amThe PCB is all SMD, but the parts are the same just different packages. You're right about U2, it places R5 in parallel to R6. Do you have any suggestions on a better method to achieve the same result? The charger circuit for the CN3722 is working, I just copied the layout from a module that uses the same part. Thanks for your feedback.

author: PGPG
author_rank: Frequent Contributor
timestamp: March 11, 2025, 03:56:01 pm
content: Quote from: sdutcher on March 10, 2025, 05:33:02 pmI have never been doing anything with solar panels.What I see is that you compare net named solar_pos with 1/2 of voltage at bat_pos net.These are the voltages you are speaking about. If so than why you compare one with 1/2 of the other and write about comparing them (and no word about 1/2 factor)?

author: Zero999
author_rank: Super Contributor
timestamp: March 11, 2025, 04:19:13 pm
content: Quote from: sdutcher on March 11, 2025, 03:55:23 pmThen they are not exactly the same parts. No two parts are identical and this is a marginal design, so it's unsurprising it works with one set of parts, but not a different one.Going back to my point regarding the LM393 and a load of 510R. The LM393's output is only guaranteed to sink 6mA, 16mA being typical, with a 510R load an voltage of 12V, it's trying to sink nearly 24mA, which it can't do. Its output transistor isn't saturating and the voltage across the 510R resistor will be much lower, than expected.https://www.onsemi.com/download/data-sheet/pdf/lm393-d.pdfQuoteI wouldn't use the 555 at all, but you've done it that way, so there's no point in changing now.The first thing you should try is making R4 a more sensible value, such as 10k. If that doesn't work, change U3 for two P-channel MOSFETs, connected back-to-back.

author: sdutcher
author_rank: Newbie
timestamp: March 11, 2025, 04:35:59 pm
content: Quote from: Zero999 on March 11, 2025, 04:19:13 pmYeah, I'm very much a beginner and I'm making a lot of mistakes.