CS5171的FB电压位1.276V,使用E24系列电阻,最接近12V的配比为47/5.6,电压为11.9853V,电阻R4可取47k, R3取5.6k。计算使用到的MATLAB脚本如下
E24_Series_Base=[1, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2, 2.2, 2.4, 2.7, 3, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1];
E24_Resistors = [...
E24_Series_Base, ...
E24_Series_Base*10, ...
E24_Series_Base*100, ...
E24_Series_Base*1e3, ...
E24_Series_Base*10e3, ...
E24_Series_Base*100e3, ...
E24_Series_Base*1e6, ...
10e6];
sizet = length(E24_Resistors);
tar_voltage = 12;
f = @(r1, r2)1.276 * (1+r1./(r2));
Record = [];
Best = [];
for n=1:sizet;
temp =abs(tar_voltage - f(E24_Resistors, E24_Resistors(n)));
min_temp = min(temp);
Best = [Best; min_temp];
min_temp = FindElement(temp, min_temp);
Record = [Record; [E24_Resistors(min_temp(1)), E24_Resistors(n)]];
end
Best_Val = min(Best);
Record_Val = FindElement(Best, Best_Val);
R1 = Record(Record_Val, 1)
R2 = Record(Record_Val, 2)
Voltage_Actual = f(R1(1), R2(1))
|