Author Topic: Issues in designing a switchmode powersupply  (Read 1555 times)

0 Members and 1 Guest are viewing this topic.

Offline ray-san

  • Contributor
  • Posts: 14
  • Country: de
Issues in designing a switchmode powersupply
« on: December 27, 2016, 06:08:31 pm »
Hi there, i'm trying to edjucate myself in switchmode powersupplys. I've winded my own transformer for testing purposes with a ratio of 1:1 on a ferrite core witch i have salvaged from a PC powersupply. Im driving the primary from an atmel atmega with a frequency at arround 50kHz. I hooked the scoped to the PWM output of the chip without the transformer connected and i'm getting an almost clean square shaped waveform (with quite an overshoot, but i think, its ok).
Now when i'm hooking my transformer up the output, the waveform starts to getting very crippled and looks more as a loud noise than a squarewave. The same waveform i'm getting on the secondary side but with a very lower amplitude. I tryed to alter the duty cicle in a range from  ~25% up ~75%.
So why is this so? Can you guys give me some hints, what im doing wrong/how to do it right?
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: Issues in designing a switchmode powersupply
« Reply #1 on: December 27, 2016, 06:19:30 pm »
without a schematic no-one can see what did you do and where might the problem be.
 

Offline ray-san

  • Contributor
  • Posts: 14
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #2 on: December 27, 2016, 06:28:46 pm »
I understand your problem, but i dont have one, and i've found no good software for draw schematics which runs on linux, and hand drawing and scanning is also not an option at the time, because i'm visiting my parents during the holidays and my scanner is not sitting here :(

But my circuit is very simple. As i said, i've got an atmega with a pin with PWM output, so i hooked my transformer between this pin and ground on the primary. Nothing else than my scope is connected on the secondary site.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 2912
  • Country: fr
Re: Issues in designing a switchmode powersupply
« Reply #3 on: December 27, 2016, 07:00:16 pm »
Any version of Kicad will let you draw schematics, LTSpice runs in Linux using Wine, Eagle runs in Linux, there are tons of web-based systems (like Upverter), etc.
In the worst case you can always draw a picture on paper and take a photo using your phone. I am pretty sure someone around you has a phone with a camera these days.

You need to do a little bit more effort if you want others to help you.
« Last Edit: December 27, 2016, 07:10:22 pm by janoc »
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 4090
  • Country: nl
Re: Issues in designing a switchmode powersupply
« Reply #4 on: December 27, 2016, 07:08:04 pm »
Looks like your atmega does not have the power to drive the transformer.
Keyboard error: Press F1 to continue.
 

Offline ray-san

  • Contributor
  • Posts: 14
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #5 on: December 27, 2016, 07:26:34 pm »
Any version of Kicad will let you draw schematics, LTSpice runs in Linux using Wine, Eagle runs in Linux, there are tons of web-based systems (like Upverter), etc.
In the worst case you can always draw a picture on paper and take a photo using your phone. I am pretty sure someone around you has a phone with a camera these days.

You need to do a little bit more effort if you want others to help you.

Wine is not an option for me, because i'm running linux on a pure 64bit system and wine has a lot of this old legacy 32bit dependencys. But i've made a little handdrawn circuit for you and caputerd it with my smartphones cam  :)


 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1623
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #6 on: December 27, 2016, 07:36:14 pm »
You can't drive an transformer using dc. So add at least a capacitor for ac coupling, because you are driving the transformer using 0V/5V levels, therefore there will always be a dc offset.
An AVR can't drive much current, maybe +/-40mA max. Your transformer has probably a much too low inductance, so the current required is much higher.
The way you did use the transformer, isn't much useful for a switchmode powersupply, because the transformer only isolates the signal but does no voltage/current conversion like you expect from a switchmode power supply.
Where was the ferrite core placed exactly on the power supply?
Depending on the power supply topology there are different requirements on the construction of the transformer.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 1848
  • Country: sk
Re: Issues in designing a switchmode powersupply
« Reply #7 on: December 27, 2016, 08:33:38 pm »
actually you're lucky your atmega is still working ;)
i think you should go back to square 1 and read some theory first, then try to build a simple and crude circuit. first try to understand various DC/DC converter topologies : buck, boost, buck-boost ...and then go step further and try some circuits with a transformer (push-pull, half-bridge, fly-back, forward).
 

Offline ray-san

  • Contributor
  • Posts: 14
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #8 on: December 27, 2016, 08:44:31 pm »
You can't drive an transformer using dc. So add at least a capacitor for ac coupling, because you are driving the transformer using 0V/5V levels, therefore there will always be a dc offset.
An AVR can't drive much current, maybe +/-40mA max. Your transformer has probably a much too low inductance, so the current required is much higher.
ok, this might be an issue...i've done another few testings, and i recognized, the atmega gets pretty warm. Do you recommend me, to drive the transformer with a mosfet? And where is the right place for the capacitor then, if i drive the transformer with a mosfet/transistor? between pwm output and gate/base or between the fet/transistor and transformer? (I guess between fet/transistor and transformer)

The way you did use the transformer, isn't much useful for a switchmode powersupply, because the transformer only isolates the signal but does no voltage/current conversion like you expect from a switchmode power supply.
Where was the ferrite core placed exactly on the power supply?
I'm aware of that this is not a very usefull setup, its more to get the basics of a switchmode powersupply, to get a proof on concept, before i spent hours and hours on winding a transformer just to recognize that i did something wrong, probably on the lowest layer of the windings or so.

I don't remember where the transformer in the supply was placed because i salvaged it long time ago. I guess from somewhere on the "high side", but it was definitly not the main transformer, because it's just to small for that. I guess, it was used to power the chips for controlling the powersupply or stuff like that.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1623
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #9 on: December 27, 2016, 09:06:31 pm »
Before building a SMPS and winding a transformer I would start by using an unmodified transformer.
The first step is measuring the inductance of all windings. Without knowing anything about your transformer it is impossible to tell the correct way of driving the transformer.
If it was the +5V standby transformer, it has a rather low inductance and is designed to store energy during on-phase and release the energy during off-phase (flyback converter). You should drive the transformer using a transistor.

A great tool for designing transformers/inductors for most common SMPS topologies:
http://schmidt-walter-schaltnetzteile.de/smpshome/
 

Offline ray-san

  • Contributor
  • Posts: 14
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #10 on: December 27, 2016, 09:54:09 pm »
I would start by using an unmodified transformer.

I mainly agree with this, but they are rated for mains power/voltage. I don't want to mess around with that until i know, what i'm doing, so i decided to stick to low voltages, where i can play arround, do stupid stuff  to get the knowledge how this stuff works. So in worst case i blow up a 1€ atmel or a transistor/caps few cents worth each and at least, don't kill myself ;)

Thanks for the link, i will checkout the page and hopefully find some usefull information for me
 

Offline ray-san

  • Contributor
  • Posts: 14
  • Country: de
Re: Issues in designing a switchmode powersupply
« Reply #11 on: December 27, 2016, 11:51:53 pm »
update: changed my circuit a little bit, now im driving a mosfet from my atmega's pwm output, which (the mosfet) is connected to the transformer.

I hooked up a LED on the secondary side, and sees there, it lights up. Which means, im at least transfering some energy. But when i hook up a small lightbulb, it is not enable to power that. It may be an issue with my mosfets, because they are no logic level mosfets, they are might not "on enough" (logic level mosfets have been ordered, but didnt receive them yet), or my little transformer has to less windings or a combination of these. What do you think?

The picture i attach ive got from my scope, the yellow curve is from the atmegas output, the blue one is from the secondary side of the transformer

edit: i've attached  a picture of a similar core, which i'm using, i've wounded  13 turns on each side
edit2: attached schematic of the circuit how it looks like now
« Last Edit: December 28, 2016, 12:30:24 am by ray-san »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf