Author Topic: Transformer causing voltage spikes  (Read 4343 times)

0 Members and 1 Guest are viewing this topic.

Offline Red SquirrelTopic starter

  • Super Contributor
  • ***
  • Posts: 2748
  • Country: ca
Transformer causing voltage spikes
« on: July 03, 2017, 07:05:37 pm »
Just playing around with making a transformer, I don't need a lot of current, under 1 amp, basically I want to boost 7.4v (2 lithium cells) to around 12 to power a computer fan.  I'm not fussy about the exact voltage, so I decided to just go for a 1:2 ratio which will give me more voltage and account for diode/load drop.   5 turns primary, 10 turns secondary originally but it's a bit more from playing around with it.  The core is rather small, it's just a ferrite bead.  That may be part of my issue too.   About 0.08cm^2. 

I'm driving it using a 555 timer which is driving a low side (can that be an issue?) N channel mosfet.  Everything is fed from 5v.

Here is the wave form, the yellow is the output of the mosfet, the blue is the output of the transformer - I inversed it just to make it easier to read.   



Note the volt/div.  Getting 50 volts even on primary!  I'm actually feeding it with 5.  So it's almost like the transformer is causing back EMF or something, could that be?  Or would back EMF be going the opposite way?  I double checked that my probes are set correctly, ex: 10x and set 10x on scope, as that was my first suspicion.

I presume that what is happening is I'm saturating my core, does that sound right? 

This is output of 555 timer in blue:


 

Circuit is rather basic, got some pull up/down resistors in some places such as mosfet to ensure it does not stay stuck on and the transformer secondary has a high value resistor to act as a basic load, I also put a diode to try to force the voltage to stay on the positive side and act as basic protection for the load.  Not sure what good it's doing though as you can see in the scope it goes into the negatives a bit.   

I can make a schematic if you want, but here is a pic of my setup:




Mostly just curious about the voltage spiking and the odd wave form, I presume it has to do with my transformer design but curious what I can try to improve it.  Ex: if the core is too small, or if I need to use a normal E core etc.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Transformer causing voltage spikes
« Reply #1 on: July 03, 2017, 10:02:26 pm »
It looks like you've created a flyback converter. The output voltage will be much higher than the turns ratio would suggest because of the back-EMF.

The core looks as though it's much too small for the required output power level.

You don't need a transformer. All you need is to build a circuit known as a boost converter which just needs an inductor.
 

Offline Red SquirrelTopic starter

  • Super Contributor
  • ***
  • Posts: 2748
  • Country: ca
Re: Transformer causing voltage spikes
« Reply #2 on: July 03, 2017, 10:24:59 pm »
I would need a MCU or some kind of control circuitry for a converter, so trying to "cheat" with just a basic step up with parts I already have on hand.  I do eventually want to play with that stuff though. What is causing it to act as a flyback?  Is it simply the fact that it's too small and saturating? Though I would expect voltage to actually drop in that case, as it would start to act like a dead short. I have actually seen smaller transformers in mains applications, how do they do that?  Is it just running at a much higher frequency like in the Mhz range?

I kinda suspected it was too small, I can use a bigger core.  Another option is to just buy a cheap premade converter, but I'm doing this as a learning exercise too.  I eventually want to learn to build SMPSes so I want to familiarize myself with the transformer portion and get comfortable enough so I can put mains through one as a simple chop circuit would be the first step so that the buck/boost part can be isolated.

I used the formula on this page to get a general idea of turns:

http://tahmidmc.blogspot.ca/2012/12/ferrite-transformer-turns-calculation.html

Got around 4 required for primary so I went a bit higher as 4 seems kinda low and I may have used the formula wrong. 

But I'm not sure what to put for Bmax (flux density), how do I know how much flux I'm producing?  I just used 1500 as suggested but not sure if that number changes based on core size or other factors. I imagine it does.

Actually as a side note, is it necessary for a transformer to use AC specifically? I'm using pulsed DC, is that maybe my main issue? 
« Last Edit: July 03, 2017, 10:30:32 pm by Red Squirrel »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Transformer causing voltage spikes
« Reply #3 on: July 04, 2017, 01:02:02 pm »
I would need a MCU or some kind of control circuitry for a converter, so trying to "cheat" with just a basic step up with parts I already have on hand.  I do eventually want to play with that stuff though.
Or you could experiment. Build the boost converter, connect the fan to the output and gradually increase the duty cycle until the voltage across the fan is high enough.

If the core starts to saturate, then the output voltage won't get any higher and the input current will rise sharply, meaning you need to increase the inductance or frequency.

Quote
What is causing it to act as a flyback?
The fact you're interrupting the current though the coil which is attempting to keep it flowing, which would generate a theoretically infinite voltage. In reality the voltage will be limited by the parasitic capacitance and/or the breakdown voltage of the switch.
 

Offline Red SquirrelTopic starter

  • Super Contributor
  • ***
  • Posts: 2748
  • Country: ca
Re: Transformer causing voltage spikes
« Reply #4 on: July 04, 2017, 04:36:53 pm »
Yeah thought of that after, saturation would basically start to act as a dead short, so voltage would drop.

As for interrupting current, is that not normal in any type of pwm situation or even AC?  Or is it the fact that it is so abrupt?  Could the fact that I'm doing it low side have an effect as well?  I will have to experiment.

I also noticed that the duty cycle of the fet really drops at higher frequencies (even without transformer), 5v to drive a mosfet is kind of low right?  I may need a mosfet driver, and I could do it high side if I used a driver.  Something I need to read up on further and order anyway as I will want some for future projects such as experimenting with H bridges.

Actually, any good book/resources to read up on as far as magnetics go?  It's an area I want to get more familiarized with.  I have a basic understanding but not more than that.

For this particular case I may end up just doing boost topology but I want to see if I can get the transformer to work as a learning exercise as in lot of applications such as mains or mains referenced psus I'd want isolation anyway.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Transformer causing voltage spikes
« Reply #5 on: July 04, 2017, 06:13:34 pm »
What you have is a flyback converter which is a boost converter using a transformer. Rather than taking the inductive kick-back from the primary, with no secondary, you're taking it from the secondary.

The current is being abruptly interrupted, every time the MOSFET turns off, causing the field to collapse around the coil and a high voltage pulse generated.

Look up boost converter, before attempting to understand or design a fly-back converter.
https://en.wikipedia.org/wiki/Boost_converter
http://www.ti.com/lit/an/slva372c/slva372c.pdf
 

Offline Red SquirrelTopic starter

  • Super Contributor
  • ***
  • Posts: 2748
  • Country: ca
Re: Transformer causing voltage spikes
« Reply #6 on: July 04, 2017, 07:11:58 pm »
Yeah I read briefly on those, but how do I make mine behave as a transformer?     How is it done to prevent fly back?  Is it because it needs to be true sine so the cut off of each pulse is not as abrupt?

That said I could change my plan and do a boost converter as it will be fine for this particular project instead of transformer but trying to learn how to do a transformer as in some cases I might want isolation.  Ex: certain sensors/controls where I want to pass power to a MCU that is on the sensing side, then data would be sent back through octocouplers.  So I'm thinking in cases like that I'd use a tiny 1:1 transformer to supply enough power for the mcu/sensors etc.

Or is pulsed DC not proper for that?  How is it typically done in a SMPS to step down from mains? 
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Transformer causing voltage spikes
« Reply #7 on: July 05, 2017, 08:10:07 am »
Yeah I read briefly on those, but how do I make mine behave as a transformer?     How is it done to prevent fly back?  Is it because it needs to be true sine so the cut off of each pulse is not as abrupt?

That said I could change my plan and do a boost converter as it will be fine for this particular project instead of transformer but trying to learn how to do a transformer as in some cases I might want isolation.  Ex: certain sensors/controls where I want to pass power to a MCU that is on the sensing side, then data would be sent back through octocouplers.  So I'm thinking in cases like that I'd use a tiny 1:1 transformer to supply enough power for the mcu/sensors etc.

Or is pulsed DC not proper for that?  How is it typically done in a SMPS to step down from mains?
I think I see what you mean now.

Technically there's no such thing as pulsed DC. A square wave with a 50% duty cycle going from 0V to +5V is really just 2.5VDC + +/-2.5Vpeak AC square wave.

The fly-back effect occurs because when the transistor turns off, the primary of the transformer sees an open circuit. If a diode is added, in reverse parallel with the primary, then there will be no fly-back effect because the current will keep flowing. Unfortunately that will result in a net DC in the primary, which can cause core saturation. A better solution is to drive the transformer from an h-bridge with a 50% duty cycle square wave (not net DC in the core), then the impedance seen by the primary will be low in all parts of the cycle, so there will be no sudden interruption of the current and no fly-back.
 

Offline Red SquirrelTopic starter

  • Super Contributor
  • ***
  • Posts: 2748
  • Country: ca
Re: Transformer causing voltage spikes
« Reply #8 on: July 05, 2017, 04:15:44 pm »
Oh ok I was kind of suspecting that, so essentially I need to reverse the direction of the wave and alternate for each cycle so rather than stopping the current I just reverse it.   So H bridge or maybe push pull with centre tap. Was reading up briefly on that.  It adds more complexity though as I don't think I can easily do that with a simple 555 timer output.    Though there might be some trickery with transistors I can do to make one fet turn on when the signal is low and the other turn on when it's high.   Logic gates?  Need a small delay to compensate for turn off time though as don't want both on at once.  But for this particular case of a low current situation it probably matters less. 

How do most SMPSes do their input side transformers? The controller would be on the other side and rely on the transformer already working, so whatever powers that transformer needs to be independent of it.  I feel like what I'm trying to do probably already has a simple way that I'm just not seeing. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf