Apr 18, 2024 18:00
OK, I'll vote for the power supply being the problem. Simulation is unlikely to reproduce it unless you get a good opamp model that includes the output stage and interacts properly with the power supply... most opamp models are too simplified for that, including the one I got for your opamp. I guess tomorrow you should probe the supplies with the oscilloscope and post a screenshot!
Apr 18, 2024 18:00
Are you using positive and negative supply or single supply?
Apr 18, 2024 18:00
Was this built on a solderless breadboard without decoupling caps?
 
Mar 26, 2024 21:18
hehe, you're welcome, and yes I'd like to know how it turns out!
Mar 26, 2024 07:56
I'll close the window so @ me if you need
Mar 25, 2024 20:51
Looks good!
Mar 25, 2024 19:58
what you said on bootstrap: Yes
Mar 25, 2024 19:57
Note when you change something you have to do: Tools->Copper area manager->Apply to make it recalculate all the copper zones, then click on the tiny "DRC" icon for design rule check, it should report "0 DRC errors" on the left panel, otherwise it shows what to fix.
Mar 25, 2024 19:56
OK! I swapped the pins on the connector (otherwise it wouldn't connect after being rotated)
Mar 25, 2024 18:14
Also these screw terminals are pretty much square, you can also rotate them 90° so wires come out "up" or "down" instead of "left" or "right (when looking at the pcb on screen) if that's better for fitting it all together mechanically
Mar 25, 2024 18:13
Anyway I think you'll solder the connectors manually so you can put them facing one side or the other, but I wonder if the two "BAT" connectors (which you should label properly btw) could move a little bit to allow turning the screw terminals on the left to be rotated 180° if needed...
Mar 25, 2024 18:11
The connector on the right may be the wrong way around, as the wires come out on the board side. But there's only ceramic caps there, so if you check the height, I mean if the top of the caps is lower than the bottom of the wire hole in the connector, then you'll be able to stick the wire in and it could be practical since it makes your board shorter, without the wires sticking out the sides...
Mar 25, 2024 18:09
The new connector are fine, also it's just 5A so you can use more flexible wire than the garden hose stuff that usually goes with XT60
Mar 25, 2024 18:05
Hehe thanks! During phase 2 (buck) every time the buck mosfet switches off, which is very often, the bootstrap cap is recharged, so you don't have to do anything special. But in the boost phase the buck mosfet is on continuously, it just lets current through, so the cap will not recharge, you have to "manually" nudge it.
Mar 25, 2024 12:45
or not lol. Anyway, during phase 3, every millisecond, set Buck=0, Boost=0 during 1µs to recharge the bootstrap capacitor, then set it back to Buck=1, Boost=1
Mar 25, 2024 12:40
hmmm in fact due to the OR gate it's simpler:
Mar 25, 2024 12:33
3) ADC: When VOUT>desired value, set Buck=0, Boost=0
Mar 25, 2024 12:33
2) ADC: Monitor VOUT and VCC. When VOUT>VCC-0.5V, set Buck=1, Boost=1
Mar 25, 2024 12:31
1) Check VCC is okay, then Buck=1, Boost=0
Mar 25, 2024 12:31
Code for the Attiny should:
Mar 25, 2024 11:56
@Bob
Mar 25, 2024 11:05
File is PCB buck boost 03
Mar 25, 2024 11:04
Well I think it's done, all you have to do is change the connectors for a better fit. I changed the diodes for lower capacitance. There are copper areas at the back for cooling, in case it overheats you can put a squishy thermal pad to the enclosure... make sure to double check everything lol
Mar 24, 2024 12:17
XT60 is rated for 60 amps
Mar 24, 2024 12:16
Note this connector is way oversized for 5Amps, you could use something much smaller if you have problems squeezing it in
Mar 24, 2024 12:15
If you use wire pigtails soldered to the board with a connector on the end you're not married to any specific orientation, it's more flexible
Mar 24, 2024 12:14
right angle connector won't fit unless the end sticks out of the board, then add the mating connector and wire bending radius... that would add about 35-40mm on both sides of the 100mm board, does it fit in the design?
Mar 24, 2024 11:11
Are you sure you want to use the extended part LDO? Also it's running at its max input voltage of 12V. Could use 7805 instead: jlcpcb.com/partdetail/utc_unisonic_tech-78L05G_AB3R/C71136
Mar 24, 2024 10:10
Or you could simply solder wires to the board with the connector on a pigtail, it depends on what's easiest for mechanical design
Mar 24, 2024 10:01
Thanks! Will look into it again tonight. I changed some of the components (0402 resistors to 0805...) I was asking about the right angle connectors because we need to know the length (and footprint) to move the pads a bit to the inside of the PCB, otherwise the connectors will poke out and exceed your 100mm
Mar 23, 2024 23:07
OK I've done most of the placement, to be continued XD
Mar 23, 2024 22:13
Got a LCSC part number for the right angle connector?
Mar 23, 2024 19:47
C8 was wrong polarity, fixed
Mar 23, 2024 19:46
Your battery connector is vertical, are you sure? If you want low height you could use a right angle connector
Mar 23, 2024 19:41
OK I see it. I will create the PCB, 100x35mm. Four layers (it's on special on JLCPCB and it saves a lot of time). So, mechanical stuff goes first. You need mounting holed? Where do you want the connectors?
Mar 23, 2024 18:04
Damn these guys love captchas! Customer number:3389917A Username: bobflux
Mar 23, 2024 17:08
Is there a way for you to share the project?
Mar 23, 2024 17:07
Well I've never used kicad nor easyeda so it makes no difference ;) OK I'll look into it
Mar 23, 2024 17:01
Using kicad?
Mar 23, 2024 17:00
You have to minimize the area of the hot loop
Mar 23, 2024 10:29
If you want me no notice the messages you have to @ me, see you
Mar 22, 2024 23:27
Pre assembled is fine. Your attiny won't be programmable in circuit btw, could be annoying if you have to pull it out of the socket to program it every time!
Mar 22, 2024 22:45
Layout is super important, here's an example ti.com/document-viewer/lit/html/SSZTAE3
Mar 22, 2024 22:45
Pretty low, if you use a bench power supply even if there's a bug and the mosfets are on continuously it will just current limit. Would be a good idea to not solder the large input capacitors for testing. You know how to program an attiny, btw?
Mar 22, 2024 22:18
Alright... there's one 10µF ceramic cap on +5V, should be enough if all the chips are close together, if they are not you can add another. Besides that... layout... then fingers crossed XD
Mar 22, 2024 21:50
Looks good, missing ADC input to measure the 12V source
Mar 22, 2024 20:24
Also it is not really necessary to connect pin "2-A1" of attiny to the comparator. It would be better to use it as an ADC input to measure the 12V source for example, so it can choose between Buck and Boost.
Mar 22, 2024 20:23
Since the chip boots with pullups enabled, it will enable Buck and Boost signals right from the start. I'd add 10k pulldown resistors to Buck and Boost to make sure it does not enable the DC-DC before it actually means to do it.
Mar 22, 2024 20:21
Attiny needs to be able to read voltage on the cap, so one of the pins needs to be connected to VoltageDetector. It has to be one of the ADC pins, since not all pins on this mcu connect to the ADC.
Mar 22, 2024 20:10
R28 and R10 are redundant, they're pulling up the same signal, you only need R10.