Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 16
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
Vaxian (17)


Next birthdays
05/21 Dalus (34)
05/21 Kizmo (37)
05/22 Skynet (32)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: High Voltage
« Previous topic | Next topic »   

Low voltage arduino flyback driver

1 2 
Move Thread LAN_403
Aburastas
Tue Jan 05 2016, 02:11PM Print
Aburastas Registered Member #58236 Joined: Sun Jan 03 2016, 10:37AM
Location:
Posts: 5
Hi. New here but I want to share with you, guys, an idea that is "storming my brain" so bad. First I have been studing the schematics you have here in the forum and I've arrived to the following conclusions:

- "2n3055" single transistor: this is a good circuit because is always in the saturation limit of the core. but has a few drawbacks. waste a huge amount of power in the resistors and as the aux winding begin to conduct slowly, turn on the transistor slowly also so waste much power in transistor. When you put the resonant capacitor... you loss the flyback effect and you must supply more voltage because you only rely on the turn ratio of transformer to increase voltage. although you have the help of multiply Vin by pi... but I want to get the max voltage output from 6v as much. so the resonance don't is useful here. anyway, to protect better this kind of topology I think that a diode in serie with the base of transistor and a resistor from the base to ground wil help because the most fragile part in npn transistors is Veb that acostume to be in the 5-7v range.

- Mazilli zvs: better but has the same problem of rely on resonance so no flyback effect here. I is a kind of foward converter also. It may have problems when the load has a sudden drop also, beacuse of entry inductor.

- 555 with current limit: This is a circuit that can be near of what I want but... there are problems also. As Toff time is fixed and the load variable... most of time the 555 turn on the transistor when still there is magnetic flux in the core so this assure to have an high voltage at the mosfet drain which lead to losses and mosfet breakdown danger.

so... here is what I think will be the solution to drive a flyback transformer of unknown parameters as also unknown load. in reallity is as simple as and arduino with a mosfet driver and... a mosfet, logically.

- First we must determine Rs that will sense the mosfet current. And Vsin is the arduino voltage theresold.

Now we begin with the aproximate block program:
- so we turn on the mosfet until voltage across Rs is Vsin and save this time in Ton. keep a record of Tonmax and begin with an arbitrary Toff in the long preference to begin

- if Ton <Tonmax then Toff=Toff*(Tonmax/Ton); Ton Will be max when the core is demagnetized so if is less then this meaning is that still there is magnetic flux in the core so we can aproximate Toff by the Tonmax/Ton ratio

- if Ton>=Tonmax then Tonmax=Ton; Toff=Toff - incT; with this line we get an always searching the boundary mode betwen CCM and DCM.

- and then off the mosfet by Toff time

- to add that if you are charging a capacitor you can know when it is full by measuring Toff that will be the minimum when your
voltage is max.

sorry for the brick.... I hope it will be useful.
Back to top
hen918
Tue Jan 05 2016, 06:25PM
hen918 Registered Member #11591 Joined: Wed Mar 20 2013, 08:20PM
Location: UK
Posts: 556
I've never had a problem with the ZVS driver, it doesn't work like a forward converter as it's a bipolar switching topology, like a push-pull converter, but has the additional benefit of using zero or near zero voltage / current switching.
I've had significant problems implementing one efficiently as an induction heater, but never as a flyback driver. It just works, and if you do it well, you don't even need a heatsink, even charging a 3300uf capacitor to 400V.

And I don't think a ATmega328 will be fast enough to do what you are suggesting.
Back to top
Aburastas
Tue Jan 05 2016, 08:44PM
Aburastas Registered Member #58236 Joined: Sun Jan 03 2016, 10:37AM
Location:
Posts: 5
Uhmmm yes! Velocity or frecuency of arduino can be a problem... Let's say that the atmega has 16Mhz that is 62.5ns.. Aproximately if we use about 6 or 7 functions each loop and each function has 2instructions this gives us 62.5ns x7x2= less than 1us to achieve that you can't utilize the ADC converters so the voltage at current resistor comparison must be done by hardware. And trigger the digital input Vsin with an interrupt. But at a first seen seem that can be functional.

About foward converter.... I'm refering to foward converter when you transfer the output voltage when you put voltage at primary. So the voltage ratio is proportional at turns ratio. Meaning that although you connect a flyback transformer to a push-pull driver the output don't wil be the flyback voltage. A flyback driver stores energy in the transformer core at on time in which no output voltage is drawn. And then in the off time the seconary acts like an inductor that increase the voltage until find a way to escape the power in the transformer core. Therefore when you put a resonance capacitor don't let to store energy in the transformer core because is transfered to the capacitor....

Really I hope that this can be "easily readable" I think that it isn't necesary to say that my first language it isn't English...
Back to top
Thomas W
Tue Jan 05 2016, 09:00PM
Thomas W Registered Member #3324 Joined: Sun Oct 17 2010, 06:57PM
Location:
Posts: 1276
Buy an Arduino Due, then use it's PWM controls with integrated, built in deadtime control.
by hard coding it.

PIOA->PIO_PER = 0;
	PIOA->PIO_PDR = PIO_PA11B_PWMH0 | PIO_PA19B_PWML0; // enable PWM
	PIOA->PIO_IER = 0; // disable interrupts
	PIOA->PIO_IDR = 0xFFFFFFFF;
	PIOA->PIO_ABCDSR[0] = PIO_PA11B_PWMH0 | PIO_PA19B_PWML0; // assign pin to peripheral B

	pmc_enable_periph_clk(ID_PWM);
	
	PWM->PWM_WPCR = PWM_WPCR_WPKEY_PASSWD | (PWM_WPCR_WPRG4 << 2) | PWM_WPCR_WPCMD_DISABLE_SW_PROT;

	int32_t deadtime = 100; // set deadtime
	int32_t width = 500;
	int32_t duty = 250;	
	 // equal deadtime
	
	PWM->PWM_CH_NUM[0].PWM_CMR = (PWM_CMR_CPRE_MCK_DIV_8 & 0xF) | PWM_CMR_DTE | PWM_CMR_CALG;
	
	PWM->PWM_CH_NUM[0].PWM_CPRD = width;
	
	PWM->PWM_CH_NUM[0].PWM_CDTY = duty;
	
	PWM->PWM_CH_NUM[0].PWM_DT = 5 | (10 <<15);
	
	PWM->PWM_ENA = (1 << PWM_CHANNEL_0);

That is a snippit from an actual Atmel Studio program, but if you take some of those parts out and modify it for the Due (correct pins and peripherals) you should do just fine!
Back to top
Aburastas
Tue Jan 05 2016, 09:22PM
Aburastas Registered Member #58236 Joined: Sun Jan 03 2016, 10:37AM
Location:
Posts: 5
Wow! Thanks for the advice. I must confess that I never had programed an arduino.... Seem that I have a lot of homework to do. Anyway seem that the pwm function can be very interesting here.... I must study arduinos a bit.

About the mazili with the resonance capacitor.. Really can increase the input voltage. Suposing that it is at resonance all the power in the primary winding will pass to the capacitor

(1/2)*L*I^2=(1/2)*C*V^2 so vmax of sine wave will be about Vmax=(L*I^2/C)^(1/2) what's says that with an small capacitor enough we can increase the max output voltage.... So somebody has tried to make a mazilli with TTL mosfets like IRL540 or other with highest Vds??? In order to make it suitable to funtion with 5-6v??? I want to.get about 10-15Kv efficienly.
Back to top
hen918
Tue Jan 05 2016, 09:46PM
hen918 Registered Member #11591 Joined: Wed Mar 20 2013, 08:20PM
Location: UK
Posts: 556
That code isn't language for the Ardunio IDE, its for Atmel's own compiler.
I'll try to give some FDP5800s a go in a Mazzilli driver tomorrow. I'll use 6V, three turns around a fiddy flyback, a 6.6uf tank capacitor for a 44Khz tank and approx 18kv of output.
Back to top
Sigurthr
Tue Jan 05 2016, 09:59PM
Sigurthr Registered Member #4463 Joined: Wed Apr 18 2012, 08:08AM
Location: MI's Upper Peninsula
Posts: 597
Arduinos are slow unfortunately when it comes to RF, even low RF frequencies. With adjusting the registers directly you can get an UNO to cap off at about 70KHz pwm output and ADC read sample rate. I forget the exact numbers but I wrote a page about it on my blog a year or two ago when I wrote a program that lets you use an UNO as a real-time audio ADC PWM converter.

You're going to need a buffering/current amplification stage though because any FET that will switch decent currents will have a gate and miller capacitance greater than what an Arduino can source when you push the arduino's frequencies to maximum capabilities. I don't know how much current you plan on switching on the primary, but with only 6V in unless you only want a handful of microamps out of the HV side you're going to need to switch decent, multi-amp currents on the primary side. At this point you should take a step back and ask yourself what you're really accomplishing or gaining by trying to use a microcontroller instead of an off the shelf flyback controller chip.
Back to top
Thomas W
Tue Jan 05 2016, 10:37PM
Thomas W Registered Member #3324 Joined: Sun Oct 17 2010, 06:57PM
Location:
Posts: 1276
hen918 wrote ...

That code isn't language for the Ardunio IDE, its for Atmel's own compiler.
I'll try to give some FDP5800s a go in a Mazzilli driver tomorrow. I'll use 6V, three turns around a fiddy flyback, a 6.6uf tank capacitor for a 44Khz tank and approx 18kv of output.

Correct, but through some datasheet hunting, you should be able to port it.

While I am going to be working on doing that myself for a personal project, I haven't got the time for a few days/weeks due to workload.

Link2

with use of the internal PLL and some other wizardry, you should be able to get some pretty high frequencies of around 250kHz or more with dead time and PWM if you wish.
Back to top
Aburastas
Tue Jan 05 2016, 10:43PM
Aburastas Registered Member #58236 Joined: Sun Jan 03 2016, 10:37AM
Location:
Posts: 5
Well..
Hen918: yeah! That's just great!!! Really I'll wait for your results.

Sigurth: ok. A mosfet driver betwen arduino and mosfet is a must. I have said in the first post. But I understand long posts are ... Long jajaja about the adc .. I'm not an expert but reading I've arrived to the conclusion that comparison and the such is better if you do it by hardware utilizing only digital imputs as interrupts. Because adc is very slow. All that combined with the pwm function that pointed Thomas W. I think that can do the trick.

About flybacks ic chips... Are designed for a constant ouput voltage so Toff is constant. In capacitor charger aplications or when you short the output Toff vary very much. And can saturate transformer or turn on transistor with a lot of Vds. And I know that power will be miserable. But is for charge a hv capacitor.

And... A last question... How to tell to the driver (arduino or zvs....) when a capacitor is charged??? I has been thinking in a current transformer with a spark gap in serie. All that in parallel to the secondary before the diode.... But I don't know if such small current will be effective or I'll fry the CT.... Because once the spark is started ... Is near 0v but at the begining the CT see all the HV output, no?


Back to top
Sigurthr
Wed Jan 06 2016, 12:31AM
Sigurthr Registered Member #4463 Joined: Wed Apr 18 2012, 08:08AM
Location: MI's Upper Peninsula
Posts: 597
Ahh it's for a capacitor charger! Okay, this makes a bit more sense now. As far as determining when the cap is charged; voltage divider and comparator. Remember you'll want your voltage sense current to be lower than your charging current. There are comparators which will work reliably in the microamp range, which is what you'll want since you'll be charging only an order of magnitude above this.
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.