# Switching between three output voltage settings on a switching regulator

I am currently in the process of designing a load control circuit based on a switching voltage regulator. The assumption is that the regulator would provide three different voltage settings based on the user's choice, using a tactile switch.

My idea was to develop and test this logic circuit on a simple voltage regulator like MC34063 from TI. Since in most (all?) of the switching regulators the output voltage setting is based on a voltage divider composed of two resistors, my idea was to find a way to switch on/off the resistors in a pair, in order to obtain different voltage values.

I thought of using a logic counter CD4017 with clock input being a tactile switch and then to pass one of the three states of choice to the regulator's circuit, through a transistor with the resistor being switched connected to the NPN's emitter.

However, I encountered some trouble setting up the whole circuit on a breadboard so I came back to LTSpice to evaluate and test its performance. It turned out that it does not work, due to the fact that the connection through a transistor makes the voltage on the feedback to the comparator constant and over 1.25V which makes the whole device unable to regulate the voltage according to the desired values.

Below is my setup presented in the LTSpice - I simulate the clicks on the tactile switch by a pulse signal to the CD4017 clock input.

Is there any way to make it work with the use of these elements? Is there any other way to switch the resistor pair and obtain the three voltage settings on the regulator's output?

• Have you tried putting the transistor between the resistor and ground, instead of between the resistor and the feedback pin? Jan 13, 2021 at 17:42
• Did you fix your circuit (previous question) in the end. I ask because it's quite alright to leave an answer to your own question. User253751 is quite correct by the way. Jan 13, 2021 at 17:43
• Transistors should be as user253751 mentioned, I would suggest usage of some cheap mosfets like BSS138 instead - they will influence the output voltage less. Jan 13, 2021 at 17:59
• @Andy aka - I did not manage to make the MC34063 work on a breadboard. Tried soldering the same setup on a perforated PCB, but it behaved the same way like on a breadboard. That's why I thought of evaluating the design in the LTSpice. The MC34063 performance turned out to be as expected so then I added the logic circuit to it. Jan 13, 2021 at 18:05
• Use FETs instead (like BSS138 or similar.) Or open-drain drivers. Jan 13, 2021 at 18:10