Author Topic: <>  (Read 23582 times)

0 Members and 2 Guests are viewing this topic.

Offline debininjaTopic starter

  • Contributor
  • Posts: 41
  • Country: us
<>
« on: May 19, 2017, 04:33:50 pm »
<>
« Last Edit: December 24, 2017, 11:47:11 pm by debininja »
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Several issues:
- your MOSFET drive won't work, and is in my opinion overengineered. The output from the TL494 is open-collector and will never turn on the driver transistors. I'd suggest experimenting with driving the MOSFET directly from the TL494 with a pull-up resistor to turn on the FET. Will give you some losses, but it's much simpler.
- I don't like your Zener solution for the feedback. Use a TL431 instead for active drive to the optocoupler. Lots of examples available in appnotes.
- No need for the snubber over the rectifier if you use a Schottky diode

Those are just first impressions, other issues might be there.
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
You have either intentional error or unintentional errors in your schematic.

1) There is an error the 680R should be connected to VCC (open collector). The IC drive is open collector OR emitter follower, look into what this means.
2) Drain to Source snubber with a 22K resistor?, I think you mean 22R, looks like a schematic error.
3) make the frequency adjustable no mention of the core material used, 100kHz seems very high to start out with, consider using 25KHz and adjust accordingly.
 
The following users thanked this post: debininja

Offline Pitrsek

  • Regular Contributor
  • *
  • Posts: 171
  • Country: cz
You are missing frequency compensation at TL431.
Please read: https://www.onsemi.com/pub/Collateral/TND381-D.PDF as a starting point.
There is a lot info about feedback on Onsemi(search for papers from C.Basso - his books are also top notch) and TI sites
Also FB divider needs to be before output filter

I would loose 494 and would go with something more modern - preferably with current mode control(a little bit easier to stabilize) and quasi resonant operation
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
You are missing frequency compensation at TL431.
Please read: https://www.onsemi.com/pub/Collateral/TND381-D.PDF as a starting point.
There is a lot info about feedback on Onsemi(search for papers from C.Basso - his books are also top notch) and TI sites
Also FB divider needs to be before output filter

I would loose 494 and would go with something more modern - preferably with current mode control(a little bit easier to stabilize) and quasi resonant operation

No matter what is part is used. the questions asked are basic, throwing new parts wont help educating him/her, as old as the TL494 chip is, it can teach a circuit builders many many basic concepts. I do like the idea of using new chips with internal driver + fet but they all go poof when subjected to excessive ringing and poor layout. tips and tricks picked up from being a veteran using a TL494/SG3525  ^-^   
 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Alrighty, I've fixed the schematic and I think I'll be able to make both of you happy with what I've got now.
Revised schematic here:


You have either intentional error or unintentional errors in your schematic.
1) There is an error the 680R should be connected to VCC (open collector). The IC drive is open collector OR emitter follower, look into what this means.
2) Drain to Source snubber with a 22K resistor?, I think you mean 22R, looks like a schematic error.
3) make the frequency adjustable no mention of the core material used, 100kHz seems very high to start out with, consider using 25KHz and adjust accordingly.

1. I think I got it now.
2. I didn't calculate anything for the snubber, so I put down those values. I'll get there though.
3. Done. Easy enough. Core material is an E-18 core with ~0.8mm gap, unknown grade, but it's from an old 2Amp 5V charger. See here: http://ferroxcube.home.pl/prod/assets/e18410.pdf

Several issues:
- your MOSFET drive won't work, and is in my opinion overengineered. The output from the TL494 is open-collector and will never turn on the driver transistors. I'd suggest experimenting with driving the MOSFET directly from the TL494 with a pull-up resistor to turn on the FET. Will give you some losses, but it's much simpler.
- I don't like your Zener solution for the feedback. Use a TL431 instead for active drive to the optocoupler. Lots of examples available in appnotes.
- No need for the snubber over the rectifier if you use a Schottky diode
Those are just first impressions, other issues might be there.

1. I think it's fixed now. Followed @diyaudio's advice. I don't want to drive it passively since I have crappy mosfets with massive input capacitances (~1300pF).
2. Done, put in a TL431. (Strangely enough, there's no TL431 in KiCAD's library. I need to make one and git pull request it).
3. Got rid of the snubber.

I'm feeling good about this! Not even 4 hours and already 2 replies with constructive criticism!

1) There is already a parasitic diode inside the MOSFET, (which is sufficient for this application)  why another external diode? and why loose the RC snubber ? ask yourself these questions  ? study the mosfet model and see paths during switching and why a RC snubber is used. If you need help study this http://www.ti.com/lit/an/slpa010/slpa010.pdf

2) The local buffer drive arrangement you have for this IC is correct (totem pole), its the preferred technique, using it will latch the gate to ground during off period and offer fast turn off and good performance characteristics (just calculate the fet drive current what your have should be enough), you tame the switching behavior for "hard or soft switching" by adjusting the combination of the  gate drive with Rg (gate resistor) + Rb (base resistor) you need to learn how this influences ringing and effect timing characteristics and also effects the selection of the RC snubber to get a decent wave shape. event before dumping the current into the the transformer.

You need a scope and you need to learn how to read waveforms and interpret them.

 
 
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Quote
1) There is already a parasitic diode inside the MOSFET, (which is sufficient for this application)  why another external diode? and why loose the RC snubber ?

What are you talking about? The diode discussed is the output rectifier with (unnecessary) snubber. You are going on about the MOSFET.

 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Your gate driver will still not work. You've found a way to turn it on, but turn-off will be extremely slow.

I still strongly suggest you drive the MOSFET directly from the TL494: C to VCC, E to gate, 680 ohms (or lower, check with 'scope) from gate to ground.

A comment on the TL494 (which I've worked with many times): it's a very good device to learn about switching regulators on, but for a practical design, I'd not go higher than 40...50 kHz.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Your gate driver will still not work. You've found a way to turn it on, but turn-off will be extremely slow.

It works great, actually. The totem pole takes care of everything. I will link waveform outputs soon, it's somewhere on my G+.

I'll wait half a day more to see if anyone else has any further suggestions or improvements before I start assembling it on PCB.

Well, then magic's in play, or your schematic does not represent the actual circuit. Q2 has practically no base drive (except for 100k), so I wonder how that plays out.
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Your gate driver will still not work. You've found a way to turn it on, but turn-off will be extremely slow.

It works great, actually. The totem pole takes care of everything. I will link waveform outputs soon, it's somewhere on my G+.

I'll wait half a day more to see if anyone else has any further suggestions or improvements before I start assembling it on PCB.

Well, then magic's in play, or your schematic does not represent the actual circuit. Q2 has practically no base drive (except for 100k), so I wonder how that plays out.

You are confusing yourself. of course there is base drive. see attachment.

I would recommend using it in open collector mode instead, with a 220R instead of a 680R.
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Your gate driver will still not work. You've found a way to turn it on, but turn-off will be extremely slow.

It works great, actually. The totem pole takes care of everything. I will link waveform outputs soon, it's somewhere on my G+.
...

The output transistor inside the '494 can only source current the way you have it wired up to your push-pull driver, which will turn on Q1 quite quickly, yes, but turn-off of Q1 and turn on of Q2 will take place very slowly because you are using a 100k resistor to sink charge out of the bases.

Attached are the LTSpice simulation results (and the LTSpice file, for those interested) showing how just a minor change in the location and value of the base pulldown resistor dramatically improves switching performance.



 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
I would recommend using it in open collector mode instead, with a 220R instead of a 680R.


(P.S. What's the difference between connecting the base resistor to the collector vs what I have there? It would function like a Darlington pair. I have a habit, maybe unnecessary, of trying to put base resistors wherever possible, so that's why I put that 680Ohm resistor at the totem pole bases).



Here is the difference between them. (read the datasheet)  :horse:

As you can see the signals are inverted. 
 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Your gate driver will still not work. You've found a way to turn it on, but turn-off will be extremely slow.

It works great, actually. The totem pole takes care of everything. I will link waveform outputs soon, it's somewhere on my G+.
...

The output transistor inside the '494 can only source current the way you have it wired up to your push-pull driver, which will turn on Q1 quite quickly, yes, but turn-off of Q1 and turn on of Q2 will take place very slowly because you are using a 100k resistor to sink charge out of the bases.

Attached are the LTSpice simulation results (and the LTSpice file, for those interested) showing how just a minor change in the location and value of the base pulldown resistor dramatically improves switching performance.

Careful with this simulation, it may look like attractive to have fast switching edges (ideal example), but. when current flows through the MOSFET the rules of physics dominate. all the parasitic, LD LS inductance will not yield the same results as shown in the simulation, in fact as an experiment remove the 680R base resistor and place a 10k POT in series now see the effects of the hard switching saturation vs soft switching and observe waveform shape on the scope as you adjust the bias..

I actually have setup similar to what I proposed above and the effects are pretty neat.     
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
1. No current limiting.  Good luck if someone shorts the output...
2. Opto should come from VREF, not VCC.  It's a control range thing: it doesn't need to pull up any higher than it needs to, and pulling up and down symmetrically is the most reasonable choice.
3. TL494 needs to be wired as a voltage follower: unity gain at the error amp.  Remove R11 and R12, set R10 --> low ohms (or short).  The TL431 is in control.
4. Also good luck if someone cranks RV1 down to 10kHz when the transformer is dimensioned for 100kHz...
5. You can drop R2 and Q1, and move D1 across Q2 so the TL494 emitter does pull-up drive.  It's good for 200mA.
6. Rsnub1 might be a bit large, and Csnub1 also.  They'll certainly be less efficient than a clamp snubber (run a R || D + C from drain to GND).  Here's a similar application:



This was probably a higher speed, and higher current, application than yours, so adjust values accordingly.

The big unknown is the transformer.  You'll need the small signal parameters on that (N1/N2, Lp, LL, DCR, Cp), or a winding diagram.

7. C5 and C7 are surely going to need to be bigger.  A couple 2200uF in parallel should be reasonable.
8. The TL431 voltage error amp looks good.  R15 and C4 values are YMMV.  Select them for best transient load response.

It's an okay starting point, but when the UC3843 costs the same and is better in all respects... why not use it? ;) (Or better still, any of the modern SMPS controllers, or regulators, that cost only a little more, but save massively on capacitor and magnetics cost.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Ohh dammit, that explains the slow turnoff. I thought the TL494 output reached ground after each pulse, but that's not the case...

If you'd like that version, BTW, check out TL598.

It's also suitable to drive GDTs (gate drive transformers), though you need to add reverse clamping schottky diodes.  The output waveform looks like this, https://www.seventransistorlabs.com/Images/GateDrive1.jpg

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Online Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Quote
You are confusing yourself. of course there is base drive. see attachment.

I would recommend using it in open collector mode instead, with a 220R instead of a 680R.

I'm not confusing anything, when the output transistor of the TL494 turns off, it's basically open-circuit except for the 100k resistor.

Your second suggestion is really bad. First, because it inverts the output logic. Second, because it means the MOSFET will turn on during power-up, before the TL494 is ready to do anything.
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Quote
You are confusing yourself. of course there is base drive. see attachment.

I would recommend using it in open collector mode instead, with a 220R instead of a 680R.

I'm not confusing anything, when the output transistor of the TL494 turns off, it's basically open-circuit except for the 100k resistor.

Your second suggestion is really bad. First, because it inverts the output logic. Second, because it means the MOSFET will turn on during power-up, before the TL494 is ready to do anything.

I suggested open collector because I just discovered that their is a difference between the two configuration not only by nature of their analog configuration i.e emitter follower vs common emitter which I attached as per the datasheet but also how duty cycle behaves, using my configuration on my desk
I can only get a only get a minimum duty cycle of 10% (min) up to 100% (max), but in emitter follower mode(like he has), I can get 0%(min) to 80% (max) the datasheet doesn't disclose this behavior for single ended operation.     
 
« Last Edit: May 21, 2017, 08:33:47 am by diyaudio »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Perfect. Also regarding your suggestions: I understood about half of what you said, but it's no problem, I'll learn gradually.
Confession time: until last year, the most I ever did with transistors or mosfets was blink LEDs :palm:

My goal over the summer break (electrical engineering first year student here) is to get a basic, regulated, isolated stepdown FBT working.
I can settle with a few shortcomings or inadequacies if it helps me to learn, in person, through these nooby experiments and (sometimes) magic smoke.

Great!

Attack it from all sides.  Practical: breadboard a circuit.  See how it works.  Discover its drawbacks.  Improve it.

Analytical: what is a switcher?

Hint: you're putting current into an inductor.  Control that first!  This is why current mode controllers are the only kind that matter. ;)

What is a snubber?

Hint: as the transistors and diodes turn on and off, you get various combinations of RLC components carrying switching voltage or current.  As the switches change state, the continuity condition is that a voltage or current, that had been carried by one device, now gets handled by another.

For example, at the instant the transistor turns off, inductor current is carried by its output capacitance Coss, in parallel with the R+C snubber.  A moment later, the voltage has risen, and current gets diverted to the output diode instead.  Which in turn causes ringing on the primary side (because of where the voltages and currents were), and so on.

Control loops: understand what an error amplifier is, and the basic blocks (error amp, "plant", feedback, compensation).  Understanding poles and zeroes and stability analysis may be a little much (it's a 3rd or 4th year subject), but at least knowing about those representations will give you a huge kickstart.

None of these subjects are insurmountable.  The whole may seem intimidating, but it's easily broken down into little pieces.  And once you understand those pieces, you gain the whole picture. :)

Quote
Soo...going back to your suggestions now.
1. Current limiting can be added later on. I'm not going to overly stress this thing and there is no one who wants to make my FBT explode (I hope).

If you don't want to make it explode, I don't want to talk to you anymore.  >:D :-BROKE :popcorn:

(It is, of course, the loftiest goal of the engineer, to make things that the average schmuck cannot explode.  Yes, try as might, they always find a way -- but it's a matter of degree.  They have to want it dead! ;D )

Quote
2. I was worried about the opto loading down the 5V reference, though with a 100k resistor, I guess the current is low enough to not be a problem.

It's capable of 10mA or so.  Not a problem.

Should also aim for a couple mA on the opto -- the TL431 needs at least 1mA*, and you've got up to ~20mA of headroom (at opto ratings).  Less than 1mA quiescent will make it awfully slow (the opto has a lot of capacitance), which can be a problem.

*That's what R13 is for, by the way. :)

Quote
3. Doing a quick search I learned that a unity gain configuration op-amp "... makes a copy - at the output - of the the input voltage, Vin..." Could you please explain what purpose R10 and C9 serves? I got them off the design notes for a 400Watt PSU by OnSemi.

It was probably a design for local regulation (no opto).  Typical application has the TL494 on the secondary side, so it senses output voltage directly.  (Gate drive signals are then coupled to the primary side with a transformer.)

R10 is an aberration -- it reduces error amp gain, which means the DC output voltage won't be perfectly stable, but will vary with load.

Reducing gain was a common technique to improve phase margin, a big problem for voltage-mode controllers like this.  But that's handily solved by using current-mode control -- another point for the superior method. ;)

But yeah, you don't want the TL494 error amp(s) being error amps -- that squares the loop gain, making it impossible to stabilize.  (The TL494 would be attempting to control its output, so as to regulate the opto's output at 2.50V.  Simultaneously, the TL431 is trying to control the TL494 so as to regulate 5.0V DC output.  Who wins?)

Quote
4. First my FBT explodes from being shorted, and then I find a madman who enjoys turning potentiometers for fun? When will this series of unfortunate events end! :-DD

Na, FBT's fine -- it's made of wire and iron [oxides].  You can short that sucker for seconds at a time.

Poor little Q3 will expire in a few hundred microseconds:bullshit:

You can put a fuse in the supply, but keep in mind, those blow in milliseconds.  So Q3 is dead a hundred times over and then the fuse blows...  :=\

Except for very few situations (that are engineered accordingly!), fuses are only ever for fire protection -- when Q3 dies shorted, you don't want it taking out all your wiring and stuff.  It's a good idea, even for prototyping... especially for prototyping?  But kind of annoying, so an active current limiting circuit is a bit more handy.

(There are also self-resetting fuses, which work fine at this voltage and current level.)

Quote
5. Fair point. But what if the peak current needed by the mosfet during the switching period happens to exceed that? I'd need the totem-pole driver then, right?

2N3904 is only 200mA, too. :P

You can push them harder than that, but it's ugly.  In this circuit, as shown, if the gate were quasi-shorted*, it would probably deliver around 500mA (200 from the TL494, 300 from the 2N3904 -- yes, driving it so hard, hFE = 1 or 2!).

*You wouldn't want to test with an actual short circuit, but a heavy load, like 0.1uF (and no 4.7 ohm R4), would rise slow enough that you can see how much current it's dumping in the process.  (Some gate driver ICs use this test method!)

But IRF540 isn't a big deal, and 200mA will be more than enough.

Indeed, the TL494 output risetime is a whopping 200ns or so.  If IRF540 were 20nC gate charge (at 10V, that comes out to 2nF equivalent average Ciss), it would only draw 100mA during the rising edge.

Fundamental capacitor equation: I = C * dV/dt
Inductor: V = L * dI/dt

Both of these apply very usefully in switching circuits, because the waveforms can all be diagrammed as square waves and trapezoids. :)

Quote
7. I think those values should be just fine. At 100kHz, the ripple should be very little even with those caps. I'm not drawing more than 1Amp @ 5V.

How do you figure? :)

Hello, Ladies and Gentlemen, and welcome to another episode of When is a Component Not a Component?  Today, courtesy of out poster above, we have the:
Electrolytic Capacitor!
 :clap: :clap:

 ::) Okay, anyway... so, where is it true that a capacitor is a pure capacitance?
. . .
In the SPICE simulator and nowhere else.

A real component is always a complex mixture of R, L and C.  How complex?...How close do you need to look?  This is an approximation thing.  Normally, you'll only bother with three series components: the capacitance, resistance (ESR), and inductance (ESL).

Since no real component is ideal, we simply call them what they are, when they show that characteristic over a useful frequency range.  Resistors are resistive from DC to ~MHz (wirewound) to ~GHz (film), so they're quite practical resistances.  Film and ceramic capacitors are capacitive from very low frequencies (~mHz) to high frequencies (MHz to GHz).  Inductors, well, they come in so many kinds, but the point is they're still usefully inductive over some range as well.

So what's the dirty little secret about electrolytics?  They have relatively high ESR.

You would hope for 100uF to be 16mohm at 100kHz, but in reality, you'll probably get ESR around 0.3 ohm in series with that.  This is not a frequency where an electrolytic capacitor capacitates!  (At lower frequencies, where Xc > ESR, it does look capacitive.  Electrolytics are good in the mHz to maybe 10kHz range: it's not a very wide range, which shows they're not very good capacitors.  We put up with them because they're big and cheap. :) )

And even then, 0.3 ohm, that's pretty good, that's 0.3V at 1A, right?  Well...

Keep in mind, if this will be a DCM (discontinuous conduction mode -- the inductor current rings down to zero before the switch turns on again) circuit, then the most output duty cycle you can have is 50% (for an optimal transformer ratio), and that means, half the time, D2 is delivering zero current.  So the average current during conduction is double, or 2A.  And the inductor current is a ramp, so it has to start at 4A and discharge to zero during that time!  So your actual peak current is quadruple the output average.

(This is why flyback converters aren't very common above about 100W, by the way.  It just takes so many electrolytics to filter all that ripple, that it's worthwhile using a more complicated circuit, usually a full wave forward converter.)

If you're in CCM (continuous conduction mode), the best you can possibly do is 2A peak, but in reality it'll be somewhere inbetween, because the inductor current starts at, say, 3A (when switch turns off and diode turns on), then discharges to 1A (when switch turns on again, yanking the diode off).  The amount of inductor current ripple is set by operating frequency and transformer inductance.

So for the worst-case situation, 4A peak, you'd have around 1.2Vpp ripple.  Yeah, you've got an LC filter on there that can quiet that down nicely, but, that poor C5 will have to bear 1.5Arms of ripple current, whereas I don't think you'll find one that size that's rated for much over 100mA.  It'll get toasty! ;D

1000uF and 2200uF caps are plentiful though, with ESR under 0.1 ohm and ripple current ratings around 1-2A.  Excellently suitable here. :)

Quote
8. Praise be to Nikola Tesla, I finally got something right! I imagine it'll be hard to find the transient load response.

Nope!  Just set up, guess what, another switching circuit! ;D  This is so simple, I'd even recommend a 555 for the job: you need an audio frequency square wave (low kHz or below), and a MOSFET that switches a resistor load.

Normally, you'll have an idle load as well, so one load resistor connected at all times, and another switched by transistor.  This way, the SMPS is always running, it's just running at, say, half and full throttle, alternately.

While that's tugging away on the output, watch the output voltage with the scope.  (You may want to select AC input coupling, so you can zoom in closer on the change.)  You'll see it dip and stabilize, and overshoot and stabilize, with each edge.

Or maybe it doesn't stabilize, but then you'll know... :-DD

You should pretty easily get a feel for what different values of R15 and C4 do.  You should find that, as you increase R15, you generally get more phase margin, so that C4 can be smaller: your loop is responding faster!  As you adjust the values, you'll find a region where R15 is "about right", and C4 can't be made any smaller without making the output really lumpy.  This is about where you want to be.  For a safety factor, you can slow it down a bit by doubling C4, more or less, which will account for things you didn't test for initially -- reactive loads, capacitive loads, that sort of thing.

Too slow of a control loop means you need much bigger filter caps than otherwise, and that the output voltage changes an awful lot in response to load changes.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Online Benta

  • Super Contributor
  • ***
  • Posts: 5869
  • Country: de
Quote
I suggested open collector because I just discovered that their is a difference between the two configuration not only by nature of their analog configuration i.e emitter follower vs common emitter which I attached as per the datasheet but also how duty cycle behaves, using my configuration on my desk
I can only get a only get a minimum duty cycle of 10% (min) up to 100% (max), but in emitter follower mode(like he has), I can get 0%(min) to 80% (max) the datasheet doesn't disclose this behavior for single ended operation. 

The best idea would be to limit postings to something you have knowledge of.
On the TL494 you're obviously clueless.

I apologise for being rough, but this kind of noise helps nobody.


 
« Last Edit: May 21, 2017, 06:52:44 pm by Benta »
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Quote
I suggested open collector because I just discovered that their is a difference between the two configuration not only by nature of their analog configuration i.e emitter follower vs common emitter which I attached as per the datasheet but also how duty cycle behaves, using my configuration on my desk
I can only get a only get a minimum duty cycle of 10% (min) up to 100% (max), but in emitter follower mode(like he has), I can get 0%(min) to 80% (max) the datasheet doesn't disclose this behavior for single ended operation. 

The best idea would be to limit postings to something you have knowledge of.
On the TL494 you're obviously clueless.

I apologise for being rough, but this kind of noise helps nobody.

Whats your problem?, don't apologize then badger people,  you clearly looking for trouble, please piss off. I have enough knowledge using the chip (i don't claim to be an expert) but you forcefully claim be one.. the fact that you didn't know a totem pole driver is the suggested drive circuit is concerning, very. :palm:
   
Don't talk to me like I need your approval, you far from fit being a judge, you been clearly seeking attention since this post was created. whats wrong with you? this is a fair forum take your attention seeking manners somewhere else.
   
« Last Edit: May 21, 2017, 07:51:02 pm by diyaudio »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Oops, cut the link between pin 3 and 13, otherwise that covers most of it.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Huh, check U2 footprint...

No ground plane, but it's so slow, it's probably fine.  If nothing else, you'll get to see how bad it can be without. :P

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
How exactly do you have a closed-loop power supply operating into a lightbulb?

SMPS is not something you develop without a scope on at all times.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Oh, it's hard wired for adjustable PWM, it's not the rest of the circuit?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Status updates:

1. The PCB is under construction. I'm gonna take like a week to solder everything I think. If I solder for 30 minutes a day.

2. I have some data from my FBT build. First, here are the equations I used for finding turns ratios for primary and secondary, peak current, etc etc. Please let me know if they look alright. TL;DR: found primary turns had to be 7 and secondary had to be 4, peak current would be 4Amps. I'm using a crappy 600V mosfet with 0.75Ohm Rdson (see here for datasheet: http://uk.rs-online.com/webdocs/0849/0900766b80849782.pdf ). Picture of my work here:


Ipk = (2*Powerout)/(eff.*Vin*Dutymax)
PrimaryInductance = (Vin*Dutymax)/(Ipk*freq)
Inductance = AL*(Turns^2)
PrimaryTurns = sqrt(PrimaryInductance / AL)
SecondaryTurns = PrimaryTurns*(Vout+VdropDiode) / Vflyback

Givens for the transformer core, from spec sheet:
E16/8/5 (so 1.6cm by 0.8cm by 0.5cm)
Minimum cross sectional area Ae of 19.4 square mm
AL value 212nH (I rounded down to 200 to be safe)
Effective permeability 315 (not sure if this matters in the equations)

3. After hooking up my basic TL494 driver into a test setup (see link:
), input voltage of 12.25V, I sort of eyeballed the bulb to be at 5V based on the brightness, so I guess that's good news--seems like my calculations were correct? It's a 6V 0.62A bulb (so 3.72Watt) hooked up to the secondary (no rectification or anything, just directly hooked up to secondary). I imagine it will be much brighter with rectification and a capacitor. The mosfet strapped onto the heatsink gets to 63C measured with my IR thermometer, a bit too toasty in my opinion. Might be because I'm using a 0.75Ohm mosfet, and the peak power dissipation would be I^2*R, so 16Amps*0.75, that's 12Watts...

Also, I burnt out a 33Ohm snubber resistor. Afterwards, I hooked up a 33kOhm snubber resistor (which does get hot, but not enough to burn itself out), hooked up my scope probe (10x attenuation) to the drain and source, and found the DS voltage is around 150Volts! I don't know if that's normal or not. In that case, I cannot use the snubber and capacitor values I used in my schematic. Does anyone know if it's possible to lower this large flyback voltage? Maybe my alligator clips method is adding too much stray inductance and that might be throwing large spikes on the DS?

1) Those "stranded wires" (from Ebay) is not going to help you, consider using solid core wire to carry signals and keep them short, those wires are prone to cause all kinds of issues its not worth it.

2) A MOSFET will naturally resonate as a switch (and enforces good layout) , I would highly recommend you rethink your geometry and layout, keep high current paths short, use thicker short wire and use a matrix prototype board for the power MOSFET, tin the high current paths with solder, I cannot stress how important this is.

3) I would recommend you rethink your switching frequency, 100KHz switching frequency is tough to tame with wires dangling around, this introduces all forms unwanted resonance in the switching spectrum, consider using a moderate 30KHz and work your way up (slow) which will save you all kinds of menace, your RC snubber is highly lossy you need to calculate the values "after you reconsidered your layout" see attachment I have a tiny RC snubber with very low loss, but that's cause the layout imposes how much snubbing is required.

I have attached an image of something I was building a few days ago using the same controller as you, my prototype is able to adjust the PWM drive from (0% to 90%) FREQ (10KHz to 250KHz) and drive the power FET using a inductive load, however even at 100KHz it puts a demand on the layout as a result of the wires and geometry. Also note I used a SMD cap and resistor right at the leads between the Drain and Source to combat resonance at approx 100MHz. You can see a nicely a burned carbon resistor of 100R used to reset the inductor energy.

(Not clearly shown is a BD139/140 totem pole driver with adjustable current drive to further tame the drive via a multi turn pot)
 
The recommendation is to use your oscilloscope to death. you seem to have a handle with mathematics which is good but layout will throw all your calculations out :)
« Last Edit: May 26, 2017, 09:12:02 am by diyaudio »
 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
 :) Good progress. Your waveform looks good. try to take a waveform snapshots of the mosfet Vgs, Vds.
« Last Edit: May 30, 2017, 12:33:37 pm by diyaudio »
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
You need to check if the ferrite will saturate.

Peak flux density Bmax = V*dt / Ae
dt is maximum switch on-time (for DCM), V is applied voltage, and Ae is the effective cross sectional area (core datasheet).

For CCM, the total V*dt is integrated over many cycles, so it's easier to reference it by peak current.  (Current works equally well for DCM, too.)  In that case, the expected flux is:
Phi_max = L * Ipk = V * dt

Note that H has units of Vs/A, i.e., inductance converts flux (applied volts * time) to the current flowing through the inductor, or vice versa.  It's Ohm's law, time-dependent.  (As well it should be, because a linear inductor is linear in the same way a resistor is.)

Ferrites saturate in the > 0.2T range, with the most common MnZn types going up to 0.4T or so.  They get hot when operated at this flux density, cyclically, though.  It may be more practical to choose 0.1-0.2T for a core of this size, at this frequency.

This also allows you to calculate the gap.

The minimum gap, and therefore the minimum number of turns as well, is given by:
N = V * dt / (Bmax * Ae)
Bmax is whatever peak flux density you choose.
Alternately, V * dt = V / (2 * F) for a 50% duty cycle unipolar circuit (like this flyback), or change the 2 to 4 for a bipolar circuit (e.g., the typical half bridge forward converter), or to 4.44 for a sine wave of Vrms.

Flux is determined completely independently* of inductance.  Inductance is determined by the ratio of Ae to l_e and the core properties.

L = A_L * N^2
A_L = mu_r * mu_0 * Ae / l_e

*To the first order.  Second order effects, like fringing flux and leakage, have a small effect (~10%), so "complete" isn't very complete at all.  But those effects are additive, so the results from this assumption are conservative.

We can now take this in two directions: when we introduce an air gap, we can say we're reducing the effective permeability.  This holds l_e constant, and varies mu_r.  In that case,
mu_eff = l_e / (l_g + l_e / mu_r)
And we use this value for mu_r in the usual A_L formula.

Alternately, we can say the effective length is all air gap, in which case mu_r = 1 (because we're taking air equivalent), and the core's contribution is l_e / mu_r.  (In effect, the fact that the core has high permeability, means its length is short-circuited by the same factor.  This is why cores are so helpful!)  This way, we get:
A_L = mu_0 * Ae / (l_g + l_e / mu_r)

One final alternative, that's somewhat separate from these: we can calculate the amount of air gap we need, in the first place.  Air gap stores energy, and the energy density in that gap is given by:
e = Bmax^2 / (2*mu_0)
The cross section of the gap is Ae (usually slightly more, for the same exception above*), and the thickness is the gap (or, the gap plus the core's effective air gap length l_e / mu_r, since we now know about that).  The energy in an inductor is 0.5 * Ipk^2 * L.  Smooshing all these together allows us to solve for the required gap, without knowing anything more about magnetism and cores.


I would strongly suggest avoiding electrical tape (the vinyl stuff), because it's squishy and melty.  Polyester and polyimide tapes and films are fine, or you can use paper in a pinch, if you don't mind that it's not exactly UL94V-0 self extinguishing. ;)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Waveforms look pretty good to me, especially for being on a veroboard. I annotated one of the scope shots:

 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Waveforms look pretty good to me, especially for being on a veroboard. I annotated one of the scope shots:

I don't agree with your annotation on the Vgs waveform.

That's not typical for a Vgs signal. He's waveform needs to have the typical miller charge characteristics, with minimal overshot (with correct snubbing in place) see attached example for Vgs (Voltage Drain to Source) notice in the example the typical steps during the different miller charge for turn on and turn off times. You need to learn how to tame your waveform, you might also have to look at Soft Switching vs Hard Switching. (fast turn on interval is NOT important for this project) You also need to use a different ground clip when probing Vgs signals, loose that clamp clip and use a solid wire to ground for probing. Dave has done a video on this subject already.

You are still using thin Ebay wire to supply power to the breadboard and then to the mosfet board, that is probably one of reasons why you have such a large stray inductance, also your transformer has leakage inductance causing the ringing, you still need to inspect and measure this and work on your transformer winding, measure and snub where it applies.   
« Last Edit: June 01, 2017, 11:07:56 am by diyaudio »
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
I don't agree with your annotation on the Vgs waveform.

Yabbut he didn't annotate Vgs? ??? :P


Quote
That's not typical for a Vgs signal. He's waveform needs to have the typical miller charge characteristics, with minimal overshot (with correct snubbing in place) see attached example for Vgs (Voltage Drain to Source) notice in the example the typical steps during the different miller charge for turn on and turn off times. You need to learn how to tame your waveform, you might also have to look at Soft Switching vs Hard Switching. (fast turn on interval is NOT important for this project) You also need to use a different ground clip when probing Vgs signals, loose that clamp clip and use a solid wire to ground for probing. Dave has done a video on this subject already.



The Miller step is visible on the rising edge.  At this scale, it shows as merely a brightening of the beam, but that's one plus of analog scopes (or sufficiently accurate and oversampled DPOs).  The falling edge step kind of gets lost in the ringing junk, and may be fairly weak due to the nature of the driver circuit.  Later (during the free induction ringdown), the baseline ringing is due to Cgd and unclamped Vgs.  The driver has a +/- 0.7V deadband, which is fine.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Waveforms look pretty good to me, especially for being on a veroboard. I annotated one of the scope shots:

I don't agree with your annotation on the Vgs waveform.

Probably because I was commenting about the Vds waveform...  ;D

 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Waveforms look pretty good to me, especially for being on a veroboard. I annotated one of the scope shots:

I don't agree with your annotation on the Vgs waveform.

Probably because I was commenting about the Vds waveform...  ;D
:palm: sorry. hahaha
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Hey Tim, so I've been trying to understand your previous post and have a lot of questions, but I'd like to get through it one question at a time.

"You need to check if the ferrite will saturate.


IMHO

The best way to uncover the mystery's of known OR unknown magnetic specifications for SMPS  (and you don't have to build this now) is build a saturation test rig with variable Frequency and Duty Cycle adjustment, that's what I showed a few posts ago.I'm able test and verify core saturation levels with optimal frequency (for any material SMPS Transformer OR Inductor) and trace the numbers back to the datasheet (if its available), this is my preferred technique, I've have had good success thus far and tested custom wound transformers on a ETD49 EPCOS core and commercial grade magnetic components with supplied datasheet figures and the numbers are always spot on. Using brute force esoteric math calculations is cumbersome.

« Last Edit: June 01, 2017, 08:13:46 pm by diyaudio »
 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Diyaudio, I should really do that because this is getting quite tiring.
I've been at it continuously for 4 hours a day (and it's a good thing I'm on vacation now), working on the FBT calculations and researching the net, to very little gain... |O

Does your test rig look something like this? (but replaced with the TL494 of course, and with both variable frequency and duty cycle):


If you have a schematic for your test rig, I would appreciate if you uploaded it here.

I don't actually have one for good reason (cause its dead simple to make) using a TL494 replace the oscillator section with a pot for variable frequency adjust and apply a voltage from 0 ~ 3.3V to the DT PIN for duty cycle adjustment now you have variable frequency and dead time adjust, use a power fet I used a (50n06 I had 10 laying around) and a non inductive resistor in series with the drain to obtain and sample the current ramp. There are so many variants of this circuit using a TL494 is over kill, you can even use a one 555 timer as shown here.
https://hackaday.com/2013/10/28/making-a-power-inductor-checker/

     
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
You've seen half a dozen different formulas, but realize they're all different rearrangements of the same fundamental equations.

All of which go entirely by definition, so dimensional analysis is 100% accurate here! :D

So, flux density?  That's density by area, so, flux per area.  In mks units, use V.s / m^2 == T.  Or replace m --> mm and s --> us, which is more handy for SMPS.  (This also uses MHz, uF and uH.)

There's a run-down of basic definitions here:
https://www.seventransistorlabs.com/tmoranwms/Elec_Magnetics.html

Saturation flux density is in the datasheet.  It's a bulk material property, so if it's not in the core datasheet, check the material datasheet (e.g. 3C90).  The flux density values they give in the inline table is kind of a recommended operating point: they specify the power dissipation under that condition, which as you can see, is pretty modest (under a watt).  A core that size would be sweating at 1W, so you'd want to use less power than, whatever Bmax gives 1W... (to figure that out, check the material datasheet for core loss vs. flux density).  The values they give are usually somewhat conservative, so you can run, say, 200mT at 100kHz without much worry.

Or you can always run at lower Bmax, as long as you don't mind needing the extra turns, and reap the rewards of lower losses. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
There are many different approaches to designing a flyback converter depending on whether you are using an off-the-shelf transformer, a random core from the junk pile that looks about right, or a known core purchased from a reliable distributor. For the beginner in SMPS design the 2nd option is the worst because of too many unknowns.

The first thing to keep in mind about the flyback transformer is that it is really a multi-winding coupled inductor, and not a true transformer per se (but everyone calls it a transformer anyway, including me). This is because current is only flowing in either the primary or the secondary at any given time, never both, so each winding acts like an inductor. The second important point is that ALL of the energy delivered to the output has to be stored in the flyback transformer first. The third point is that the windings are all linked together by conservation of amp*turns (AT or A*T)and so the primary acts like a current sink (storing energy in its inductance) while the secondary acts like a current source. The upshot of this is that the relative voltages across each winding will be fixed by the turns ratio - as in a true transformer - but the absolute voltages are not fixed, just as is expected of a current source.

For example, if current ramps up from 0A to 10A in a 10t primary while the switch is on, then the current exiting the secondary immediately upon switch turn off will ramp down from a level of (10A * 10t)/Nsec. If the secondary is 1t then the current will attempt to ramp down from 100A; if the secondary is 20t then current will ramp down from 5A, etc. Of course, for current to flow in the secondary there needs to be a load across it, and it is the load resistance which sets the output voltage! So if the secondary winding has 10t - same as the primary - and we put a 1R resistor across it then the peak secondary voltage will be 10V. How about a 100R resistor? Well, to get 10A to flow through 100R you need 1kV... Hence one of the reasons why the flyback is so popular for high output voltage applications. It's also why you never want to run a flyback unloaded if the controller IC can't do pulse-skipping or otherwise shutdown the switch drive signal if the output voltage rises too high.

There Ain't No Such Thing As A Free Lunch, however, and in this case the voltage across the secondary when its diode is conducting is reflected back across the primary through the turns ratio, and this reflected voltage, plus the input voltage, is what the switch must withstand when it is off. Similarly, when the switch is on the voltage across the primary is reflected across the secondary through the turns ratio and adds to the voltage the secondary diode must withstand (on top of the output voltage). Hence why I said the relative voltages across each winding are always enforced through the turns-ratio, even if the absolute voltage transformation ratio is not fixed.

All this means that we use the inductor equations to design the primary of the flyback transformer, and then select an appropriate turns ratio to trade off peak currents and voltages in both the primary switch and the secondary diode. If we use a step-down ratio then we reduce peak primary current (when the switch is on) but increase peak primary voltage (when the switch is off off), and vice versa for the secondary diode.

The relevant equations for an inductor are:

E in Joules = 0.5LI² (where E is in uJ if L is in uH and I is in amps)
L * dI = V * dt (where L is uH if dt is in us and dI is in amps)

However, the wide range of flexibility in duty cycle, frequency, turns ratio and even inductance in a flyback can make it somewhat maddening to design, so the best approach to take will depend on initial limiting conditions. For example, if you are using a salvaged core that you don't have full specifications on - and especially if you are manually introducing an air gap - then you might need to make frequency a dependent variable to achieve the necessary power throughput (a word of advice: your life will be much easier if you use pre-gapped core sets from DigiKey, Mouser, etc.).

Duty ratio is also a bit of a wild card in that the maximum allowed by the controller IC (e.g. - the TL494 is 45% per output) is not necessarily the limit when a flyback is in DCM. For example, duty Cycle in a transformer isolated flyback with a Npri:Nsec turns ratio specified by n is:

D = (n * Vout) / ((n * Vout) + Vin)

So if the transformer has a 2:1 step down ratio (ie, n = 2) and Vin[min] is 10V then the calculated duty cycle is 0.50, which means the switch on time and diode on time will be equal. In discontinuous conduction mode (DCM), however, all of the windings go to 0A for some portion of each switching period, so it would be perfectly reasonable for switch on time to be, say, 7us and diode on time to also be 7us, but total period at 50kHz is 20us, so that means for 6us each switching period all of the windings have stopped conducting (but then you get the infamous DCM ringing, as I pointed out previously). The way you ensure DCM is by *lowering* the primary inductance (which also causes peak current to rise).

Use the website below to play around with turns ratio, frequency, inductance, etc., in a flyback:

http://schmidt-walter-schaltnetzteile.de/smps_e/spw_smps_e.html

Just ensure that Ton doesn't exceed 9us at Vin[min] and 50kHz fsw, of course.

Faraday's equation - the one you have found in a wide variety of formats - is only needed to check that the flux swing isn't too wide, leading either to saturation (which is disastrous) or just excessive core loss (which in most ferrites is proportional to around the 2.5 power of total flux swing).

Finally, there are pre-gapped ferrite cores available commercially which are usually specified by AL in nH/t², and this usually assumes the use of one unground half and one ground half. Needless to say, pre-gapped cores are going to be a lot more predictable and consistent than attempting to insert spaces between ungapped cores you salvage. Also beware that magnetic amplifiers are commonly used in ATX power supplies to derive lower voltage rails without requiring another winding on the transformer and the cores that are used in this application are extremely unsuitable for use as flyback transformers (or regular chokes).

EDIT: Changed N -> n in formula above
« Last Edit: June 12, 2017, 08:27:20 pm by MagicSmoker »
 
The following users thanked this post: diyaudio, debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
To myself: "You're going to be disappointed with that windup..."

Then I read "60V peaks".

Well, yeah.

Better?  Well, there's that at least. :P

As long as you're going to use doubled up wire, you can do it in single layers each.  One layer of primary, tape, one layer of secondary, tape, primary, tape, secondary.  Connecting layers in parallel reduces the impedance further.

As shown, impedance is probably something like 200 ohms, but system impedance is around 5 ohms.  The huge mismatch manifests as leakage inductance, hence the peak.  Basically, the leakage is (200/5) times worse than it needs to be.

What does the current waveform look like?

Is the winding phase correct?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: jbb, debininja

Online jbb

  • Super Contributor
  • ***
  • Posts: 1136
  • Country: nz
As T3sl4co1l said - leakage inductance is responsible for those big spikes.

Leakage inductance is very dependent on winding geometry, which is why an interleaved winding can help.

Here's my suggestions:
  • In many ways an ideal winding exactly fills the width of the bobbin in one layer. This gives a nice flat surface to wind the next layer on and also reduces intra-winding capacitance.
  • A layer of mylar tape between layers makes it much easier to keep the next one flat.
  • Where leakage inductance is critical, interleave the windings (see below).
  • Note windings often take a little more space than you expect.  This can be due to things like the copper distorting as you bend it over a 90 degree angle.
  • You'll see things written about fill factor.  Some handbook will tell you that 0.7 is possible.  I suggest you don't try to go higher than 0.5 without some practice.
  • Make 'em look all pretty and nice. Scrappy windings can have unpredictable parameters or other problems.

For 2A RMS maximum, you might be OK with a single strand of 0.5mm diameter

Winding option A:
10Tape
9S213 turns 0.5mm dia
8Tape
7P214 turns 0.5mm dia
6Tape
5S113 turns 0.5mm dia
4Tape
3P114 turns 0.5mm dia
2Bobbin
1Core

Then wire P1 and P2 in parallel, S1 and S2 in parallel.  This might give you some troubles with circulating currents, though, because (P1 and P2) and (S1 and S2) follow different paths through the magnetic fields inside the winding pack and therefore could develop different Electro Motive Forces (EMFs). Different EMFs can lead to currents circulating through the windings.


Winding option B:
10Tape
9S26 turns 2x0.5mm dia
8Tape
7P27 turns 2x0.5mm dia
6Tape
5S17 turns 2x0.5mm dia
4Tape
3P17 turns 2x0.5mm dia
2Bobbin
1Core

Then wire P1 and P2 in series, S1 and S2 in series. Because the parallel windings are right next to each other (similar to what you've wound already) you can be pretty confident you won't have circulating current problems.


Caution: you cannot rely on single-insulated enamel wire (aka magnet wire) for safety.  This is because the enamel has little pinprick holes in it, which can rub through into short circuits (rare but possible).  If you need safety insulation (e.g. to get from mains to a human-touchable circuit) the transformer design needs a lot of careful attention.
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Yeah, series windings are usually better.  You can get away with many strands that way, 2 or 3 or even 4 strands, laying flat together (make sure they don't overlap).  Or copper foil / tape (but you'll need to add insulation), which is fantastic for high currents.

Also, don't use vinyl "electrical" tape: it's very stretchy, and melts at a low temperature.  I would rather use masking tape -- it's paper, which is bad, but paper was used back in the day, and paper doesn't ignite until higher temperatures (class A insulation).  Ideally, polyester (class B I think) or polyimide (class F? good for >200C!) should be used.

Without varnish filling the gaps, it's also a good idea to derate the wire size further.  Not a big deal on small transformers like this, but you'll notice things getting much hotter as you go up in size. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
What's up with strange PI filter and the feedback node before the output inductor? Surely this isn't correct. ? as a measure I would use a pot and adjust the duty cycle to the max (0.4)  to confirm your transformer is working correctly at maximum load regulated so the process of elimination can begin. You have two problems remaining.. transformer efficiency verification  and voltage mode feedback verification (with compensation) both can be tested independently.
« Last Edit: June 13, 2017, 07:11:02 am by diyaudio »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Feedback before the LC assists with compensation.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online jbb

  • Super Contributor
  • ***
  • Posts: 1136
  • Country: nz
Whoa, so many replies haha. Didn't expect such a low-scale, nooby project to be so watched.

Well, I can't speak for others on the forum, but it's nice to see someone deliberately working through something challenging.  I'm sure you've learnt a lot! Flyback supplies are common, but actually surprisingly tricky.

EDIT: Ok, performed the testing procedure again. And holy moly, do my eyes deceive me? 83% mean efficiency! Awesome. Notice that my 12V initial input voltage dropped massively to about 10V! Ugh! This is why I don't like breadboards! But I don't have a choice at the moment...

That efficiency's not bad at all for a not-particularly optimised converter.  Moving to a proper PCB might help a little - but is it worth it to you?  Once you get the TL494 feedback behaving properly (which should be fine on the prototype board) you've gotten most of the learning out of it, and it looks pretty tidy.  However, laying out a proper PCB could be good practice too.

2. Tim, I got masking tape...somewhere...just need to find it. The core does get rather warm. 56C when drawing the full 1.3A load.

No worries there - that's just 'warm' rather than hot.
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
That's not a zener, that's a Vbe multiplier.  The voltage might be stable enough, but the tempco, hoo boy...

You aren't going to improve on the TL431; you can mimic it, but you'll end up with whatever problems you had in the first place, but worse because it's discrete instead of integrated.  :P  In short: fix your problems first. :)

The spikes come from dI/dt at the rectifier (and dV/dt at the transformer, if it's common mode), feeding through because of capacitor ESL.

Solution?  Add ferrite beads in series with the line(s), and bypass with a ceramic cap. :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21657
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
2. From opening up a lot of old SMPS bricks, I noticed they often have zener diodes, usually 1Watt, reverse biased with the output. Or sometimes, there might be a hefty bleeder resistor. For example, for a typical 5V 2A charger, there might be a 5.1V zener reverse biased with the output. So, at worst, the power loss would be somewhere around ~(5.7V - 5.1V) * 0.25A load_min = 0.15Watts. Does that sound about right?

This calculation is for a 0.6V drop at 0.25A, but where is the 0.25A going?  It can't just dead end. ;D

It has to go on to ground, sooner or later.  So you have another 5.1V * 0.25A = 1.25W somewhere, in order for this to be valid.

But at 0.25A, the supply isn't at 5.7V anymore, so the 0.6V drop doesn't actually exist anywhere.  (Classically, it would be dissipated within the Thevenin source -- but with switching and reactive power flowing around, there's no particular reason to believe the drop is due to an internal resistance that dissipates real power!  AC is fun like that, eh?)

So you just have / need the 5.1V * 0.25A load.

You might look into sharpening the gate drive, see if that improves the minimum pulse width.  Also, what it's doing near cutoff, if it is oscillating or going chaotic or what.

Also, make sure the TL431 and opto aren't saturated.  Note that TL431 can't pull down below about 1.9V (can you figure out why? ;) ).

As for the zener: that's usually for clamping, or TVS protection.  It could also be for minimum load.  It's worth noting, adapters usually have crappy regulation -- no TL431 + opto, just aux winding feedback -- so the output can be even more wild than what you've got here.

Better supplies often have a crowbar: a zener or separate TL431 triggering an SCR that shorts the output if it rises over so-and-so.

Quote
3. Instead of having a zener or bleeder resistor, is it possible to use capacitive reactance, before the rectifier, for loading the secondary side output?
R = 1/(2pi*f*C). Set R equal to some value that will draw, let's say 0.25A @ 5V, current on the secondary. Frequency is switching frequency. Solve for C.

Mmmh, maybe, but it's a brute force way, and isn't friendly to the transformer and transistor.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: debininja


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf