[QUOTE="jutek said:
What are the levels you need to make? What is the reference.
outputs are from 1 to 1.6 with 50mV step. vref is 1
the resistors are 0-120k with 10k step[/QUOTE]
I think you can cut down on the resistors and MOSFETs very easily at the
cost of a second op-amp.
Without the second op-amp but allowing for some error due to MOSFET
resistance:
1V ---------------!+\
! >----+----------
---!-/ !
! !
---+---++--+-/\/\---
! ! ! ! NR
/ / / /
R \ \ \ \ 8R
/ / / /
! ! ! !
MOS MOS MOS MOS
! ! ! !
GND GND GND GND
Since your voltages step off uniformly, you can use binary weighted
resistors to both decode a 4 bit number and control the output.
Now the "N" of "NR" needs to be found. Just to be clear what I mean, I'm
going to go through the thinking in baby steps. It is also useful for
making sure I have it right.
When 8R is on, 8R has 1V on it and NR has 0.05V on it. We can assume that
no current flows into the op-amp so the "NR" has the same current as the
"8R"
1V = 8R * I
0.05V = NR * I
Solve each for I
1V/8R = I ( divided both sides by 8R )
0.05V/(NR) = I ( divided by NR )
Since it is the same I in both equations we can say this:
1V/8R = 0.05V/(NR)
Now we find "N":
1V * N / 8 = 0.05V (Mult by NR)
N / 8 = 0.05 (Div by 1V)
N = 8 * 0.05 (Mult by 8)
N = 0.40
Now we have a value for N, we can go back and work out what we want R to
be.
first i simulated LDO without these resistors, choosing one them step
by step. transient response of the LDO was good. i mean, response for
the change in load current. settling time and load regulation was ok. So
i think the badwidth was enough. but when i added 10k and 110k
resistors + one switch and simulated change in the output from 1.05 to
1.6 the settling time was awful. I need 1us and there was much more.
Did you use the MOSFET as a switch or did you use a "switch" in your
model? If you used the MOSFET, the capacitances of the MOSFET are likely
to be the problem.
You may have been fooled by the load regulation, into thinking something
that isn't true. Since I don't know the details you your op-amp, I will
assume something just for my explaination. I will say that internally,
your op-amp looks like this:
Vcc
! Vcc
\ !
/R1 \R3
\ /
! \
---+--- ! Vcc
pnp ! ! pnp ----+ !
!/e e\! ! ! !/ Q4
-in ---! !--+in --- +-----! npn
!\ /! C1 --- ! !\e
! ! X! !/ -------- Out
GND +-------------+--! Q3
! !\e
\ npn !
/ GND
\R2
!
GND
Since this is a low power op-amp, lets assume that all of these
transistors cut off at 100KHz. That is, we are going to take the *bogus*
assumption that the collector current lags the E-B voltage by 45 degrees
at 100KHz and there is no other capacitances in the circuit except for C1.
If there is a sudden step on the output, it shows up right away on the E-B
voltage of Q4, so the current output starts off changing at a rate
controlled only by the 100KHz speed of Q4. After a while, the change in
output voltage makes it through your resistors to the (-in) input of the
op-amp, through all the parts to the base voltage of Q4. This means that
the change in current will look like this:
...............................***
.........................*********
...................******.........
.............******...............
........*****.....................
.......*..........................
......*...........................
.....*............................
....*.............................
...*..............................
**...............................
! ! !
! "Fast rise" Slowly
! Because of we get the
! Q4 alone rest of the
! way there
Step applied
The the shape you get if you suddenly change the divider feeding the (-in)
point will be quite different. In that case, it will only have the slower
second part.
There is an alternative version of this circuit were "X" is grounded
rather than run to the base of Q3. If you disconnect that point from
ground and hook it to some other low impedance point, it can provide you
with an easy way to add feedforward to the design.
Do your control lines come from some sort of bufferes so that you can be
sure of their amplitude and are very clean?