Maker Pro
Maker Pro

Voltage Gain Switch (Design Help)

P

Phil Hobbs

Phil Hobbs ha escrito:




I was thinking of maybe using CD4555 Binary to 1 of 4 Decoder instead
of simple gates (which might mean more ICs unless I complicate the
design for this one-off). I need to connect 3 outputs only, plus the
inputs from the PIC. The CD 4002 are actually Dual 4-Input NORs.

I could drive the Gate directly from the 4555's output at 5V, it says
it can drive or sink up to 6.8mA, more than enough I guess, but I do
not know why you say that's not advisable. If not I would use a PNP
transistor to drive the Gate with higher voltage, but I will need to
invert the logic from the 4555, or use 4556 Low on select.

I'm interested in knowing what kind RC lowpass filter I will need, I do
not have any experience with this kind of coupling, I just assume they
are rather isolated parts of the circuit.

Thanks.

MOSFETs don't draw any dc gate current, and you aren't trying to get
them to switch fast. A 100k resistor and 100 nF capacitor make a time
constant of 10 ms, corresponding to a 3 dB corner frequency of 16 Hz.

If you put a 100k resistor from the logic gate's output to the MOSFET
gate, with a 100 nF capacitor from the gate to ground, that 16-Hz rollof
will get rid of most of the noise that otherwise might couple from the
logic output to your analogue path.


|----
100k | |
Logic 0----RRRRRRRR---x------| | <--t
| | | |
C |----*
C |
100 nF C |
C |
C |
| |
GNDGNDGNDGNDGNDGNDGNDGND

It isn't a complete solution because it only rolls off like 1/frequency
(20 dB per decade). That means just what it sounds like: when they get
to the MOSFET gate, signals at 160 Hz will be down by 10x in voltage,
signals at 1.6 kHz will be down by 100x, etc. Big signals will still
get through, so really, really, don't run that bit of the logic from the
'digital' +5V.


Cheers,

Phil Hobbs
 
W

Winfield Hill

[email protected] wrote...
Winfield Hill ha escrito:

Ok, yes the switch doesn`t need to be able to handle de +-10V output,
I`m relocating it to a lower voltage part of the circuit. I`m confused
though, you said the gain switch located at the input of the 2nd stage
and then you said the switch should be used for switching the feedback
attenuators. So should I use the switch to change the feedback
attenuators or change the final amplifying stage?

.. Gain switching the feedback dividers eliminates effects
.. __ from the CMOS switch's series resistance.
.. ------|+ \
.. | >-----+----+----+---
.. .--|-_/ R1 | |
.. | | R3 | non-inverting gain
.. '---o-->o----+ | R5
.. o--- | ---+ |
.. o--- | -- | ---+
.. | | |
.. R2 R4 R6
.. | | |
.. GND --+----+----'

And if Gmin = 2, i.e., R1 => R2, etc., then a +/-5V switch
can be used with +/-10V output signals.
 
G

Glen Walpert

[email protected] wrote...

. Gain switching the feedback dividers eliminates effects
. __ from the CMOS switch's series resistance.
. ------|+ \
. | >-----+----+----+---
. .--|-_/ R1 | |
. | | R3 | non-inverting gain
. '---o-->o----+ | R5
. o--- | ---+ |
. o--- | -- | ---+
. | | |
. R2 R4 R6
. | | |
. GND --+----+----'

And if Gmin = 2, i.e., R1 => R2, etc., then a +/-5V switch
can be used with +/-10V output signals.

This arrangement very nicely eliminates the effects of switch
resistance, but output will swing to the rails when all switches are
open (if that is allowed to happen) and some opamps might not like the
high input voltage resulting when a feedback switch is then closed, so
opamp input protection diodes may be advisable. Arrangements which
switch parallel resistors in the input and/or feedback can be done
which never open the feedback loop, but then the switch resistance
shows up as an error term. So the designer seems to have a choice
between a low glitch design with switch resistance errors or a
potentially high glitch design without them - but a make before break
switching arrangement could eliminate the switching glitches which
will otherwise occur with the above ckt.
 
K

Ken Smith

Winfield Hill said:
. Gain switching the feedback dividers eliminates effects
. __ from the CMOS switch's series resistance.
. ------|+ \
. | >-----+----+----+---
. .--|-_/ R1 | |
. | | R3 | non-inverting gain
. '---o-->o----+ | R5
. o--- | ---+ |
. o--- | -- | ---+
. | | |
. R2 R4 R6
. | | |
. GND --+----+----'

Also:

You can use a series string of resistors to save on resistor count.

If you use a 4052, one divider can be on the input side and one in the
feedback path. You hook two switch inputs to each resistor step. You get
4 levels with only 4 resistors but your swing ends up limited by one input
connection.


Also also:

If you really have to have a large input swing and a large output swing in
the inverting mode, you can use the 4051 to apply a positive feedback.
This only works for narrow groups of gain values since the inaccuracy of
the resistors gets amplified.
 
J

Jim Thompson

Hi, recently I`ve started to work (ad honorem, as a Technician) on a
Mechanical Engeneering Lab that performs destructive tests. They have
tasked me (I`m in the Electronic Instrumentation Department) to design
an electronic circuit that will replace an obsolete Voltage Gain Switch
circuit. The obsolete circuit uses relays to change the operational
amplifiers with different gains. Basically we are 2 guys, I`m an
Electronic Technician on the first year of electronic Engeneering and
who's in charge is an about to graduate Electronic Engeneer.

The requirements are:

+-10V output voltage swing
Low Frequency, from 0 to 200hz
Low Cost
Easy-to-find ICs (ICs with high Availability)
4 selectable gains controlled by two bits
Null-Offset
High Precision Gain

The Technician before me did this circuit with 4 Operational Amplifiers
with different gains and an analog switch CD4051 or CD4066. This
circuit did not meet the requirement of +-10V output voltage swing, so
I have to redesign it. The gains are predetermined, I don`t have the
actual values right here, but the maximum was 5000. My idea is to
change the analog switch with one that does allow at least +-10V output
voltage swing, and my "boss" approved. The thing is that I tried to
find a replacement but couldn`t find one that`s available here in
Argentina.

To sum up what I`m asking for is a suitable IC, or a new idea on how to
make the circuit. Of course ideas to improve the original design are
always welcome. I know about amplifier design, but on the Technician
level, that is, I don`t know any practical or modern way of doing it,
just what the theory says. As you can see the requirements are
standard, not very demanding (I guess), if there's anything you think I
should consider please tell me about it.

Thanks in advance.

See....

http://analog-innovations.com/SED/VoltageGainSwitch.pdf

Took awhile. I had to collect my works for On-Semi's analog switches
into a "blind" part that didn't divulge what I designed for them at
the device-level.

I am sure there are better 1% values, but I just "slung" it together.

The 16-Bit-Step is just my test part to generate digital words.

...Jim Thompson
 
Phil Hobbs ha escrito:
MOSFETs don't draw any dc gate current, and you aren't trying to get
them to switch fast. A 100k resistor and 100 nF capacitor make a time
constant of 10 ms, corresponding to a 3 dB corner frequency of 16 Hz.

If you put a 100k resistor from the logic gate's output to the MOSFET
gate, with a 100 nF capacitor from the gate to ground, that 16-Hz rollof
will get rid of most of the noise that otherwise might couple from the
logic output to your analogue path.


|----
100k | |
Logic 0----RRRRRRRR---x------| | <--t
| | | |
C |----*
C |
100 nF C |
C |
C |
| |
GNDGNDGNDGNDGNDGNDGNDGND

It isn't a complete solution because it only rolls off like 1/frequency
(20 dB per decade). That means just what it sounds like: when they get
to the MOSFET gate, signals at 160 Hz will be down by 10x in voltage,
signals at 1.6 kHz will be down by 100x, etc. Big signals will still
get through, so really, really, don't run that bit of the logic from the
'digital' +5V.


Cheers,

Phil Hobbs

So in short I shouldn`t use it. What do you mean when you say "Big
Signals" ? I created a new post about this part of the circuit, the PNP
switch I was bound to do drove me insane for an hour, thought it
deserved it`s own post, the title is: Turning on a MOSFET from 0-5V.

I forgot to ask before about the Bandwidth change with the attenuator,
why suddenly when one MOSFET is ON the other's capacitance doesn`t
matter ?

I also wonder about the OFF-state of the MOSFETs. The datasheet states
the drain current with VGS=0V and VDS=48V to be 1mA Max at Tj=125ºC,
don`t know about the impedance, but the current at much lower VDS
should be significantly smaller, right ?

Thanks.
 
Winfield Hill ha escrito:
[email protected] wrote...

. Gain switching the feedback dividers eliminates effects
. __ from the CMOS switch's series resistance.
. ------|+ \
. | >-----+----+----+---
. .--|-_/ R1 | |
. | | R3 | non-inverting gain
. '---o-->o----+ | R5
. o--- | ---+ |
. o--- | -- | ---+
. | | |
. R2 R4 R6
. | | |
. GND --+----+----'

And if Gmin = 2, i.e., R1 => R2, etc., then a +/-5V switch
can be used with +/-10V output signals.

An interconnection of ASCII characters is worth a million words :)

Thanks.
 
Glen Walpert ha escrito:
This arrangement very nicely eliminates the effects of switch
resistance, but output will swing to the rails when all switches are
open (if that is allowed to happen) and some opamps might not like the
high input voltage resulting when a feedback switch is then closed, so
opamp input protection diodes may be advisable. Arrangements which
switch parallel resistors in the input and/or feedback can be done
which never open the feedback loop, but then the switch resistance
shows up as an error term. So the designer seems to have a choice
between a low glitch design with switch resistance errors or a
potentially high glitch design without them - but a make before break
switching arrangement could eliminate the switching glitches which
will otherwise occur with the above ckt.

So what you are trying to say is that, when the above circuit switches
the feedback, there might be some time of inestability in the circuit.
If that's what you meant there is no problem, there were relays before
that took forever to change the feedback, there's no problem with that
kind of inestability. How's this make before break circuit you mention ?
 
Ken Smith ha escrito:
Also:

You can use a series string of resistors to save on resistor count.

If you use a 4052, one divider can be on the input side and one in the
feedback path. You hook two switch inputs to each resistor step. You get
4 levels with only 4 resistors but your swing ends up limited by one input
connection.


Also also:

If you really have to have a large input swing and a large output swing in
the inverting mode, you can use the 4051 to apply a positive feedback.
This only works for narrow groups of gain values since the inaccuracy of
the resistors gets amplified.

I don`t understand the positive feedback arrangement. If you could work
out an example that would be great.
 
J

Jim Thompson

On 18 Sep 2006 16:17:58 -0700, [email protected] wrote:

[snip]
So what you are trying to say is that, when the above circuit switches
the feedback, there might be some time of inestability in the circuit.
If that's what you meant there is no problem, there were relays before
that took forever to change the feedback, there's no problem with that
kind of inestability. How's this make before break circuit you mention ?

Did you miss my post...

http://analog-innovations.com/SED/VoltageGainSwitch.pdf

???

...Jim Thompson
 
Jim Thompson ha escrito:
See....

http://analog-innovations.com/SED/VoltageGainSwitch.pdf

Took awhile. I had to collect my works for On-Semi's analog switches
into a "blind" part that didn't divulge what I designed for them at
the device-level.

I am sure there are better 1% values, but I just "slung" it together.

The 16-Bit-Step is just my test part to generate digital words.

...Jim Thompson

Thanks for the effort. The plot's are particulary useful, I need to get
PSpice.
 
K

Ken Smith

I don`t understand the positive feedback arrangement. If you could work
out an example that would be great.


ASCII art:
R1 R2
10K 10K
---/\/\/------+-------/\/\----------
! !
---!-\ !
! >------------+-+-------
---!+/ !
! \
! / 10K
! \
! !
! A O-----+
------------> !
O \
! / 1K
GND \
!
GND

When the switch is at ground, the circuit is simple. Just ignore the
extra stuff and you have a gain = -1


In the other case, if Vout = 1V, the voltage at A=0.1 so R2 has 0.9V on it
and thus the input must be -0.8V
 
P

Phil Hobbs

Phil Hobbs ha escrito:




So in short I shouldn`t use it. What do you mean when you say "Big
Signals" ? I created a new post about this part of the circuit, the PNP
switch I was bound to do drove me insane for an hour, thought it
deserved it`s own post, the title is: Turning on a MOSFET from 0-5V.

I forgot to ask before about the Bandwidth change with the attenuator,
why suddenly when one MOSFET is ON the other's capacitance doesn`t
matter ?

I also wonder about the OFF-state of the MOSFETs. The datasheet states
the drain current with VGS=0V and VDS=48V to be 1mA Max at Tj=125ºC,
don`t know about the impedance, but the current at much lower VDS
should be significantly smaller, right ?

Thanks.

I think I'm about done with this, actually. With the amount of help
you've had from some pretty high-class engineers, you have lots of
things to choose from. Wire a few up and see how they work!

Cheers,

Phil Hobbs
 
W

Winfield Hill

Jim Thompson wrote...
On 18 Sep 2006, [email protected] wrote:

[snip]
So what you are trying to say is that, when the above circuit switches
the feedback, there might be some time of inestability in the circuit.
If that's what you meant there is no problem, there were relays before
that took forever to change the feedback, there's no problem with that
kind of inestability. How's this make before break circuit you mention ?

Did you miss my post...
http://analog-innovations.com/SED/VoltageGainSwitch.pdf

That doesn't Glen's address transient situations, does it? But
yes, I agree there isn't really a problem. The hc405x series
in fact switches so fast that ordinary opamps don't have time
to respond to open-switch situations, as they might with other
slower high-voltage, breakdown-protected CMOS switches. While
Glen's comments are on target for many if not most traditional
analog switch families, the hc405x switch family was first and
foremost a logic switch, with low-resistance low-capacitance
MOSFETs, and it responds rapidly, appropriate to that task.

These are also readily-available low-cost parts, and attractive
if they're buried deep inside a circuit, where static discharge
and low maximum-operating voltages may not be an issue, like
Leo's amplifier.

That said, there's still the issue of charge injection, where an
output pulse appears from the transient current injected into the
opamp's feedback loop from the MOSFET-switch gate-voltage swing.
Using low-value feedback divider resistors minimizes this affect.
Using low-capacitance switches also helps, but these are slow,
and therefore can exacerbate the open-switch problem.
 
Phil Hobbs ha escrito:
I think I'm about done with this, actually. With the amount of help
you've had from some pretty high-class engineers, you have lots of
things to choose from. Wire a few up and see how they work!

Cheers,

Phil Hobbs

Well everyone thanks, I think I`m gonna follow Phil's suggestion and
learn the good ol' way, blowing stuff up. I`m gonna limit myself to
concrete questions, afterall from the experience I`ve got, all this
might be too much information, which I`m not sure I`m ready for. But
there sure is some top quality information, talk about information
overload.
 
R

Robert Latest

On 18 Sep 2006 16:23:29 -0700,
in Msg. said:
Thanks for the effort. The plot's are particulary useful, I need to get
PSpice.

No, you need to get LTSpice which is available for free from Linear
Technology. Or if you're on a Unix environment, look around for a
"vanilla" Spice3f5. I've heard that LTSpice runs under wine/Linux, but
I've never tried that.

robert
 
F

Fred Bartoli

Ken Smith a écrit :
ASCII art:
R1 R2
10K 10K
---/\/\/------+-------/\/\----------
! !
---!-\ !
! >------------+-+-------
---!+/ !
! \
! / 10K
! \
! !
! A O-----+
------------> !
O \
! / 1K
GND \
!
GND

When the switch is at ground, the circuit is simple. Just ignore the
extra stuff and you have a gain = -1


In the other case, if Vout = 1V, the voltage at A=0.1 so R2 has 0.9V on it
and thus the input must be -0.8V

Should be:

"In the other case, if Vout = 1V, the voltage at A=0.090909... so R2 has
0.9090909...V on it and thus the input must be -0.8181818...V"

or make the divider 9K/1K :)
 
G

Glen Walpert

Glen Walpert ha escrito:

So what you are trying to say is that, when the above circuit switches
the feedback, there might be some time of inestability in the circuit.
If that's what you meant there is no problem, there were relays before
that took forever to change the feedback, there's no problem with that
kind of inestability. How's this make before break circuit you mention ?

Make before break switching means that you close one switch before
opening the previous one, to prevent ever opening the circuit
entirely.
 
K

Ken Smith

Ken Smith a écrit :

Should be:

"In the other case, if Vout = 1V, the voltage at A=0.090909... so R2 has
0.9090909...V on it and thus the input must be -0.8181818...V"

or make the divider 9K/1K :)

You are right. I can only put the error down to hunger. My wife called
me to dinner just as I typed the end of it so I didn't proof read it. I
think you will forgive me when I tell you that it was roast beef, fresh
green beans from the garden, fresh carrots from the garden and potatoes
also from the garden.

This circuit can be improved somewhat by placing a small capacitor from A
to GND. This eats up the switching glitches.
 
Top