587,043 active members*
3,020 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Home grown switching power supply
Results 1 to 18 of 18
  1. #1
    Join Date
    May 2007
    Posts
    15

    Cool Home grown switching power supply

    I've been there and done that with respect to linear power supplies with cinder block size transformers. I'd like to explore the area of taking a high potential source, chopped at dynamically changing duty cycles, to achieve a constant output DC voltage.

    What I had in mind was to use a LM339 quad voltage comparator, zener diode, power mosfet, and humungous electrolytic capacitor.

    I will assume that the input AC mains power is rectified and filtered the same way in a linear supply. I'll refer to this available, high voltage DC source as "mains".

    Connect the mains to the negative side of the voltage comparator, through a 1Mohm resistor. At that same terminal of the comparator, connect a zener diode, of the desired output voltage, to ground. This will present a constant voltage to the comparator, as long as the mains is greater.

    Connect the output of the comparator to the gate of the power mosfet. Connect the mains power to the Source of the MOSFET and the Drain of the MOSFET will go to the positive terminal of the electrolytic capacitor. The negative of the capacitor will connect to Ground. The positive of the capacitor will feed into the positive side of the comparator. Once powered up, the voltage comparator will allow the MOSFET to conduct when the capacitor voltage is less than the desired reference voltage, and it will turn the MOSFET off when the voltage is greater than the desired output. So if the desired voltage is 14.4 volts, then I want the comparator/MOSFET pair to keep it between 14.39 and 14.41.

    The issues that I know of are:

    1. Voltage comparator has to be able to fast enough to recognize changes in capacitor voltage as compared to reference voltage.

    2. The MOSFET also has to switch fast as well as be able to handle the available mains voltage at its Source terminal.

    3. Possible drifting of zener voltage with temperature, although I think there are two temperature dependent factors that supposedly balance each other.

    I've had two electrical engineers doubt this is a good design, but no one can explain why.

    I just want the ability to change out zener diodes and get different outputs as well as have high efficiency.

    Any input is greatly appreciated.
    All your base are belong to us. You are on the way to destruction. You have no chance to survive make your time.

  2. #2
    Join Date
    Aug 2006
    Posts
    2758
    Quote Originally Posted by tiger762 View Post
    I've had two electrical engineers doubt this is a good design, but no one can explain why.

    Any input is greatly appreciated.

    Explanation: No current control. RDson and the output capacitor's capacitance value determine the time constant of the charge circuit. Switching delays will make it very non-linear. Introducing an inductor on the charge circuit, in order to control charge current, will make it become a traditional switching power supply type (once you add a couple of components to compensate for the effects of the inductance, and improve on the output voltage control circuit )

  3. #3
    Join Date
    May 2007
    Posts
    15

    I was thinking of using an RFP12N10L MOSFET

    Made by Intersil, I believe, because of the simplicity of it being TTL compatible. In layman's terms, a TTL "1" at the gate will make it be fully "ON". Its specs are 100V max, 12amps max. Yeah the delay incurred by the voltage comparator (LM393, low-power dual) is between 0.3 and 1.3us, depending on how much the delta-V at the inputs is. So I was expecting to see a switching frequency of several hundred kilohertz. During that delay, the MOSFET will stay in whatever state it is in, and be overcharging the capacitor or allowing its charge to be depleted for too long. But that's why I would use a huge (80,000uF) capacitor in the first place. Something that can source a lot of charge with minimal voltage drop.

    I guess I'm going to just wire it up and see what happens. I just got in a large order from AllElectronics, including every value of zener diode they carry (3.3V up to 51V), and 20 each of the comparators, MOSFETS, and some other chips.

    Thanks for your reply.
    All your base are belong to us. You are on the way to destruction. You have no chance to survive make your time.

  4. #4
    Join Date
    Nov 2007
    Posts
    55
    considering your capacitor is discharged and your mains is 100V, initial charging current is 100V/.2ohms = 500A.

    mains go to drain, by the way. if I am right you want to put the MOSFET above the capacitor, just like in a buck regulator. if that is so, the comparator may not be able to drive the MOSFET even if it can be driven TTL level. you will still need a bootstrap circuit.

    hysteretic supplies share the same idea. your switching frequency will be dependent on your load. you must have a pre-load.

  5. #5
    Join Date
    Jun 2007
    Posts
    3734

    Cool The easy way..

    1). Use a UC3842/3/4/5 family of current mode chips. (different max duty cycles).

    2). Use the application notes on the chip.

    3). To regulate output use a TL431 measuring output, driving an opto coupler.

    4).The output of the opto coupler shorts out reference input on the 3842.

    5).Overcurrent on output also drives the same opto.

    6).These chips have their own oscilator, comparitor, voltage reference, MOSFET/IGBT current limit, and undervoltage protection.

    Smoke tests become rare with experience.
    Always use a resistor of at least 27 ohms in series with the gate.
    Don't turn them ON too quick (high current spkies from diode reverse recovery time being too short)

    or OFF too quick (big inductive spikes where you least expect them)
    Attention to detail is a MUST.
    You must consider the current paths through every high current part of wiring.
    Put the driver chip close to the MOSFET/IGBT. Keep Gate/Drain current paths direct to driver chip, with no other common connections along these wires.
    ALL WIRES HAVE INDUCTANCE, which becomes very obvious when creating switchmode power. Invisible voltage spikes are usually the cause of mystery failures.
    The application notes, followed very closely give really good results.

    :wave:
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  6. #6
    Join Date
    Dec 2005
    Posts
    3319
    SWitching BIG inductive and/or capacitive loads with semiconductors can not be done with brute force. Things go "bump in the night" and bizarre things happen when electrons go ashtray (sic).

    Kreutz's opservations about some things lacking in this variation of a switching power supply are worth considering. Switchers not only "switch" but also recover energy that is induced or goes wanting/lacking. IT is also recovering energy that tries to do nefarious things to the pass elements.

    This much I learned from my experience with SMPS's - it aint that simple to simply switch the power off and on so as to regulate voltage AND power regulating IC's designed for SMPS's are worth their weight in gold. They do too much in one package to NOT use them - especiallly with some of the "free protection scheme's" they offer.

  7. #7
    Join Date
    Nov 2007
    Posts
    55
    switcher's became my first tutor on why I should be too keen to details when wiring and doing PCB layouts. what you think may be working on your schematic may not be working on your prototype. the time when all those hidden schematics come to play.

    they are not the easiest projects on electronics land. I love them though. one good challenge especially when you're already thinking resonant switching.

  8. #8
    Join Date
    Nov 2007
    Posts
    55
    if you have to wire them on protoboard, always twist pairs of current source and current return path. use kelvin connections especially on the gate drives (never use the same wire for high current return path of drain to source for driving the MOSFET's gate to source, use separate wires, the inductance can blow that MOSFET).

  9. #9
    Join Date
    Nov 2007
    Posts
    55
    when you already gain experience here (especially on the controls, it's not simply when I reach this level MOSFET turns off there are lots of dynamics to stability) consider using average current mode. they're much better based on my experience in SMPS.

  10. #10
    Join Date
    May 2006
    Posts
    6
    Hello smps modifiers
    I presume there are several ways to make use of at/x smps. you can use them
    as they are and connect in series as mentioned in another thread but they seem to be too bulky and big. I would be interested to modify the existing smps to get only 5v and 12v from a 400w atx smps. any working mods in this aspect would be highly desirable. I am in process of the same and would welcome inputs. I am testing out the smps with variable loads and other stuff and have yet to remove the main transformer and rewinding the windings!. waiting for help/assistance/colloboration?
    regards
    dr.sanjeevi rao s

  11. #11
    Join Date
    Nov 2007
    Posts
    55
    if you'll only need the 5V and 12V then the PSU is adequate as much of the power rating is based on the 12V output. If you need a higher supply voltage you need to rewind the transformer and the inductor (although the old inductor might work). if dynamics are not well too important the old control loop compensation may still be used.

    if you want to do the transformer winding based on calculation then you will need to measure area of the center leg (if unsure of the transformer size), know switching frequency, etc. what I would normally do is to take off the transformer, count the old windings (they worked anyway), adjust secondary winding turns and wire gauge.

    for the inductor, the higher the inductance the smaller the ripple but current slew is slower.

  12. #12
    Join Date
    May 2006
    Posts
    6
    hello rdpzycho,
    did u rewind the transformer and what are the winding details. I know they vary from
    smps to smps but not much. I and most others would be interested to modify one
    400W atx smps to give 5v and 24v with max permissible/possible current.
    regards
    dr.sanjeevirao s

  13. #13
    Join Date
    Jun 2007
    Posts
    3734

    Smile Count turns.

    Make the primary the same, including ALL LAYOUT and physical anomalies.
    (they are there for a reason. Be very careful with insulation between turns, as you often get GREATER THAN 10 volts/turn! If you have to split the core, it is very important that any original airgap is the same. DON'T CHANGE THIS.:nono:
    If the primary does not need to be disturbed, leave it.
    Count the turns on the secondary (12v) and scale up say 4 times for 48 volts. No point calculating for the core as the primary dicates what was there originally.
    Winding wire is usually LITZ, (mutistranded) and the size of the individual wires is the most important part. Try to make the finished winding fill the window, and pick the right number of small wires so it will all fit.
    At these frequencies, the magnetic fields within the wires causes cancellation of currents, and the currents only flows near the surface of the wire, so making a wire bigger has negligible affect on the impedance. Use the size of the wire you found on the low voltage windings as a guide. Look at the name plate ratings on the power supply, to get some idea of each of the ratings. Don't just base it on the 12v specs.
    The purpose of other auxilliary windings must be fulfilled, if they are not just the original 5v/12v volt outputs. There are many and varied reasons for other windings.
    Maybe to supply the SMPS main chip, for voltage sensing an feedback, and others. The importance of these anomalies will make or break the project!
    The output voltage control mchanism must be identified, andf modified so that the regulation (both voltage AND overcurrent works as designed.)
    You must ensure the output rectifiers are rated suitable for voltage, current AND SPEED. for 48v output the voltage rating would need to be at least 100v in most cases. Don't just try one big electrolytic on the output. Five or ten in parallel will help stop them cooking, and you won't have to find some rare LOW ESR capacitors. Most output chokes you find will be good enough, but but you may have to double the number of turns for 4 x the output volts.
    Again, the LITZ wire rules apply.
    For safety, use an ISOLATION transformer while experimenting and testing.
    Put a 100 watt or 250 watt in series with the mains side, and you will be able to SEE the current, or the onset of an unexpected problem. :devious:
    For final testing, remove the isolation transformer, and EARTH one side of the output . Primary to Secondary (any leakage above 5mA is dangerous) :nono: leakage, may become apparent, at no load, by the light globe indicating some current. Power consumption should be below about 10-15w at no load. Any higher needs further investigation.
    Over a number of steps, keep increasing the load and running for 10 minutes or so at each step, monitoring the temperatures of everything, using an IR thermometer, (You will blow up the SMPS with great care this way and be satisified you found the limit!:withstupi), which is a very important tool for this job.
    Lots of automotive light bulbs in series make a good cheap load, and you can see any changes in performance. Four x 12v 21w turn indicators in series, gives 84W. You need 4 or 5 sets for a full load test.(flame2)
    Wean it off the light globe(s) and transformers when all is well.
    This is all not an impossible task, but is not trivial.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  14. #14
    Join Date
    Nov 2007
    Posts
    55
    well said neilw20. preserve all wires that you will get from the transformer. there will be one auxiliary winding that will power the chip on the primary side, though some PSU I found, have the chip on the secondary side and controls the MOSFETs through smaller transformers (don't change anything on them. they were designed that way in the first place).

    there are some designs that do interleaved windings (only once have I encountered them, and is an old supply). there were 3 layers of the 12V windings, connecting them in series can already generate 36V.

    if you can not remove the transformer without damaging them that's the only time you really need to calculate windings. so I am advising that you really be careful in removing the transformer's windings. (if you don't have a similar insulating tape, you might as well save them). as what neilw20 said notice any anomalies within the structure, there are purposes for them like creepage, proximity effect reduction, etc.

    you may need to trace the schematic so you can find the feedback resistors to modify and the current sensors (I don't modify the current sensors but I always make sure that anybody else who uses the supply knows that limitation. it can easily burn the supply if proceeding without caution. :nono

    if you don't have IR thermometer you may use a crude LM35 sensor. may not be able to give exact temps but gives you an idea. you may need lots of them. when you get used to the temps most of the times you can tell by touching what the range of the temp is. but you should know that there may be fatal high voltages on some parts so proceed with caution. only real whackos enjoy being electrocuted (8kV once woke me up when I was dizzy doing an ESD test using a homebrew gun without proper energy limits. )

    I forgot about the output rectifiers. you have to replace them. most supplies I found use rectifiers rated at 50V. if the output capacitor can handle the voltage (I always derate by a factor of 50% or 1.5 times the max voltage) keep them. you may need to find low esr caps but if you can not find or afford them for experiment use small caps in parallel. ESR can kill a cap and make it go BOOM even within its electrical limits (it reaches temperature limits).

    if you get used to this you'll enjoy modifying them. some are even at par (component ratings, power factor correction, etc) with industrial PSU at a fraction of the cost. my father uses them for controls of cargo elevators. they survive the industrial environment without needing further attention.

  15. #15
    Join Date
    May 2010
    Posts
    0
    Hi guys, this is Bob from South Africa!
    I am looking for the diagram for the "Home grown SMPS" where do I find it please?

    Regards,
    Bob

  16. #16
    Join Date
    Dec 2003
    Posts
    24223
    The first place I would look is in the various semi manuf application notes from the likes of Allegro, Freescale (Motorola), National semi, International Rectifier, T.I. etc.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  17. #17
    Join Date
    May 2007
    Posts
    767
    Hi Bob Innes

    Switch mode power supplies fall into two categories - those that use a transformer to provide isolation and those that rely on capacitors. The latter are low power devices and most often seen as low voltage dc input convertors to higher or lower voltage. The transformer type circuits also operate at high frequency which means that the transformer can be much smaller than the equivalent mains frequency size required for the same power. Whilst the semiconductor houses provide application notes they stop short of providing information on the transformer. Unfortunately the transformer requires special core material and the core bobin sets are not readily available in small quantities. If you wish to experiment on a limited scale the transformer can be salvaged from a defunct smpsu. The transformer can be freed from the gunk that is used to insulate the windings and stop the core whistle using a caustic paint stripper. Soak over night in a place where the fumes don't matter.

    Just a safety note about the charge that remains on the capacitors after removing the power - whilst experimenting it is a good idea to fit bleed resistors across them - and to get into the habit of shorting them out before diving in to alter the circuit! This is particularly important if the mains is being rectified to direct current prior to high frequency chopping by the semiconductors. If the oscillator fails the capacitors can be a full charge when the mains is removed so take cre if this is your line of experimentation.

    Quite efficient SMPSUs can be built using TTL logic to hold off the current drive until the oposite side has fully turned off assuming a push pull or bridge circuit. The same logic can also be used to alter the 'on' conduction time which gives direct control over the output voltage. There will be some nasty 'knife edge pulses' induced by the transformer switching core and this is why I suggest using TTL logic and not the more modern MOS based series as the TTL is less prone to damage. I have used this approach for SMPSUs upto 3 Kw and got efficiencies in excess of 85% - most of the power lost was in the transformer core and the switching semiconductors. With a fluctuating load the transformer core makes a noise best described as the bagpipes from hell! Varnish when the design is finalised is thus essential.

    Hope this helps get you started but do take care particularly if you are using high voltages and or currents. The old adage of keeping one hand behind your back is good as this limits the risk to the heart as the resistance hand to hand is low and any resulting shock passes via the heart to the other hand with unpleasant if not fatal results.

    Regards Pat

  18. #18
    Join Date
    May 2007
    Posts
    767
    Hi Folks

    Just re read this thread. The simplest form of SMPSU are those that use an oscillator circuit that is then pulse width modulated via a voltage feed back mechanism (voltage comparator). This avoids most of the transformer design problems as the frequecy of operation is determined not by the transformer but by the RC time constants in the oscillator.

    Regards Pat

Similar Threads

  1. Home Grown Dust Collector Set-ups <---Show Me!
    By 3D Robotica in forum DIY CNC Router Table Machines
    Replies: 1
    Last Post: 08-28-2007, 05:22 AM
  2. More power from switching power supply
    By R.thayer in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 03-11-2007, 02:03 AM
  3. Switching Power Supply
    By CharlieM in forum Stepper Motors / Drives
    Replies: 3
    Last Post: 05-08-2006, 02:17 PM
  4. Linear Or Switching Power Supply
    By edbo68 in forum CNC Machine Related Electronics
    Replies: 2
    Last Post: 03-27-2005, 08:19 PM
  5. What is a "Switching" power supply?
    By EvanRobert in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 09-09-2003, 04:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •