AC DC Switch Mode Supply Controller Via PSoC

A catchall for PSoC Mixed-Signal Array (microcontroller) discussions not captured by the other forums.

Moderator: ericb

AC DC Switch Mode Supply Controller Via PSoC

Postby dougwilliams » Sat Sep 17, 2005 10:53 am

Hi-
Just wondering if anyone has seen or made a switch mode controller for an AC to DC regulator. I'm looking to make a programmable current source and would like to see if anyone has done anything similar.

Thanks,
Doug
dougwilliams
Newbie
Newbie
 
Posts: 3
Joined: Sat Sep 17, 2005 10:49 am

Postby GHamblin » Sun Sep 18, 2005 11:00 pm

Hi Doug,
I've made off-line buck regulators. I don't imagine it would be too tough to create a more conventional switch mode converter. Perhaps a fly-back style converter. It's really going to depend on the details of your app. But, certainly the resources are there.


Glenn
If you understand it,
then it's obsolete!
User avatar
GHamblin
The Big Cheese
The Big Cheese
 
Posts: 291
Joined: Mon Dec 22, 2003 3:57 pm
Website: http://www.ghengineering.biz
Location: Tucson,AZ

Postby dougwilliams » Mon Sep 19, 2005 6:57 am

Thanks for the info - you wouldnt happen to have an example project I could take a look at? I'm looking mostly just for how you implemented the feedback loop / error control etc. I assume that was all with an amp in HW? That and have the amplifier control an external FET to avoid the high voltages on the PSoC itself. What I'm looking to do would be extremely similar to an off line buck - the current source would be provide a current as high as 1amp, the voltage would be in the neghborhood of about 4-40V. So basically a buck running off line AC downto lower voltage DC, but just looking to control the current rather than the voltage.
dougwilliams
Newbie
Newbie
 
Posts: 3
Joined: Sat Sep 17, 2005 10:49 am

Postby GHamblin » Mon Sep 19, 2005 12:12 pm

Hi Doug,
I've created bucks using two different methods. None of these has required isolation so there was no need for isolated feedback. Your app may or may not require isolation. The first method I used was using the internal SMP functionality of the PSoC in buck mode rather than boost. This is potentially the simplest way. However you need to deal with the High Voltage at a High frequency because the SMP operates at a nominal 1.3MHz. This can be tricky and requires expensive external switches. This of course is a voltage regulator by nature because it is regulating the supply voltage to the PSoC. So after that long winded answer its probably not what you want. The other method I used was with the limited functionality analog block in the CY8C21xxx parts. I essentially replaced the SMP functionality with an internal comparator, PWM(To generate a reference voltage that is ratio-metric to the supply), and a counter to provide a 100KHz clock that is gated by the comparator.
Now in your app you probably aren't using the converter to supply the power to your PSoC so I would think that what you need is to generate a reference voltage that is representative of the output current to compare to a reference voltage that you can vary to suit the required current and feed them both to a comparator that you can use to gate a suitable clock to drive your power switch. This method of hysteretic regulation (Bang Bang) can provide quite acceptable results with a reasonable output filter and is much less intense design-wise than a linear error amp approach. e.g. You get to avoid most of the Bode analysis. I know, I know, It's not truly hysteretic because your gating a clock. However, without the clock you'll need to ensure an ample amount of ripple on the feedback to ensure switch operation. You also have no way to guarantee a maximum on time. This can be dangerous at line voltages.

I've attached a project for you to look at.
I've also attached an app note that I never quite finished(against my better judgement :) ).

Glenn
Attachments
Buck the Boost.pdf
(138.89 KiB) Downloaded 897 times
TrSwSmall.zip
(481.6 KiB) Downloaded 629 times
If you understand it,

then it's obsolete!
User avatar
GHamblin
The Big Cheese
The Big Cheese
 
Posts: 291
Joined: Mon Dec 22, 2003 3:57 pm
Website: http://www.ghengineering.biz
Location: Tucson,AZ

Postby dougwilliams » Mon Sep 19, 2005 2:13 pm

Thank you, thank you. You are exactly right - I am not powering the PSoC off this converter - (in fact I plan on sucking power off the USB line for that purpose). I do need to isoltae the supplies though (AC line from output current supply - and PSoC supplies as well), so I'll have to work that in, and of course do the current control rather than the voltage controlled output. I should be able to tolerate a rougher mode of current control as well -
I only had a chance to open up the file you attached, but from what I saw they looked like a great starting point - I'll get around to taking a closer look in the next day or so.

Thanks a lot for the help-
Doug
dougwilliams
Newbie
Newbie
 
Posts: 3
Joined: Sat Sep 17, 2005 10:49 am

Postby alager » Mon Nov 28, 2005 3:27 pm

Glenn,

Your appnote is quite interesting. I have a couple of questions for you regarding the design. What transistors did you use, sine it's operating at 1.3Mhz? Also what input voltage are you assuming for the 10k flee power resistor?


Thanks,

Aaron
User avatar
alager
The Big Cheese
The Big Cheese
 
Posts: 506
Joined: Tue Mar 15, 2005 2:26 pm
Website: http://www.panamax.com
Location: Peteluma, CA

Postby GHamblin » Mon Nov 28, 2005 7:05 pm

Hi Aaron,
The version that the appnote is based on will start with Vin from 12 to 60VDC with the 10K bleeder resistor because the SMP will start running at about 1.3V with the rest of the PSoC not starting until around 2.8V.
I believe I used MMBTA06 NPN's and an MMBTA56 PNP in that version. While better transistors would have been nice cost was the major issue with efficiency pretty far down on the list. And those guys are about 3 cents in quantity.

Glenn
If you understand it,

then it's obsolete!
User avatar
GHamblin
The Big Cheese
The Big Cheese
 
Posts: 291
Joined: Mon Dec 22, 2003 3:57 pm
Website: http://www.ghengineering.biz
Location: Tucson,AZ

Postby RMorella » Thu Oct 26, 2006 7:22 am

Glenn,

I just dl'd the "Buck..." ap note and found it quite interesting. It brings all sorts of potential smart power supply applications to mind.

Are there any plans to release this ap note?

Also, any ideas on expanding it to include isolation?

Roger
RMorella
Cheese Cube
Cheese Cube
 
Posts: 31
Joined: Mon Mar 20, 2006 7:28 am

Postby GHamblin » Thu Oct 26, 2006 9:05 am

Hi Roger,
I've just been way to busy to get back to the appnote. I'd like to add some waveforms and additional info. Hopefully I can get back to it soon but for now I have to feed my family's horrible food addiction. :) And I'm sure that the current feast won't last forever!
I have also pondered an isolated version. I think a flyback topology is the way to go. This can still be quite inexpensive in volume if you get the right company to wind the transformers. I'm not so sure that there is a good off-the-shelf transformer that would fit the bill but, I've been wrong many times before. :)

Glenn
If you understand it,

then it's obsolete!
User avatar
GHamblin
The Big Cheese
The Big Cheese
 
Posts: 291
Joined: Mon Dec 22, 2003 3:57 pm
Website: http://www.ghengineering.biz
Location: Tucson,AZ

Postby lovell » Thu Oct 26, 2006 2:27 pm

Glenn there are a couple of torroidal transformer companies that have development kits to build your own for test. Of course using off-the-shelf is still the best cost.
Bill Lovell
User avatar
lovell
The Big Cheese
The Big Cheese
 
Posts: 665
Joined: Sat Dec 20, 2003 6:15 am
Website: http://www.c-linksystems.com
WLM: wlovell@c-linksystems.com
Location: Maine, USA

Postby GHamblin » Thu Oct 26, 2006 3:57 pm

Bill,
Thanks for the suggestion. When I get time I'll certainly look at that option.

Glenn
If you understand it,

then it's obsolete!
User avatar
GHamblin
The Big Cheese
The Big Cheese
 
Posts: 291
Joined: Mon Dec 22, 2003 3:57 pm
Website: http://www.ghengineering.biz
Location: Tucson,AZ

Re: AC DC Switch Mode Supply Controller Via PSoC

Postby DavidCary » Tue Oct 31, 2006 8:58 pm

dougwilliams wrote:...wondering if anyone has seen or made a switch mode controller for an AC to DC regulator...

Forgive me for wandering off in a tangential direction, but I am impressed by

Roman Black: The 3-transistor Black regulator

Roman Black: +5v to +13v Converter

With a proper transformer and rectifier, these might make a perfectly adequate AC to DC regulator.
DavidCary
Cheese Wheel
Cheese Wheel
 
Posts: 73
Joined: Sat Jun 17, 2006 8:51 pm
Website: http://opencircuits.com/User:DavidCary
Location: TULSA OK

Postby Who Knew » Sat Mar 22, 2008 6:09 pm

GHamblin wrote:Hi Aaron,
The version that the appnote is based on will start with Vin from 12 to 60VDC with the 10K bleeder resistor because the SMP will start running at about 1.3V with the rest of the PSoC not starting until around 2.8V.
I believe I used MMBTA06 NPN's and an MMBTA56 PNP in that version. While better transistors would have been nice cost was the major issue with efficiency pretty far down on the list. And those guys are about 3 cents in quantity.

Glenn

Hi Glenn and All,

I've got a PSoC (29466) application that runs on 24VDC, and I've been working on changing the 5VDC supply (only powers the PSoC) from a linear regulator (LM317) to an SMP-buck system, based on Glenn's "Buck The (SMP) Boost" application note (see Buck the Boost.pdf linked above).

For my test/dev circuit, I'm powering the PSoC with the typical adjustable LM317 circuit, so I can force the SMP to start and stop by adjusting the PSoC's Vdd voltage up and down.

The transistors I've been trying are the garden variety 2n2222 and similar NPNs, and 2N3906 and similar PNPs, as that is what's easily had from Radio Shack, which is only 1.5 blocks away from my place. (BTW, for anyone who buys Radio Shack's package of fifteen 2n2222, or package of fifteen 2n3906, don't be shocked to find that the package actually has five of the part number plus five each of two other part number transistors).

Essentially, it seems I can't get enough gain going in the NPN stages to correctly operate the PNP. When the SMP is stopped, the PNP turns off completely, and when the SMP is operating the PNP turns on completely and doesn't switch at the SMP frequency. Is this the way it's supposed to work? That is, is the PNP supposed to switch at the SMP switching frequency, about 1.3MHz, or is the PNP supposed to switch at the SMP-is-operating/SMP-is-not-operating frequency?

one thing that I did that improved things quite a bit, was to move the circuit from a solderless breadboard to a perf board and solder the parts, minimizing trace, wire and lead lengths, etc.

Regarding the first NPN, the one that's driven by the SMP, no matter how I bias the base, or what collector resistance I use, after the base voltage rises, the transistor just slews on (collector voltage ramps down), until the knee where the base voltage drops. At that point, the collector voltage slews back higher. The signal pattern looks like a saw-tooth or sine wave, certainly not square.

If you think the problem is the transistors I've selected, what datasheet specs should I be looking for to get suitable switching operation? Also, should I try the TO-92 case equivalents of Glenn's suggested MMBTA06 and MMBTA56? Or, do you think this isn't working because I've put it together using PTH parts, and it needs to be done in SMT parts in order to work, so I should just go ahead and do the layout in SMT and have some PCBs made?

As an interesting tangent to this, I thought I'd share an article that I found about a self-oscilating SMPS circuit that starts operation at just 260mV.
Who Knew
Cheese Wheel
Cheese Wheel
 
Posts: 145
Joined: Thu May 17, 2007 8:12 pm
Location: California, USA

Postby nan358 » Sun Mar 23, 2008 8:36 am

You may also find this article interesting: JFET-based dc/dc converter operates from 300-mV supply
nan358
The Big Cheese
The Big Cheese
 
Posts: 728
Joined: Mon Jul 02, 2007 8:12 am


Return to “%s” PSoC1 General

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron