Transformer design - Page 1
Forum section: electronics / beginners

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 11:27:56 am
content: Hi everyone. Newbie to the forumI'm looking for an easy tutorial on winding a stepup transformer. I need to generate 700vdc from a 9volt battery. The current requirements are 5-10mA output at 700vdc.I've searched the web on how to design such a transformer but nothing is simple enough.I know I need around 1:80 ratio, and will have to input around 0.6amps to achieve this output current..Can anyone help with this please.Thanks

author: rob77
author_rank: Super Contributor
timestamp: February 07, 2016, 11:31:30 am
content: you need a DC/DC converter not a step up transformer. transformers are AC devices.

author: Kleinstein
author_rank: Super Contributor
timestamp: February 07, 2016, 11:51:53 am
content: With only 700 V DC, you might get away with reusing a transformer from a normal 230 V switches mode supply in reverse direction, especially if you use a voltage doubling rectifier. At the still rather low power flyback converters are the usual choice.700 V and 5 mA are 3,5 watts. That is too much for a normal 9 V block battery.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: February 07, 2016, 11:59:21 am
content: You may reuse an existing transformer in reverse , you can use a transformer from an SMPS giving the right duty-cycle you can get your 700V or whatever. but as Kleinstein said it will to much for a 9V battery.

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 12:13:17 pm
content: Thanks for the quick replies guys. Firstly the battery source will be 6x1.5 volt C cells so I think these may cope ok. I did try using a standard 230v to 6v transformer in reverse, I fed that with a mosfet at around 8khz, varied this frequency with the micro but couldn't get anywhere near what I wanted as expected.Thanks, if anyone has any circuits that could do the job I'd appreciate it

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: February 07, 2016, 12:27:56 pm
content: i did a circuit that i used it in the lab for a while, and it's justSTM32F0 dev board using one timer , once channel and it's complementary output, generating a 100KHz pwm signalan H-Bridge L298a switching transformer from an old ATX power supply, its output is wired to the H-bridge and powered up by a bench PS at 12Vi can get easily 350VDC from the primary, and it was good enough to power up small phone chargers and such small load, and to do the tests it was originally made for

author: fcb
author_rank: Super Contributor
timestamp: February 07, 2016, 12:35:25 pm
content: In addition to the other answers you'll have a problem with a PP3 (9V battery) for your application.700V @ 10mA = 7W7W @ 9V = 0.77AAnd that's assuming 100% efficiency, in reality you'll be luck to get to 85% efficiency (7W @ 85% = 8.23W input, or 0.91A @ 9V) - and at these sort of levels your 9V battery internal resistance will play start to become a dominant factor (further dropping the output voltage of the battery, and increasing the current required, etc....)A couple of things you could try:1. Build one and test it (although you'll probably need to drive it from a bench PSU whilst you do your inital development)2. Replace the 9V with perhaps 6xAA or 6xAAA cells.3. Try one of those Lithium 9V batteries - they are super expensive but if you must have the PP3 form factor they might help.

author: Brumby
author_rank: Unknown
timestamp: February 07, 2016, 12:37:42 pm
content: .... The OP has already said the power will be supplied by 6'C'cells.

author: Performa01
author_rank: Super Contributor
timestamp: February 07, 2016, 01:46:14 pm
content: Quote from: Blackwarrior on February 07, 2016, 12:13:17 pmIt might be a good idea for you to show us your current circuit configuration first, so we get a chance to spot what's going wrong...

author: kripton2035
author_rank: Super Contributor
timestamp: February 07, 2016, 04:31:04 pm
content: lots of infos :http://ludens.cl/Electron/trafos/trafos.html

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 07:30:09 pm
content: thanks Guys, i think ive cracked it, i will generate a schematic later and pass this on. basically, i wound my own transformer using a very small bobbin and core from farnell. this wont be good enough for a finished version as there isnt enough room for proper isolation between the windings at this voltage. i think id be better off with a separator in there. but with a single stage Cockcroft Walton in im getting around 670VDC good enough.circuit description:using an arduino to generate 7.8Khz (experimental) oscillator at 50%. this feeds a MOSFET N channel that grounds one end of the transformers primary, the other end is connected directly to the 9 volt supply. one end of the secondary winding goes to ground whilst the other goes through the Cockcrofts single stage.circuit to followthanks

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 07:46:46 pm
content: This is my basic circuit, ive omitted the arduino.. think i still need some kind of snubber in there maybe???any comments would be appreciated

author: Performa01
author_rank: Super Contributor
timestamp: February 07, 2016, 08:59:03 pm
content: A diode across the primary transformer winding (30T) would be a good idea indeed (cathode towards 9VDC). The MOSFET is only rated 75V, so I wouldn’t be surprised if it’s already fried…The 2nd thing is the control signal. You indicate it’s PWM – in that case make sure (in software), it can never go beyond 50% duty cycle, i.e. the Transistor is never turned on for more than 50% of the PWM period.Some experiments would be helpful – given the fact we don’t know much about the transformer, other than it’s probably meant for mains frequency (50Hz). So it will probably not work very well at higher frequencies and losses might be high, especially when driven by square pulses.So you should insert a small resistor, say 0.5 ohm, in the source connection of the MOSFET and monitor the voltage drop across it with an oscilloscope. Now try to find out how log it takes for the current to reach 2A, i.e. 1 volt across the sense resistor. That is your maximum turn on time then – and it depends mainly on the inductance of the transformer.Just recall the basics: When the transistor switches on, the current starts to rise and is only limited by the DC resistance of the transformer winding, which is supposedly <1 ohm. So the current could reach quite high values at 9V supply. Obviously, the control circuit has to be designed in a way that it switches off the transistor before that happens.Now the transistor switches off and the transformer suddenly ‘sees’ a very high impedance at a very high current – according to Ohm’s law this means a very high positive voltage developing on the drain of the transistor. Way more than 75V, so the transistor is probably dead already. TO prevent that (in future, at least), the freewheel diode will kick in. It starts to conduct as soon as the drain becomes more positive than the supply voltage and will allow the current continue to flow. That’s how a simple forward converter works.

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 09:35:12 pm
content: Quote from: Performa01 on February 07, 2016, 08:59:03 pmThank you for all this information, very valuable. The transformer I used is from farnell, this one...http://uk.farnell.com/epcos/b66208b1110t1/coil-former-e25-13-7-valox-420se0/dp/2077544With the appropriate core. It needs to be as small as possible, but I think this one is too small..I will put the diode on tomorrow, the mosfet hasn't fried yet and it's been running most of the day.I have the circuit connected to a bench PSU, and the current drawn is no more than 0.6 amp at 9 volts..The PWM never exceeds 50%. I will put the resistor in series with the source on the mosfet tomorrow to check the current flow and timing.Thanks for the tips, appreciate your time

author: Performa01
author_rank: Super Contributor
timestamp: February 07, 2016, 10:23:23 pm
content: Yes, your MOSFET seems to be a very rugged beast and the intrinsic diode acts as a zener clamp that seems to protect the transistor. Well, it all depends on the energy stored in that transformer. I still don't know what properties it has - the link to the coil-former doesn't tell much in this regard. The core is the main important thing, together with the wire used for the windings and the number of turns...If you have all these data you should be able to calculate the primary inductance (or measure it), then it is possible to predict how fast the current will rise after the transistor turns on. Of course it also depends on the power supply and it sure is a wise move to set the current limit to some 2A.As for the diode, it should be a reasonable fast 1A type, a UF4004 would be ideal, also a Schottky diode of course. But when at a pinch, an ordinary 1N4004 would do for the first steps as well, since the frequency isn't that high and efficiency is not a primary concern at this stage...Good luck with your experiments!

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: February 07, 2016, 10:51:32 pm
content: did you wind it your self ?i don't know why you need that capacitor in series with the output.i go with what @performa said for the diode , you will need probably more rapid diode on the output. but i pick an UF4007.

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 11:50:57 pm
content: Quote from: Performa01 on February 07, 2016, 10:23:23 pmThanks Performa, I think I've got some Schottky diodes somewhere, I'll stick one of those in tomorrow, I'll also measure the inductance of the windings and note the wire I used, turns are on the diagram.As I said the PSU never goes above 0.6 amps, current limit is set to 1 amp.I will keep you all updated tomorrow with parameters of the circuit.Thanks for your help and time.

author: Blackwarrior
author_rank: Unknown
timestamp: February 07, 2016, 11:55:43 pm
content: Quote from: hamdi.tn on February 07, 2016, 10:51:32 pmYes I wound the transformer myself, I have a great winder I bought off ebay, counts the turns for you, I used that for the 540 secondary winding, the primary I wound by hand as it was only 30 turns.The series cap on the output forms part of the Cockcroft Walton circuit with the diodes....Thanks for the tips

author: chris_leyson
author_rank: Super Contributor
timestamp: February 08, 2016, 05:57:21 am
content: EF25 is a big core for 7W but I guess you need a good layer of insulation. I notice you are driving the mosfet at 7.8kHz 50% duty cycle, so that gives you an on time of 64us, I think you need much bigger magnetic coupler for 7.8kHz, 10 Watt audio transformer spring to mind. Dave, where is the light bulb (Gru) emoji thingy ?If you are using squarewave voltage drive then use the volt time product to calculate your minimum number of primary turns for a given core and winding size, mathematically you've got five variables which are assumed to be linear and you can translate or arrange them five ways, minimum.(1) V*t = N*B*Ae, (2) B = V*t/(N*Ae), (3) N = V*t/(B*Ae), (4) t = N*B*Ae/V, (5) Ae = V*t/(N*B), (6) f = 1/2t = V/2*(N*B*Ae) whereB = flux density (T)V = applied voltage (V)t = on time (us)N = number of turnsAe = effective core area (mm2)f = switching frequency in MHz at 50% duty cycleFor the known variablesV = 9V, t = 64us, Ae = 52.5mm2for an EF25 core, B = 200mT, only because it's a good place to start from, thenNmin = V*t/(Bmax*Ae) = 9*64/(0.2*52.5) = 55 turns. At Bmax = 250mT then Nmin = 9*64/(0.25*52.5) = 44 turns.From astored energy point of view, assuming you wound the primary with 55 or 56 turns how much energy could you store in say TDK N87 ferrrite, Al for ungapped N87 is 1850nH and at 55 turns that's 5.6mH. Energy stored = 1/2*I2*L and I = V*t/LPeak current I = V*t/L = 9*64E-6/5.6E-3 = 100mA, Stored Energy = 1/2*L*I2*L = 1/2*0.12*5.6E-3 = 28uJMaximum power you could transfer P = operating frequency*stored energy per switching cycle = f*E = 7.8E3*28E-6 = 220mW.You need to increase the operating frequency and use less turns on the inductor.

author: Blackwarrior
author_rank: Unknown
timestamp: February 08, 2016, 06:35:39 am
content: Hey Chris, thanks for all the formuli. I've seen some on Google that's just mind boggling, this has cleared things up a bit.I'm going to order a few different bobbins and cores today from farnell or RS, and maybe a dedicated programmable oscillator as I can't really get above 60khz with the processors Pwm. It's the atmega328 running at 16mhz.Really appreciate all the work you put into that post.This needs to be as small as possible too.Thanks again.

author: Blackwarrior
author_rank: Unknown
timestamp: February 08, 2016, 06:37:15 am
content: Quote from: blueskull on February 08, 2016, 06:13:53 amThanks for these suggestions, I'll look them up today at work.

author: chris_leyson
author_rank: Super Contributor
timestamp: February 08, 2016, 08:45:12 am
content: Hi Blackwarrior, just a few scribbles on the back of an envelope, I find it helps to get a feel for what's going on.You're probably better of running the switch at 50kHz, another approach might be, how many turns can you get into a single primary layer, say 10 turns for sake of argument, maximum on time t = N*B*Ae/V = 10*0.2*52.5/9 = 11.6us, and at 50% duty cycle thats 43kHz.Al for ungapped N87 is 1850nH gives you L = N2*Al = 10*10*1850nH = 185uHPeak current I = V*t/L = 9*11.6E-6/185E-6 = 0.56A, Stored Energy = 1/2*L*I2*L = 1/2*0.562*185E-6 = 29uJAt a switching frequency of 43kHz you could transfer 43E3*29E-6 Watts or 1.25 Watts.If you had 10 turns on the primary that would give you 9/10 volts/turn 0.9V/turn so you wound need 700/.9 or 780 turns on the secondary, now you've got to watch out for leakage inductance, the mosfet will need protecting.

author: Blackwarrior
author_rank: Unknown
timestamp: February 08, 2016, 09:22:05 am
content: Quote from: chris_leyson on February 08, 2016, 08:45:12 amChris, your a star. thanks. im thinking of ordering the efd25 bobbin and former from farnell.also the CD4536 oscillator instead of the uP.thanks mate

author: Blackwarrior
author_rank: Unknown
timestamp: February 08, 2016, 11:19:35 pm
content: ive checked the primary and secondary winding for inductance with an LCR meter.primary = 1.227mH - DC resistance = 0.2R - Test freq = 15Ksecondary = 400.2mH - DC resistance = 11.6R - Test freq = 1K

author: Performa01
author_rank: Super Contributor
timestamp: February 09, 2016, 11:25:52 am
content: As your goal is a primary current of 0.6A average, peak current should be about 1.2A.With 1.227mH primary inductance, you need a turn-on time of about 1.227mH * 1.2A / 9V = 163.6µs.The period of your control signal thus needs to be twice as much, i.e. some 327µs and the frequency is 3kHz.So while you've already been given very comprehensive advise by chris_leyson, also on transformer selection/design, you could still investigate your current transformer and I think it would be a good learning experience.So maybe you actually insert that current sense resistor in the source of the MOSFET and watch the current during the turn-on time at 3kHz. Does it go up to 1.2A as expected? If it goes much higher, then this is probably due to core saturation and would be a hint to lower the inductance, i.e. number of turns, and increase the switching frequency at the same time - which has been suggested already anyway.

author: Blackwarrior
author_rank: Unknown
timestamp: February 09, 2016, 06:19:44 pm
content: Thanks Performa for this info, I'm going to work on this tonight, I've brought a high spec function gen home from work to play around with different frequencies.. I also got a different core and bobbin to try out maybe in a day or so.I will work on this transformer I've wound now though, and as you say, it will be a good learning curve.I'll keep the thread up dated as I progressAppreciate everyone's help with this...Cheers

author: Blackwarrior
author_rank: Unknown
timestamp: February 10, 2016, 06:37:37 am
content: Got one more question guys to complete the above formuli you's have kindly simplified for me. That's wire thickness for primary and secondary windings... Any help would be appreciated. Thanks

author: Blackwarrior
author_rank: Unknown
timestamp: February 10, 2016, 08:59:15 pm
content: ive been playing around with this transformer learning a few things before i start on my new one.ive connected a 0.5R resistor between ground and the source of the MOSFET to get the current drawn as advised.the first attachment is the scope readings at the 7Khz i was originally driving it at. i see excessive current being drawn at this frequency with the transformer saturating.by increasing the frequency to 9Khz i was able to stop saturation and reduce overall current as seen on the PSU by half, from 0.46 A down to 0.22Ainput voltage = 9VDCoutput voltage @ 9Khz = 227ACoutput voltage thru Cockcroft = 496 VDCPrimary Inductance of TX = 1.22mHsecondary Inductance of TX = 402mHi am going to try and work out windings on the new transformer with the given formuli you guys have shown me.the transformer core is the ETD N97, farnell No 1422745the transformer bobbin is the ETD29, 13 pin, Farnell No 1422746thanks for your help guysEdit. Pink trace is the gate, yellow is on the 0.5R resistor

author: Performa01
author_rank: Super Contributor
timestamp: February 11, 2016, 12:05:55 pm
content: Quote from: Blackwarrior on February 10, 2016, 06:37:37 amIt's all about wire resistance and losses, which you want to both minimize and distribute evenly between windings.Power dissipation is I² * R;Assuming an ideal transformer, the current is indirect proportional to the turns ratio: Ip/Is = Ns/Np;Ip = primary current Is = secondary current Np = primary number of turnsNs = secondary number of turnsFor equal losses in the primary and secondary windings, you want Ip² * Rp = Is² * Rs;If you do the basic math, you'll find that this criterion is met with:Ap = As * Ns/Np;Ap = Cross-sectional wire area for the primary windingAs = Cross-sectional wire area for the secondary windingHence the diameter of the wire used for the primary winding is:dp = ds * sqrt(Ns/Np);It just so happens that this means, that the total cross-sectional area of the primary winding should be about equal to that of the sum of all secondary windings.The resistance of a wire is calculated: R = rho * l / A;rho = electrical resistivity [ohm*m] (depending on wire material)l = lenght of the wire A = cross-sectional area of the wire seehttps://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivityExample:If you want two windings, say 10 turns for the primary and 1000 for the secondary, then you know the current ratio, i.e. primary current will be 100 times the secondary current.Now you have to figure out what the maximum wire diameter is that fits the space. Assume that space is e.g. 20mm wide and 14mm high (just some random numbers not related to any particular core!), then you will subtract a few millimeters of the height to leave room for insulation wrappers plus a little spare, so let's say you take 4mm for that and then 10mm are left. That is a cross-sectional area of 20mm * 10mm = 200mm². That means 100mm² for each winding.Primary side: 100mm² / 10 turns = 10mm²;Secondary side: 100mm² / 1000 turns = 0.1mm²;For calculating the wire diameters, do not use the common formula A = d² * Pi/4, as there is a fill factor that can never be 100% with round wires. Simply use d² instead, thus d = sqrt(A);Now the associated diameters are 3.16mm and 0.316mm.In practice, you might use 3mm for the primary and 0.3mm for the secondary in this example.

author: Performa01
author_rank: Super Contributor
timestamp: February 11, 2016, 12:29:43 pm
content: Quote from: Blackwarrior on February 10, 2016, 08:59:15 pmThe N97 ferrite core seems to be optimized for 100kHz, and I think the screenshots hint in that direction also. So your final design should aim for a frequency in that range.Would you mind doing some more experiments with the 'old' transformer at higher frequencies (20, 50, 100kHz) and showing us the results?

author: Blackwarrior
author_rank: Unknown
timestamp: February 11, 2016, 01:58:33 pm
content: Performa, thank you so much for your input on this transformer design. invaluable stuff for sure, and im learning a great deal from it. thanks also to Chris_Layson too for the formulas. i am knocking up a spreadsheet putting all these formuli in at the moment.Yes ill do those tests now Performa... no probs.

author: Blackwarrior
author_rank: Unknown
timestamp: February 11, 2016, 02:25:18 pm
content: Reminder of what i am testing at various frequencies.Input voltage = 9.0VDCInput Signal to Gate is from a SDG 2122X Gen - Amplitude = 9VDC - Offset = 4V - Duty = 50% - Phase = 0MOSFET is a P75NF75 N Channel.Transformer is hand made, primary winding = 540 turns, secondary = 30 Turnsinductance Primary = 1.22mH - Secondary = 402mHthe following scope readings are: Top (Pink trace) = Gate - Bottom (Yellow Trace) = SOURCE pin (0.5R resistor connected between ground and Source of MOSFET)EDIT: sorry primary winding is 30T and Secondary is 540T

author: Performa01
author_rank: Super Contributor
timestamp: February 11, 2016, 02:58:55 pm
content: Well, that's pretty close to what I've expected...Did you measure the output voltages for the various test frequencies?At 10kHz, it actually doesn't work at all. The current increases very slowly and only speeds up after ~40µs. After that, it runs up and into saturation very quickly. In this scenario, you weren't able to pump a lot of energy into the score. If you integrate the current over time, the resulting mean value will be very low obviously.At 20kHz you can see the resonance of the transormer triggered, but it's still just one pulse followed by some ringing. But the ringing is at about 100kHz, indicating the frequency at which the transformer is willing to workAt 50kHz this effect is quite obvious, but you're still not there. You want to pump new energy into the transformer synchronous with its resonance frequency.At 100kHz you see one complete period. You cannot see what's going on while the transistor is off, since the current flows through the diode during that time.You could try adding a capacitor in parallel with the primary winding (30 turns), something in the range 470 - 2200pF; Once you've found an optimum value for the capacitor, you could also try to remove the diode and see how this affects the output voltage.EDIT: Two more notes:1) I wouldn't have recommended removing the diode without the nominal load at the secondary side if I had not learned by now that the P75NF75 MOSFET is fully protected (it intrinsic reverse diode is fully avalanche rated), so the drain voltage will be safely clamped to somewhere >75V.2) By the process you were going through (crowned by finally adding a capacitor) you were moving towards a resonant converter, which is more efficient than the ordinary switch mode technologies. Another step would be going from single ended to balanced - maybe you should stick with the current transformer for a while and try this out also. This way you gain experience which will help to make good decisions for your final design...

author: Blackwarrior
author_rank: Unknown
timestamp: February 11, 2016, 03:58:04 pm
content: I'll do the tests again and record the outputs on another channel, also take voltage readings on DMM..I'm not quite getting the output I need but incorrect ratio seems the obvious cause..As for the internal diode in the mosfet, you mentioned this earlier so what you've seen so far has been without the external one.Certainly seems like I'm progressing, and certainly learning a thing or 2.. Thanks to you. And the other help im getting...Working on those voltages nowThanks Performa

author: chris_leyson
author_rank: Super Contributor
timestamp: February 11, 2016, 04:20:17 pm
content: I just remember Farnell and RS stock a few CCFL lighting transformers..http://uk.farnell.com/bourns-jw-miller/pm61300-4-rc/transformer-smd-ccfl-6w-13v-to/dp/1795421http://uk.rs-online.com/web/p/chassis-mounting-transformers/2509495561/

author: Blackwarrior
author_rank: Unknown
timestamp: February 11, 2016, 04:28:54 pm
content: voltages are taken with a Megger TPT320 voltage tester.. this onehttp://www.tester.co.uk/megger-tpt320-voltage-tester?gclid=CIz34Y6P8MoCFa0V0wodmuAJCwAt 100Khz - Voltage = 267VACAt 50Khz - Voltage = 240VACAt 20Khz - Voltage = 223VACAt 10Khz - Voltage = 258VAC, current drawn is excessive.Scope reading below, The Cyan is the output of the transformer with the Voltage tester as a load.this is with a 1nF across Transformer

author: Blackwarrior
author_rank: Unknown
timestamp: February 11, 2016, 04:32:32 pm
content: Quote from: chris_leyson on February 11, 2016, 04:20:17 pmthey look like the solution i need, no longer manufactured though according to Farnell, and RS dont show any data for it...thats a bumber, but a great solution i think.thanks Chris

author: Audioguru
author_rank: Super Contributor
timestamp: February 11, 2016, 04:34:49 pm
content: Some C cell batteries have a puny little AA cell inside.

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 10:17:59 am
content: You didn't fit the external diode yet - actually I have wondered already when looking at your previous screenshotsSo I would stongly recommend to repeat your tests with the diode fitted, so we can see (and discuss) the differences.Your current measurements show basically the same as the previous ones, but now we can see what's going on at the secondary side.At 10kHz, we see an excessive increase of current after some 40µs, to a peak level of 4A (2 volts/0.5 ohms). Then a huge kickback. The scope shows some -570V already, and it is actually much more, as the waveform is clearly clipped on the negative side. Duty factor of the output is not the same as the control signal, which also indicates that there is something going wrong.Your scope probes are presumably rated for 600 volts maximum only. So this measurement did exceed the probe rating by quite some margin, so I would strongly recommend not to repeat any tests with this transformer at 10kHz without freewheeling diode across the transformer primary.At 20kHz, it looks surprisingly good, apart from the strong ringing, indicating that the transformer would like to operate at a higher frequency. But duty factor is near perfect and negative voltage doesn't get excessive anymore.At 50kHz, we don't see a ringing, but a clear indication that the transformer likes twice the frequency.At 100kHz, all the wobbles are gone and the wavefor looks nive, even though symmetry is not perfect. An interesting experiment would be to further increase the switching frequency, maybe in 10kHz steps, in an attempt to optimize the waveform. The same effect should be achievable by increasing the capacitor across the primary winding, but it's certyinly much easier to adjust the frequency instead of swapping capacitors.So could you please try that and then repeat the complete test with the external diode fitted?

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 10:56:39 am
content: Hi Performa. the only diodes i have that may me suitable are RHRP8120, 1N5818. so ill try the former as its spec is much higher.doing tests now.

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 11:10:49 am
content: ive fitted the RHRP8120 diode in and the current drain is massive. cathode to VCC.here is the scope at 100Khz, i tried higher frequencies but it just got worse. output voltage is on Cyan trace, very low.

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 11:27:58 am
content: Are you sure you haven't accidentally reversed the diode?

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 11:41:10 am
content: Quote from: Performa01 on February 12, 2016, 11:27:58 amno, definitely cathode to VCC and Anode to drain. ive tried 4 of these, all with the same results. even tried the 1n5818. same results

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 02:18:28 pm
content: if i reverse the diode its a lot worse...attached are the results on scope of the higher frequencies, up to 200Khz

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 05:16:50 pm
content: Quote from: Blackwarrior on February 12, 2016, 02:18:28 pmThat's without the diode, right?Unfortunately, you haven't included the output measurements.From the screenshots, it looks like you manage to increase the transferred energy quite a bit and this should show in the output voltage. The initial idea was to find the optimum switching frequency, where we could optimize for either maximum output power or maximum efficiency. This only makes sense if the intended load is connected to the output, of course.Once that optimum has been found, you can calculate a different capacitor in order to get the frequency down if so required. Higher frequencies are generally more convenient, because lower values for the inductances and capacitances can be used and ripple filtering gets easier, but switching speed of the transistor as well as the losses in the ferrite core will decrease efficiency, so there is indeed an optimum frequency.So I assume the output voltage was still increasing and you got a new maximum at 200kHz?

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 05:24:34 pm
content: Quote from: Blackwarrior on February 12, 2016, 11:10:49 amOkay, just wanted to make sure. The diode seems to work, but it looks like 100kHz is still way too low for this transformer design, which was a little surprising.The current rise is near instant now and reaches 4A after only 1µs. Then the current remains constant, probably because of the core saturating, maybe also because of the current limiting of the power supply - or both.Do you have a suitable capacitor right between the Vcc end of the transformer primary winding and the ground end of the current sense resistor?If not, you should add some 10 ~ 100nF capacitor there, preferably not a crappy Z5U ceramic, but at least X5R, X7R or also mylar, even better a polypropylene.If that is sorted, you might want to try again, but this time starting at 500kHz...

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 05:58:06 pm
content: I wrote all the voltages down but forgot to add them..These are all with the voltage tester as a load.120Khz - 306vac130Khz - 328vac140Khz - 349vac150Khz - 368vac200khz - 385vac current drain massive.My PSU is rated at 2amp only. And set to maxUnfortunately I only have ceramic and electrolytic caps at hand.I will try it at the higher frequency 500KhzYou have the patience of a saint Performa, but I appreciate all this help and guidance to get this performing at its best.. Thank you for that

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 07:34:48 pm
content: Quote from: Blackwarrior on February 12, 2016, 05:58:06 pmWell, the output power is rising ...The massive current drain is quite visible in the screenshots. You still manage to get some 4 amps, probably because of the output cap in the PSU, so the current limit does not kick in as the average current still doesn't seem to exceed 2 amps.QuoteCeramic is okay, let's just hope you have an X5R/X7R at hand. Any value >10nF will do (and will be way better than nothing anyway)

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 07:37:22 pm
content: ive tried it at 500Khz and the output VAC drops to 46volt, similar results down to 300Khz and up to 1Mhz, also my squarewave into the gate very distorted.i put a 15nF cap from VCC on transformer to ground next to source on MOSFET, results below, these are at 108Khz which appears to be the best freq to use giving me the highest output voltage at minimum current.thanks

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 08:01:40 pm
content: Just wanted to add one thought:Switching frequency should not normally make that big a difference. As stated before, there is an optimum of course, depending on the properties of the core mainly and also on some other components, but apart from that, output should be reasonbably constant if the frequency changes a little. The fact that we see major differences indicates that it still doesn't work as intended, and this suspicion is well backed by the screenshots you've provided.The goal is to get near sinosoidal primary current, i.e. neither longer periods of near constant current, neither short spikes. Unfortunately, we don't really see the current when the transistor is switched off, but the output power and efficiency are good indicators too. Once you've found the sweet spot, you will have gained a 'feeling' for the properties of the components, mainly the core, and as it looks now, you need either very high frequencies or you'd have to increase the inductance. Since the latter means more turns of wire for the windings, we want to avoid that and rather experiment with a parallel capacitor as additional energy storage element, thus lowering the resonance frequency.Btw, for any further experiments, you should use either the capacitor or the external diode, not both at the same time.I would say you should stick with the capacitor for now.If you want to add some output regulation (at a later point, first you should optimize the basic design), there are still several possibilities, it might just not be digitally controlled PWM at frequencies that high...

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 08:08:42 pm
content: Quote from: Blackwarrior on February 12, 2016, 07:37:22 pmYes, 100kHz should be the proper frequency and you certainly should try to get it at an optimum there.Now you say it works best with 15nF bypass capacitor for maximum efficiency.So has the bypass capacitor improved things? On the screenshots I can see that the peak current has increased, whereas you get more ringing, as the quality of the primary loop has increased too, as the loop is now nice and short, instead of including the cables to the power supply, which btw. will act as nasty little antennas...

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 08:22:24 pm
content: The 15nf cap created a lot of noise in the current waveform, this is the second waveform on the latter 3 I've posted, the file name helps identify the readings. The last scope picture shows current wave looking pretty good with minimum noise.I will order a load of mixed caps, polyprops and mylars.In the meantime I will relay this part of the design out again, keeping tracks and wires as short as possible. Guess it's not helping using veroboard/strip board, but it will eventually be on a PCB.I will carry on experimenting with what caps I find. So I'm looking for a good sinosoidal current waveform for best results?I've noticed my gate drive signal is getting a bit distorted so I'm thinking of adding a non-inverting op-amp buffer in there, maybe give me more drive... Or something similar.Thanks for all your help Performa.

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 09:03:11 pm
content: I'm a bit confused now as you've stated that 108kHz seems to be an optimum. I wondered if you could see a difference with and without the bypass cap, in terms of output power and efficiency?There clearly should be, as the high slew rate signals in this circuit need a short current path for all the high frequencies, which is provided ('closed') by that cap.For the same reason an OpAmp isn't a good option, except for some ultrafast video/line drivers it will probably be too slow for efficient switching. A dedicated MOSFET lowside driver would be the much better choice.Well, in a flyback converter, the current will never be a nice sinus, but it should at least not be neihter a narrow pulse nor a random ringing. What you've achieved so far doesn't look bad at all. So you're right, making the loops that carry high current as short as possible, using good bypass caps for that and providing a solid driver signal for the switch are key elements.Another area for some experiments is the snubber circuit for the primary coil. A capacitor is a start, but you'd need to find out the best value for this, again for highest efficiency. A capacitor with a small series resistor (e.g. 100 ohms) might improve things even further.If I were you, I'd set up a new test with a transformer temporarily made just for this: 3 equal windings, 30 turns each, so there is no change to what you've explored so far. This way the secondary is low voltage and much easier to work with in therms of measurements, and the third coil could be used as a 2nd primary if you attempt to make a push-pull converter (of course you can leave that out if you're sure you'll never go this route).

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 09:45:30 pm
content: Sorry im confusing you, confuse myself at times, and thats when im making a coffee...the 2 scope readings at 108Khz, one was with the 15nF cap and one without. all the cap appeared to do was distort the current waveform. there was no difference at all to the output voltage, still 280VAC.so to clarify, the cap is basically across the 9 vdc supply close to the transformer?ive just checked my box of chips and found an MCP14e4 driver, so ill add this.i dont have anymore bobbins or cores to wind more transformers, but ill certainly order a few more, they are cheap as chips as they say in UK.im on with a new board now, ill put the new driver on it and keep tracks, paths as short as possible.thanks for your help today, greatly appreciated.

author: Performa01
author_rank: Super Contributor
timestamp: February 12, 2016, 09:59:15 pm
content: Ok, don't worry about waveform distortion so much - it is more important to keep the power supply lines reasonably clean, so even if it doesn't appear necessary in terms of efficiency, you still need it in terms of emcBtw. if you see yourself digging deeper into SMPS design, I can recommend you a really great book:http://www.amazon.co.uk/Supply-Cookbook-Second-Design-Engineers/dp/075067329X/

author: Blackwarrior
author_rank: Unknown
timestamp: February 12, 2016, 10:04:52 pm
content: Thanks Performa, I'll make this new board up in the morning, had enough for one day......I'll have a read of that now, thanks again

author: Blackwarrior
author_rank: Unknown
timestamp: February 14, 2016, 11:31:01 am
content: Changed the circuit on this design to try and improve things, added a MOSFET driver and more decoupling.circuit and 2 scope displays attached. the 9VDC frequency counter reading is incorrect, scope problem i guess. the 12VDC one is correct at 105KhzEDIT: corrected schematic, readings105Khz - 217VAC output at AC Test point - 486VDC at DC Test point - 9 VDC supply voltage105Khz - 302VAC - 651VDC -12VDC supply voltage

author: Performa01
author_rank: Super Contributor
timestamp: February 14, 2016, 12:09:53 pm
content: Wow, you manage to pump quite some current into your transformer now, don't you?What is the blue trace?Schematic looks good - where did you get that snubber network from?How did you measure the secondary AC voltage? Do you have a true rms meter for that? And what was the load?we can assume to get just about 8Vp on the primary side during switch on at 12VDC, as there is a 4V drop on the current measurement resistor already. Did you test the output with that resistor shorted?

author: Blackwarrior
author_rank: Unknown
timestamp: February 14, 2016, 12:21:44 pm
content: Hi Performathe Blue trace is the VCC rail on the Transformer. drops quite a bit doesnt it at peak current.too much current really for a battery operated device !!!Snubber circuit i got from google search...im still using the Megger voltage tester, its the Megger TPT320. it doesnt say in spec if its true RMS, just AC/DC up to 690V. load is <3.5mA.i havent tested the design with the Current resistor (0.5R) shorted.ive done some tests up to 150Khz, at 5KHZ steps... the best frequency is 115Khz.i need to draw less current from the batteries to achieve the same results, but i dont see that possible !!??!?!

author: Performa01
author_rank: Super Contributor
timestamp: February 14, 2016, 02:22:58 pm
content: Well, the turns ratio on your transformer is 1:18 and you want some 700VDC if I remember correctly. This is 350VDC bevore the voltage doubler, and with no load, VDC will reach the peak VAC value, so 250VAC rms would be enough for that. Under load however, it is likely to drop a fair bit, so I would rather calculate 300VAC rms.This in turn requires 300/18 = 16.7Vrms on the primary side, which is ~23.6Vp. Since your supply is only 9V, this would require some step-up process, i.e. even though you cannot apply more than 9V in the active phase, the coil voltage will get significantly higher in the opposite polarity when the transistor is off. I would aim for a more symmetrical primary voltage swing instead, as you probably have severe distortion, i.e. strong 2nd harmonics right now, which cause a DC component in your primary current, that compromises magnetic core properties and efficiency.I would try to find the optimum working conditions for highest efficiency now. Measure the current consumption for different supply voltages (for the primary coil and MOSFET only, not the driver), e.g. from 1V to 9V in steps of 1V, and also measure the output voltages. As you presumably have a resistive load, you should be able to calculate input power (V_supply * I_supply), output power (V_out² / R_load) and see what efficiencies (P_out/P_in) you get.The snubber network needs to be optimized for the individual design, so it would be better to leave it out for now. I wondered why the currents are so high all of a sudden, compared to what we've seen before. I suspect it is because of this network, which might not be well suited for your circuit after all.Once you've found the best operating conditions in terms of efficiency, you get an idea what to change in order to make the circuit work for your particular requirements, i.e. 9V supply voltage and 300VAC output...Good luck with your further experiments!

author: Blackwarrior
author_rank: Unknown
timestamp: February 14, 2016, 05:07:41 pm
content: Thanks PerformaI ordered a new bobbin from farnell the other day but its on back order, hopefully it will be in on Monday. this one is slightly larger than the one im using so ill be able to increase seconday windings AND have room for insulation.i did get a bigger core and former (some 35mm square), wound this with 800 sec and only 10 primary... definitely need more turns on primary. but i put that aside to get this one working..ive started to lay a PCB out rather than this stripboard. this will be a better prototype. shorter/thicker tracks, isolated HV etc etcthanks for all your help, i will continue with this transformer ive been testing but i think we have reached its capabilities maybe..been a good insight into how these things work though. thanks to your explanations..the quest continues....EDIT: i took the 0.5R resistor out the source to ground earlier and got an extra 95VDC out of it.. took me to just over 600VDC, thats after the Cockcroft..