Simple Switching Regulator

Discussion in 'The Projects Forum' started by Wendy, Mar 24, 2008.

  1. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    I'm thinking of building a simple switching regulator to convert automotive 12VDC to 5VDC. I've drawn a simple concept circuit, haven't calculated the component (that is actually the easy part). I thought I'd put it up here for peer review before I waste any solder. Thanks.

    [​IMG]
     
    Last edited: Nov 9, 2008
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    What is the expected load on the 5 volt source? It isn't real satisfying to put in a 65 cent 7805, but they get the job done.
     
  3. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,683
    900
    My first question is whether you are doing it for the experience or to get a certain job done. If it's the former, then go at it. I just spent a month playing with similar circuits to better understand why one needs the inductor. My conclusion: you can get it to work, but you won't come near having the built-in control that an inexpensive chip provides. If it is to get a certain job done, buy a chip.

    Here is one of my favorite diagrams from an application note by the Lords of Switchers, Linear Technology.

    John
     
  4. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    One problem with something like 7805, if you draw .5A then you are disipating well over 3 Watts. This will likely fit in a cigarette lighter adaptor, with the fuse being the center pin, I'd prefer not to melt the plastic. While some of the parts in the switcher would get warm it shouldn't be close to .5 Watts, at least that is the theory. The other issue, which relates to waste heat, is efficiency. A 1 Amp load on 5 volts should be around .4 Amps on the 12 Volt side.

    I'm more interested in keeping the magic blue smoke in all the components at this point, I'll post data on the final build if it works.

    I wanted to help my boy with his MP4 player, and when my phone charger came apart seeing the components inside got me to thinking. A lot of these devices seem to hover around 1 Amp as a charge current for some reason.

    I'll probably add a 6.4V zener on the output for crowbar protection. I was also concidering the load on the op amp, a darlington might be called for there, or maybe a MOSFET.

    As to getting the job done or getting experience, I'd have to answer yes to both.
     
  5. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,683
    900
    If it is going into the cigarette lighter of a car (are they still called that?), be sure to include short-circuit protection for the switcher. That is one of the controls that comes standard with the chips. John
     
  6. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    I thought that was what the transistor was for, or was that the fuse? :D
     
  7. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,683
    900
    I see a couple of comparators, but not transistors. Are you referring to the diode? That is not short-circuit protection. John
     
  8. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    Uh, the op amp is feeding a PNP bipolar transistor, that is being used as a series pass. While I was joking about the transistor protecting the fuse, there is a fuse shown.

    I mentioned using a zener as a crowbar because if the voltage exceeds the zeners backvoltage it would conduct, blowing the fuse. I do not have a crowbar shown on the diagram, it was an afterthought at this stage.
     
  9. S_lannan

    Active Member

    Jun 20, 2007
    247
    2
    heres the chip based converter
     
  10. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    Interesting. How big do you think the transformer will be?

    Size matters in this application. Small is sexy. I am going to have to look up the chip specs, I'm always open to new (to me) devices. Thanks.
     
  11. S_lannan

    Active Member

    Jun 20, 2007
    247
    2
    heres a buck converter that does the same job
    this would be smaller and easier to construct.
     
  12. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,683
    900
    It was late for me and I didn't realize you were joking. That pass transistor does in fact work like a fuse. I blew two of them. I used a LM393 dual comparator and the F9Z34N P-mosfet. What I really meant was a reversible shut-down, like the MC33167 and many others offer. I could get 5 to 6 A at 12 to 24 V from a 30 V supply for short periods with the LM393 switcher, and the transistor got warm, but not burning hot. But, I could still get it into oscillation and it lacked the non-destructive shut-down. The parts count was also higher than with the MC33167.

    Good luck. John
     
  13. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    Price also counts towards this. I pay about 2 cents per resistor, and have 1558 Dual Op Amps out the wazzu. I'm also a big fan of KISS. If that fuse blows, something has gone so wrong that I need to look closely at it anyhow.

    I can see several potential problems that might occur with my design, which I whipped out using classes from long ago and designs I used to repair for Collins Radio. Slew rate is one, and the fact that an average transistor only has a gain of 50-200. Nothing that can't be worked around, but I will have to test it pretty throughly.

    I always like looking at other ways of doing things though, so I usually take the time to look into the other chip specs. But between what is in my parts bin (which is pretty deep, I've been doing this a while) and buying something new KISS rules. I've even bought an impulse sealer to customize bags to keep this stuff sorted.

    I'm pretty lucky in that BG Micro is right down the street from me, we have the same zip code, and they don't mind walk ins. The lady behind the counter has a great dane that still thinks its a puppy (but full grown), so it's a good thing I like dogs. This dog has one brown eye and one blue eye, startling but attractive. There are other good electronics houses scattered around Dallas, but I've noticed that there are fewer all the time, which I find a little distressing for the health of the country.

    For those who have never heard the expression, KISS = Keep It Simple Stupid.
     
  14. S_lannan

    Active Member

    Jun 20, 2007
    247
    2
    Bill, could you please give me an explanation on how your circuit achieves pulse width modulation?

    cheers
     
  15. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    Not too hard, if the output voltage is below the voltage set by the reference zener (I really need to put some designators on that schematic) then the comparator and schmitt trigger turn the transistor on. The schmitt trigger prevents the transistor from ever operating in a linear mode. When the output voltage exceeds the reference voltage the transistor is turned off. Thinking about it, I could probably eliminate the comparitor and use the schmitt trigger for both, but for now I'm keeping it in there. The levels the schmitt trigger flips at isn't too important either, as the open loop gain of the comparitor will feed whatever it needs.

    There is another mechanism occuring which should boost efficiency quite a bit. When the transistor is turned off the coil dumps its charge into the capacitor, using the diode to ground the charge, and when the transistor turns on the coil builds a field that will store energy. The end effect of the coil / capacitor is to filter the output to an appoximation of DC, with a ripple centering around the target voltage.

    The frequency the switching occurs is a function of the load, coil, and capacitor. It's one of the parameters I plan on capturing, since it is an easy one with most DVMs with built in counters. If I can get my hands on a scope, or if the old HP scope I have buried in the garage works, I'll measure the P-P ripple, but it has been decades since I've powered it up. If it is dead I'll have to make to with an AC measurement, which is not a good way to do ripple measurements, or figure out where to beg or borrow an oscope somewhere. As load is increased the rate of switching will also increase, I suppose there is a possibility of using that as a digital current sensing somehow. If I ever want to complicate the design that would be the mechanism I'd use for current foldback.

    This is about as basic a regulator as can be built in the switching realm, no protections other than the fuse.

    I am world class procrastinator, so it will take a little while.
     
  16. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    OK, I updated the schematic with designators and values, except for the cap and the coil. I've bought a coil, somewhere around 10Mh I believe, could be smaller, buried as usual. The cap I'll dig in my junkbox for.

    I'll use a sharpie and make a simple PC board, surface mount all the regular parts, which won't actually be surface mount (why drill holes?). I think I'll test the first build to distruction to see how far it can go, assuming it works.
     
  17. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,683
    900
    Hi Bill,

    Do you really mean milli-H? At what current? I have attached a schematic of the comparator-based design I did a few weeks ago (before deciding to go with the MC33167). It is intended to supply about 6A. If you ignore all of the digital pot stuff and some other extraneous parts, you will see the similarity to your design. Somewhere around 80 to 200 micro-H seems about right. The MC33167example uses 190 micro-H.

    For some reason, the attach files dialog seems to be down. But, I have had such computer problems this week, the issue may be on my end. Can't even do spell check.

    Will send schematic whenever possible.
    John
     
  18. Wendy

    Thread Starter Moderator

    Mar 24, 2008
    20,765
    2,536
    Yep, milli-Henrys. I'm thinking about going for a MOSFET, but I've never designed with one of those. I've started laying out a simple PCB for it, really simple, using Paint to lay it out and a sharpie to make a resist pattern. I'll post them when I'm finished.

    I have another idea tickling the back of my mind, not sure if it's practical, using 555 or 556's instead. The 555 has a comparitor circuit and a schmitt trigger in its design. I'll go with the dual op amp for the first one though, since I'm pretty sure it will work. These are the kind of designs you drop into a cookbook if it works.
     
  19. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,683
    900
    Hi Bill,

    I have about given up on the other computer for awhile. Here is the circuit I promised in my earlier post. The inductor is scaled for 6A or so.

    John
     
  20. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hey Bill,
    Have a look at this page:
    http://www.dos4ever.com/flyback/flyback.html
    About 1/4 of the way down the page, you'll see a schematic for a switching flyback supply using a 555 and a MOSFET. Good scoop on winding your own coils/transformers, too.

    Sharpies work fairly well for doing your own PCB's, but red STAEDTLER Lumocolor pens for transparent overhead projection work quite a bit better. Kind of hard to find, though. :(

    If you have a laser printer, check out Tom Gootee's page:
    http://www.fullnet.com/~tomg/gooteepc.htm
    Pretty detailed instructions for using your laserprinter's toner as etchant resist via heat transfer from photopaper ;)
     
Loading...