Does this switch mode buck convertor design look OK? - Page 1
Forum section: electronics / projects

author: mosafet
author_rank: Contributor
timestamp: January 19, 2019, 11:32:41 pm
content: I'm playing around with a switch mode power supply design. This is just experimentation on my part nothing important. I'm just learning electronics.Does this design look OK? I'm about to etch a PCB for it. It uses a STM32 for as the driver. Yes, I know a dedicated SMPS chip would work easier/better but I love my software and microcontrollers. I currently have it running open-loop on a breadboard and it seems to work. I didn't have room to hook up the SENSE yet.Only problem I ran across is once I accidentally reset the MCU while it was running driving a 1K ohm load and I heard a "snap" (ie. something may have arced). No damage that I could find. What could have caused that? I believe the driver MOSFET went from 50% duty at 500kHz to either solid off or on when the MCU reset. I think it turned the MOSFET on solid 100% (in theory that was OK though).Edit: to attach larger schematic picture. Change subject from SMPS to "buck converter"

author: ogden
author_rank: Super Contributor
timestamp: January 20, 2019, 12:04:58 am
content: Quote from: mosafet on January 19, 2019, 11:32:41 pmNo. It has many problems. Sorry, but SMPS *design* is one of the worst possible projects for beginner. Either 1:1 copy some proven design (including PCB) or reconsider your project completely. You may want to read ST application note AN4449. Also you may want to just buy STM32F334 Discovery kit, play with it first.

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 12:32:54 am
content: Quote from: ogden on January 20, 2019, 12:04:58 amI forgot to mention that I build everything from scrap parts so buying stuff is more of a long term goal when I have money.Just saying "many problems" is not very helpful. What problems? I read the note and I don't see the problems. I don't need boost, only buck and my circuit is similar. This isn't powering a heart monitor...I always learn this way. If you tackle something hard you gain much more in my experience. Sometimes you have to blow stuff up to learn. I'm careful to not do anything dangerous to myself. Parts on the other hand, not so much.I already designed and have running a separate boost converter to boost 5V to 500V and I weld with it...

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 20, 2019, 12:46:44 am
content: Your schematic is posted in a too low resolutioin and I won't bother looking at it closely.A few things I can say though:If you want to build your SMPS properly and do the algorithms in software, then put a decent MOSfet driver chip between the uC and the FET.There are also a multitude of SMPS supplys available from Ali / Ebay / Banggood / China / Etc nowadays for low prices.It's hard to beat those with a home built design.For example take the USD 25 DPS5005, which delivers up to 50V and 5A.It's also got an STM32 in it, and if you want to toy with software you can have a look at the opendps project, which is on github as an alternative firmware for this thing.

author: ogden
author_rank: Super Contributor
timestamp: January 20, 2019, 12:55:29 am
content: Quote from: mosafet on January 20, 2019, 12:32:54 amYou have problem with converter topology and mosfet driver, not to mention missing capacitor after rectifier.This is buck converter, not what you are "designing":https://en.wikipedia.org/wiki/Buck_converter

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 01:01:17 am
content: Quote from: Doctorandus_P on January 20, 2019, 12:46:44 amSorry, I didn't realize how low it was. Here is a giant one (also will edit OP).Yes, a dedicated driver is great but I'm working lower level than that. People are too spoiled just buying everything in one black box these days. The DMP2035 I'm driving the FET with can do 20V at like 5A but I'm only doing a fraction of that. I can see perfect FET activation on the 'scope.

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 01:10:00 am
content: Quote from: ogden on January 20, 2019, 12:55:29 amThanks.Updated subject. Looking in to the driver. All I know is it works fine but maybe under some conditions bad?No switch mode example I have seen uses a capacitor right after the rectifier. They have it after the coil like I do.

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 01:19:43 am
content: I would like to add a shunt so I can measure the current but I don't know if I will be able to get enough resolution on the ADC without an amplifier. I don't want to add even more parts, haha. Hmmm. I guess I could use a relatively large resistance shunt since I don't need 50V out of this thing. I will experiment.

author: ogden
author_rank: Super Contributor
timestamp: January 20, 2019, 01:23:10 am
content: Quote from: mosafet on January 20, 2019, 01:10:00 amSource:http://www.learnabout-electronics.org/PSU/psu31.php

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 01:26:44 am
content: Quote from: ogden on January 20, 2019, 01:23:10 amCool, thanks! I'll put that in. It actually was something I thought of doing before but like I said, the examples I have don't ever show that and I wonder if it's actually necessary. I only see 40mV ripple on my final output. I can see why it would be good to have it though because the half sine waves might get chopped at varying angles leading to instability when under high load.In case anyone is wondering, I'm using a 60W incandescent light bulb as a load. It pulls about 30W at 55V DC output.

author: ogden
author_rank: Super Contributor
timestamp: January 20, 2019, 11:29:57 am
content: Quote from: mosafet on January 20, 2019, 01:26:44 amSure. Upstream power source is usually omitted. Example design of the automobile wheel does not necessarily include drawing of the engine or other parts of the automobile power train.Actually you shall pay even more attention to buck converter topology. Notice that buck converter have common ground, high side switch transistor:Circuit of your converter does not look like that.Quote55VDC seems like 100% duty cycle for yourbuckconverter which essentially means - it isnot operating. You shall test at lower output voltage, like 12V.

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 03:07:20 pm
content: Quote from: ogden on January 20, 2019, 11:29:57 amRight because you can use either a high-side or low-side design. That is a high-side circuit. Mine is using low-side because it's slightly easier to control the gate. This is fine if the load can float.QuoteRight, I was just giving that out as the max value (100%). At other voltages the wattage is less. It works.I also noticed that my schematic as drawn here is wrong. I did the breadboard first and messed up the MOSFET driver section when drawing the schematic. I'm considering other driver options if I can scrounge the parts. I really dislike P-FET's.

author: ogden
author_rank: Super Contributor
timestamp: January 20, 2019, 03:23:06 pm
content: Quote from: mosafet on January 20, 2019, 03:07:20 pmYou may use low side buck for current supply like LED driver, but not for voltage supply which needs voltage monitor. Ground of your supply is not tied to ground of the microcontroller - how you can (correctly) measure output voltage?QuoteThen fix your schematic and re-post it!Driver you are showing, with 10k pull-down resistor, is not able to switch power mosfet at high frequencies at all. If you say it is working then - could you please show 30% PWM duty-cycle voltage waveforms of power mosfet gate, output (virtual) ground and positive terminals?

author: mosafet
author_rank: Contributor
timestamp: January 20, 2019, 03:52:27 pm
content: Quote from: ogden on January 20, 2019, 03:23:06 pmOK, yes, I see the problem and I was not using the sense yet. Now THIS is why I asked if it looked OK because this is obviously something I need to fix. I'll re-sort it and rework the FET driver for high-side. More complexity