EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: Oxmstr on May 06, 2021, 07:01:15 pm
-
I want to modify a DC-DC step-up converter (cheap SX1308/MT3608 module (https://www.olimex.com/Products/Breadboarding/BB-PWR-3608/resources/MT3608.pdf)) 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.
(https://i.imgur.com/c0eEZbS.png)
-
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.
-
So pick a R2 first, some reasonable value ... for example let's say standard 6.8k
Vout = 0.6 ( 1+ R/6.8) = 0.6 x ( 6.8 + R) / 6.8 = > R = Vout x 6.8 / 0.6 - 6.8
So
for 10.8v : R = 10.8 x 6.8 / 0.6 - 6.8 = 115.6 kOhm
for 10.6v : R = 10.6 x 6.8/ 0.6 - 6.8 = 113.33 kOhm
Your 10.6v resistor can be 100k + 10k + 3.3k
Your 10.8v resistor can be 100k + 10k + 5.6k
So your switch could flip between the 3.3k and 5.6k resistors
Though 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.
-
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.