DC DC step up converter: selecting output voltage with a switch - Page 1
Forum section: electronics / projects

author: Oxmstr
author_rank: Contributor
timestamp: May 06, 2021, 07:01:15 pm
content: I want to modify a DC-DC step-up converter (cheapSX1308/MT3608 module) that uses a single potentiometer that sets the voltage to use a single SPST switch where I can select the output voltage during operation without turning the module off.What I need help is: how to calculate the R1_0, R1_1, and R2 so that when SW1 is open the voltage is 10.6V and when it's closed it's 10.8V (or opposite, doesn't matter).Design notes:Vout to be set at 10.6V and 10.8V, because these values are so close I want to use poteniometers to set the resistance manually instead of trying to string resistors. My only limtation are the potentiometers, as I only have 10K and 100K on hand, the R2 is not a problem if it would be a E12 standard value.I've recreated the PCB of the module with my attempt at making what I want to achieve.

author: ajb
author_rank: Super Contributor
timestamp: May 06, 2021, 07:42:02 pm
content: You should connect the unused pin on each potentiometer with the wiper, that will ensure that if the wiper skips and goes open circuit at all during adjustment or due to failure the module doesn't end up going open loop and sending the voltage out of control. Also you should set the ratios such that even with the pots at max resistance the voltage will be relatively safe for whatever the load is.The math here is relatively straightforward:Vout = 10.8 = 0.6*(1+R1_1/R2)Vout = 10.6 = 0.6*(1+1/(1/R1_1+1/R1_2)/R2)We're setting 10.6 to be the voltage when the switch is closed, because the resistance of the top half of the feedback divider will be lower when R1_1 is in parallel with R1_2, hence the feedback ratio is lower and the output voltage must also be lower.On order to make this easy to calibrate, it would be a good idea to use the 10K pots each in series with an additional resistor. That allows you to get the total resistance of the divider into the ~100k range while reducing the range the potentiometers can adjust to, which effectively gives you better resolution in adjusting them to get the correct voltage.If you've got a limited selection of fixed resistors on hand, the best way to arrive at a workable solution may be to just throw the formulas above into an excel or google spreadsheet and try different combinations until you get something that works. You can rework the formulas to find a suitable ratio for the three resistances to get started.

author: mariush
author_rank: Super Contributor
timestamp: May 06, 2021, 10:01:22 pm
content: So pick a R2 first, some reasonable value ... for example let's say standard 6.8kVout = 0.6 ( 1+ R/6.8) = 0.6 x ( 6.8 + R) / 6.8 = > R = Vout x 6.8 / 0.6 - 6.8Sofor 10.8v : R = 10.8 x 6.8 / 0.6 - 6.8 = 115.6 kOhmfor 10.6v : R = 10.6 x 6.8/ 0.6 - 6.8 = 113.33 kOhmYour 10.6v resistor can be 100k + 10k + 3.3kYour 10.8v resistor can be 100k + 10k + 5.6kSo your switch could flip between the 3.3k and 5.6k resistorsThough I'd be concerned about switch breaking off before making new connection... You should consider the switch in a default position where it does nothing, and when the switch changes a resistor is placed in parallel with the other resistor to lower the resistance.For example, default to 5.6k and when switch is triggered, parallel a 8200 ohm resistor with the 5.6k value ... 5600 and 8200 in parallel results in 3327.5 ohm which should be close enough.

author: TimNJ
author_rank: Super Contributor
timestamp: May 06, 2021, 11:53:43 pm
content: Sorry to feature-creep for you. I think given the limited bandwidth of the control loop, any mechanical funkiness (bouncing, intermittency) should probably be ignored/out of bandwidth. But I'm not sure. How clean do you want the transitions to be?Maybe you can try a high-side p-channel switch driven by an RC de-bounced NPN transistor. Then any switch-related perturbation does not make it into the feedback path.