How to Make a Variable SMPS Driver Circuit

This post tries to determine a method through which any SMPS could be made into a variable power supply for achieving any desired voltage level from 0 to maximum.

SMPS stands for switch mode power supply, as the name suggests this power supply concept utilizes high frequency switching pulses for converting mains AC voltages to a particular specified low voltage DC such as 12V or 24V.

I have discussed this in detail in one of my previous posts how to understand SMPS circuits

The SMPS concept today has almost completely replaced the traditional iron core transformers and have transformed these units into a much compact, light weight and efficient power adaptor alternatives.

However since SMPS units are commonly available as fixed voltage modules achieving a preferred voltage as per the users application needs becomes quite difficult.

For example for charging a 12V battery one may need an output voltage of around 14.5V, but this value being quite odd and non-standard we may find it extremely difficult to get an SMPS rated with these specs in the market.

Although variable SMPS circuits can be found in the market, these may be costlier than the ordinary fixed voltage variants, therefore finding a method of transforming an existing fixed voltage SMPS into a variable type looks more interesting and desirable.

By investigating the concept a little I was able to find a very simple method of implementing the same, let's learn how to conduct this modification.

You will find one popular 12V 1amp SMPS circuit in my blog which actually has an in built variable voltage feature.

We find that it employs a shunt regulator circuit stage for executing the variable voltage feature in the design.

Another interesting aspect is that this shunt regulator device implements the feature by regulating the input of the opto coupler of the circuit.

Now since a feedback opto coupler stage is invariably employed in all SMPS circuits, by introducing a shunt regulator one can easily transform a fixed SMPS into a variable counterpart.

In fact one can also make a variable SMPS circuit using the same principle as explained above.

You may want to learn more about what's a shunt regulator and how it works.

How to Make a Variable SMPS circuit

Referring to the following example circuit, we are able to find the exact location of the shunt regulator and its configuration details:

See the bottom right side of the diagram marked with red dotted lines, it shows the variable section of the circuit we are interested in. This section becomes responsible for the intended voltage regulation actions.

Here the resistor R6 can be replaced with a 22K pot for making the design variable.

Magnifying this section provides a better view of the involved details:

 

 

If you have a fixed voltage SMPS circuit, open it and just look out for the optocoupler in the design, it would be mostly located just around the central ferrite transformer, as may be seen in the following image:

Once you have found the opto-coupler, clean up by removing all the parts associated on the output side of of the opto, meaning across the pins which may be towards the output side of the SMPS PCB.

And connect or integrate these pins of the opto with the assembled circuit using the TL431, shown in the previous diagram.

You can assemble the TL431 section on a small piece of general purpose PCB and glue it on the main SMPS board.

If your SMPS circuit does not have an output filter coil, you can simply short the two positives of the TL431 circuit and join the termination to the cathode of the SMPS output diode.

However suppose your SMPS already includes the TL431 circuit with the opto coupler then simply find the position of the R6 resistor and replace it with a pot (see R6 location in the first diagram above).

Don't forget to add a 220 ohms or 470 ohm resistor in series with the POT otherwise while adjusting the pot to the upper most level could instantly damage the TL431 shunt device.

That's it, now you know exactly how to convert or make a variable voltage SMPS circuit using the above explained steps.

If you have any further doubts regarding the design or the explanation, feel free to express through your comments.



40 thoughts on “How to Make a Variable SMPS Driver Circuit

  1. Have questions? Please feel free to post them through comments! Comments will be moderated and solved ASAP.
  2. Hi Swagatham
    Thanks in advance for your quick reply.
    I have a 350W ATX computer smps. I would like to covert it as a variable power supply as described in your above post.

    1) If I turn the 22k POT, will the all four out puts (+3.3v, +5v, +12v&-12v ) vary….?

    2) Can I use the +12v & -12v use for 24v supply….?

    3 ) Can a 555 & IRF540 based PWM circuit use as a normal variable powersupply ( like which based on LM317). Input is +12vdc. Output should be 0 to +12v variable.

    • Hi Anil, yes all the four outputs could get affected depending on the lowest range you have set the pot to….if it's lower than 5V then the 5v will come down to that level but not the 3.3V and so on…

      yes +12V, -12V ends will provide you with a 24V output

      No it won't, PWM concept might change and produce an average DC just like a LM317, but the peak voltage will be never changed which could be dangerous for a sensitive load.

  3. Hi Swagatham
    Useful circuit idea. Thanks.

    I have a SMPS from an old SATELLITE receiver with many out puts ( 3v, 5v, 12v…..30v ). My idea is to use the 30v out as a 0v to 30v variable supply.
    This board have TL431 ic.

    1) In my board R6 is a low value (compaired to 17K )resistance of 220 ohms. So, my idea is to connect 22K POT series with this 220 ohms. Is it ok that way…..? If 22K is too high, which value is best to cover the full scale 0v to 30v

    2) In place of C6 (104p) there was a 10K resistor series with a 10mfd, 50v electrolitic capacitor. I replaced it with 104pf.

    3) R3 is 220 ohms in your circuit but 1.8Kohms in my case. Need change 1.8K to 220ohms….?

    NB. My board have INDUCTOR at output. All other components and circuit is exactly same as your TL431 based design.

    • Thanks Anil,

      Your question no2 and 3 are not critical so you can ignore them and keep those components as they are.

      if the 220 ohms is for generating 30V max, then you can try adding a 22k resistor in series and check the response, however the actual value for the pot can be determined only after knowing the value of R7

    • Hi Swagatham, thanks for reply. I assembled it
      , successfully. I faced little bit problems. But I solved it. R7 is 4.7K ohms. For R6, used 20K POT + 220 ohms. I connected an led with 330ohms at 3v rail. When I turned the 20K POT, voltage start increasing normally. After a certain limit, noticed LED start FLASHING, means some problems.
      I turn backward the POT. LED stop flashing.
      I replced 220 ohms with a 2.2 Kohms resistor. But problem cold not solved. Then I connected a 10Kohms resistor parallel with 20Kohms,…….(2.2K still there, everything worked ok as I desired……!
      I check each otput voltages at full POT rotation.
      My 3v can vary from 3v to 6v, 5v from 5v to 10v………12v from 12v to 24v. Means, minimum to double.Thats ok for me.

      Ok, my question,
      1) Can I vary, eg.12V, from 0v to 24v….?
      I my case, it is only possible from 12v (POT min.) to 24v (POT max.). This is same for other all outputs too.
      2) When the voltage increase (double ), will current decrease….? My supply is 12v, 500ma rated.

    • Many thanks Swagatham,
      Now I got the exact answer from you, to use R7, as variable resistor.

      I designed ( not yet assembled ) 5pcs TL431 based (which is similar to your above circuit) LED voltage indicator for 3v,5v,7.5v,9v and 12v.

      When I vary POT (increase voltage) corresponding LEDs will ON one by one and vice versa.
      Anodes of all LEDs with seperate 220 ohms connected to another TL431 based 3v regulated supply. Otherwise, at 12v my lower side LEDs blow up.
      Now l want to calculate R4 value. This resistor help to SHARP ON led at set voltage level. I don't know formula for calculating R4 value. Help me

      LED supply .3v regulated, LED series resistors are 220 ohms x 5.

      • Thanks Anil,
        R4 can be a 1K resistor, it's not crucial. 1K will not allow the external LED to blow.

        by the formula is

        input supply minus LED forward Voltage rating divided by LED safe current

    • Hi Swagatham, thanks for reply.
      I mean R4 (1K parallel with LED). But you are talking about R3 ( 1.8K ) Please check your first circuit ( SMPS full diagram ) above.
      R3 is LED current limiting resistor. But R4 will alow LEDs to light up sharply at 3V, 5v, 7.5v,9v….12v. Please check TL431 datasheet application circuits. But, R4 calculation formula is not available anywere,I searched google.

      • Hi Anil, yes I was mistakenly referring to R3.

        But the LED sharp ON will depend on R4 and C10 together…as long as C10 is charging through R4, the opto LED will experience a bright illumination…and as C10 gets charged the opto LED will fade down and continue to work normally as per the specs of the design

        so it's probably a simple RC charging formula that would apply here for determining the conditions.

    • Dear Swagatham, recently I modified a 12V, 1A fixed volt SMPS to variable SMPS. I can vary output from Minimum 2.5V to 12V maximum.

      I connected a 12V, 21W automobile signal lamp as load. From 2.5v to 9V, lamp flashes with equal intervals. Above 9v, lamp stop flashing, and lit steady. Output oscillates with load and without load.

      My POT is a 10K with 220ohms series resistance.

      1) What will be the possible reason of this output oscillation at lower voltages….?

      2) Can I add the " variable output current feature" and "variable output voltage feature together in an SMPS ….?

      3) Is it output short circuit protected all SMPS' that have an OPTO COUPLER associated with TL431…..?

      4)In such a situation, if we did not remove short circuit, will it cause damage to the SMPS components….?

      Thanks in advance for reply.

    • Dear Anil kumar, It is happening due to overload conditions by the load, the load voltage specs must match the SMPS output voltage specs otherwisr the SMPS will consider as an overload, by the way 21/12 = 1.75, that's already too high for a 1amp SMPS, I think if you use a load that's within the SMPS output capacity and specs then the flashing will not happen.

      The SMPS is short circuit proof, that's the reason it is forcing oscillations and trying to stop overheating of the IC.
      also you an try adjusting the 4k7 resistor instead of the 22K and see whether it allows a better response or not.

  4. Dear sir,
    I have got some 5 volts 1 amp smps boards using viper17L IC. I tried to get more voltage from above method but failed. It only gives up to 6.5 volts when pot resistance is about 6.8k and afterwards it floats. I actually need 7.5 volts. I disassembled the ferrite core transformer which has 170 turns primary, 20 turns feedback and 9 turns secondary. What should i do to get 7.5 volts. Also I want to use it for audio purpose. But it is giving whistle sound in the audio amp. How to avoid the this sound.

    With regards
    Raveesh

    • Hi Raveesh, check the output by disconnecting the optocoupler link between the secondary/primary, if still it shows 6.5V then the secondary winding can be upgraded with a few more turns, if an increased reading is obtained then you might be missing something in the optocoupler adjustments, that you must investigate and rectify.

      Please tell me the amplifier,s current requirement specs??

    • Thank you for reply

      I removed the pc817 and checked the voltage. Out put voltage floats, no study reading. Whether the track is to be shorted at primary side after removal of optocoupler to get the output voltage? please clarify.

      My audio amp has only 2 watts out put and requires 500 MA at 7.5 volts. Please suggest me a remedy to overcome the whistling sound while using this smps

        • The circuit is already having 1k2 ohms(smd) dummy load on the board across the output terminals.
          The DMM shows fluctuating voltage from 3.5, 4.2 and 5.1 volts.

          The output stage is using tl431 with 4k9 1% and 4k7 1% voltage divider to adj pin of tl431. If i replace 4k9 with 6k8 I will get 6.1 volts. If i increase this with series resistance of even 220 ohms the voltage starts to fluctuate.

          Please inform me how can i attach the entire circuit to the comment box so that I can prepare circuit in coral draw and send it to for your verification.

          with regards
          raveesh

          • Please make sure that the secondary output is rectified through a bridge network and a filter capacitor, I think you could be measuring the AC from the secondary winding which will show fluctuations.

            you can upload the schematic on your Google drive with sharing option toggled, and provide the link here.

          • To change the voltage you can try replacing the 3k9 resistor with a 10K preset and adjust its value to check what maximum range you are able to get.

            if it does not reach the 7.5V value, then probably you might have to open the transformer and add a few more turns on the secondary side so that the output can be upgraded to above 7.5V,

            the whistle can be cancelled by adding a suitable filtration in series with the output supply which will need to e experimented.

  5. Sir, I use 330R instead 220R & I adjusted to 12v from 32v (originally) PSU – but it dropped to 0v when I loaded to 12v/25w lamp – any suggestion, sir??

    • Sorry annoying You Sir, I’ve tried to install the load (12v/25W bulb) & adjusting it – replace 22K to 250k pot, but Vo read only 0-2v5 and the lamp only unbright blink-blink, originally it was 32v 2A PSU – turning pot never get effect though

      • replacing 22k with 250k preset is not correct…I suggested you to replace the 22k preset with a fixed resistor and replace the 4k7 resistor with a 4k7 or 10 pot and adjust this pot for the results.

        if still that doesn’t help, open the transformer and reduce the secondary winding number of turns until the 12V is achieved.

        • Thx U very much, Sir – it works although it has 17v 1A2 to drive 5m led strip – it glows 🙂 as You mentioned I use 5k pot as 4k7 & 10k+3k3 in series fixed resistors … I’ve learn more about it 🙂

  6. hi Swag
    am working on converting my lab bench PC PSU SMPS into a variable voltage supply. am following your instructions but cant locate the resistors which serve as voltage divider on the PSU schematic. could you please help !!!



Leave a Comment