Posting this in beginners, because its been a loong time since I studied classic analogue circuits, it might help beginners and students - since it deals with basic transistor stuff - and it's not really a critical problem, more of a curiosity.
A number of years back I designed a crude, but somewhat effective circuit for charging capacitors using a flyback converter - not the TV kind (DIY transformer 1:12), but I did use it for a xenon strobe (250-300V) as well as lower voltage apps. It was based on a 555, using a crude transistor/diode based current limiting, so the on-time was controlled by peak current, but the off time was fixed. This made it a bit better than just a standard 555 circuit with fixed on/off itmes which can't keep track of inductor current, and relies on VCC, L, and the on time of the 555 to set the peak current.
Now, I realise there are thousands of cheap controllers that will do this just very well, but as with all side projects, I wondered if I could still use the 555 as acrude MOSFET driver and SR latch, but improve upon it by making it pseudo resonant. Again, this is hardly practical, but I didn't want it to turn into an x-y problem, its more for my own understanding of what can be done "really cheap" using discretes.
Essentially my idea was, instead of a fixed off-time - we wait for the inductor current in the secondary to fall to 0, or wait for the primary switching node to drop back down to VCC before we turn the switch on again. I'll still be peak current setting the on-time, but the off-time will vary as the output voltage rises, and the secondary current falls quicker.
So this sent me down a rabbit hole of thinking about ways to sense this using discretes - sure an LM393 could work, and will be far better, but what using transistors? Essentially I'll be looking to sense when the switching mode drops from >VCC to VCC, or a current sense on the secondary going from <0V to 0V. My only idea as this point is a PNP current mirror, or an actual comparator, with thresholds set by resistors.
Again, this is more about learning than anything practical (and because I get kind of hooked on certain ideas until I'm satisfied I've thought of enough solutions). Plus this isn't a DC/DC converter designed for a smooth regulated output - it'll charge a cap up to a preset voltage then stop. Only turned back on once the cap voltage drops below a certain amount. And I chose a flyback rather than boost because I may be shorting this output cap out. Doesn't have to be pretty, but it woudl be nice if there some some efficiency and a form of current control so it doesn't draw too much.