enter image description here

I am going to design a circuit which is going to output some digital signals. The output stage of the circuit will have some level shifters. The level shifters will give flexibility to the user to choose the voltage level (1.8V, 3.3V or 5V) of the output signals. I am planning to place a three-position slide switch on the PCB. According to the position of the switch, one of mosfets will be shorted, and so, corresponding feedback branch will activate and set the output voltage.

Can you please review this idea? I am not sure if the feedback signal will be distorted or not. I think the switching frequency of the buck converter to be around 500kHz. Is this idea feasible? Can you please make some suggestions to improve it, or tell me why it wouldn't work?

EDIT: The switch will be a panel mount one and will stay in a remote location. That is why I am using the mosfets to shorten the feedback paths.

  • \$\begingroup\$ Why bother with the FETs if you are going to use a mechanical switch? \$\endgroup\$
    – JRE
    Jul 23, 2019 at 10:47
  • 4
    \$\begingroup\$ Reduce your FETs by one and have one of your resistors permanently grounded. Now compute the other two so you get the correct value when they're in parallel. \$\endgroup\$
    – Neil_UK
    Jul 23, 2019 at 11:30
  • \$\begingroup\$ By remote, do you mean there's a wireless connection? My main concern would be ensuring the circuit that this is powering can handle 5V input if it's designed for 1.8V. If someone were to accidentally switch it to 5V when it was designed for 1.8V, poof. I'm sure you've designed for that though. \$\endgroup\$
    – horta
    Jul 23, 2019 at 16:31
  • 1
    \$\begingroup\$ Double and triple check that your converter will still be stable at different values of R2. For example, your controller may require or recommend a feedforward capacitor (Cff) between R1 and Vfb. If you have a Cff, then changing R2 will change the frequency of the pole but not the corresponding zero. \$\endgroup\$
    – BB ON
    Jul 23, 2019 at 19:45
  • 1
    \$\begingroup\$ So....is there anything to drain the gate capacitance of the MOSFET when you switch away from it? Because if you just disconnect the gate and leave it floating then the MOSFET just stays on because the gate capacitance stays charged. \$\endgroup\$
    – DKNguyen
    Jul 23, 2019 at 20:28

3 Answers 3


Two things. First, use two FETs and two wires to control them instead of 3, and second, use a resistor-ladder approach.

You have three low-side resistors, R2a,b,c. Wire them in series, then use the two FETs to short intermediate connections to ground. This is fail-safe and is simple to control directly with an on-off-on SPDT switch.


simulate this circuit – Schematic created using CircuitLab

Exercise for the student: calculate the values for R2a/b and R3 based on the Vfb of your regulator. Here's what I came up with for Vfb=0.6V (resistors in kOhms):

enter image description here How it works:

  • When M2 and M1 are off, Vout is 1.8V as set by Vref*(1 + R1/(R2a+R2b+R2c))
  • When M1 is on, Vout is 3.3V as set by Vref*(1 + R1/(R2a+R2b))
  • When M2 is on, Vout is 5.0V as set by Vref*(1 + R1/R2a)

Note that it is impossible to set any higher voltage than 5V by accident. If both M1 and M2 are on, you still get only 5V because R2b is already grounded by M2. Like I said, fail-safe.

As far as what it does to your regulator, changing voltage will change the stepping ratio. Make sure that the regulator can work at all three settings, and that the inductor is appropriately sized to give acceptable ripple current.


Yes, that would work.

But why not connect the switch directly to the resistors in the first place?


Depending on the electric fields and the magnetic fields around the switching regulator, this may or may not work.

Inserting mechanical switches with 1/2" wires from switch to the resistors ----- may work.

Inserting 6" of wiring between switch and resistors ---- may not work, but longer wires will certainly be more vulnerable 200volt/100nanosecond Efield slew rates and to 10amp/100nanosecond Hfield slew rates.

You'll usually see the midpoint of these feedback dividers located close to the IC, and located over a ground plane for some shielding. There is a reason for that shielding.

I suggest you use an analog multiplexor IC, to pick off various midpoints. Perhaps chat with the Apps Engr of the semiconductor manufacturer, about the impedance levels required at the Feedback pin of the regulator IC. Make sure to extend the GROUND PLANE to be under the analog multiplexor and under the voltage divider resistors.

Probably could use a Digipot, a single Digipot, with serial-interface to control the resistor-tap-setting. Now you need a MicroController.

  • 1
    \$\begingroup\$ A mux chip would have a much higher resistance than what you can get from a FET. That would cause voltage error. \$\endgroup\$
    – scorpdaddy
    Jul 23, 2019 at 12:59
  • \$\begingroup\$ depends on how the mux is used. Notice I use the phrase "to pick off various midpoints". In other words, to feed-back the voltage, not to serve as current shunt. \$\endgroup\$ Jul 23, 2019 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.