Maker Pro
Maker Pro

Voltage Gain Switch (Design Help)

W

Winfield Hill

[email protected] wrote...
If you tell me that I can find those here in Argentina at an
affordable cost, you may have a point.

I'm fond of the 74hc4051 and hc4052 cmos switches, but they are
limited to +/-5 or 6 volts of signal swing (the switch's supply
must be below +/-7.5V). If you can setup your second stage for
gains of say 2, 10, 25 and 100, etc., which implies the first-
stage gain is 50 rather than 100, then a gain switch located at
the 2nd-stage's input won't see more than 5V for a 10V output,
so you can use the hc4052, etc. Very easy to get in Argentina.
As for the switch, it selects from among feedback attenuators,
so the cmos FET's series resistance doesn't affect the gain.
 
P

Phil Hobbs

Phil Hobbs ha escrito:
(snip)

I`m going to answer the designs one by one.

About this one, I understood the general idea, which I believe is to
switch gains through the MOSFETs. But, I have no idea about the second
stage, the attenuator. First the signal gets amplified then attenuated,
the overall gain of the two stages being at least 2. Then it goes to
the third stage which has a fixed gain of 50 ? Which of the stages has
the selectable gain (voltage divider)? You probably should mention a
standard DMOS driver because I have never used one before.

It`s unlikely that I will use this design, but I am interested in how
it works, seems rather unconventional :)

Well, unconventional in the sense of being a minor variant of the one
used in every oscilloscope in the universe, at least until recently....

You're right about the nonlinearity and on-resistance problems with
switches--which is a a strong reason to keep the amplifier gains fixed,
and do the gain switching at low-to-moderate signal levels. There are
also pickup and noise peaking problems with hanging all sorts of
gingerbread on summing junctions. Your predecessor used relays to
switch fixed-gain amplifiers in and out, which isn't a bad design for a
one-off.

What's so hard to understand about the design I posted? You need a gain
of 100, 500, 1000, or 5000. Taking out a common factor of 100 for the
first stage gain means that the amplifier noise, offset, and drift
behaviour will basically depend only on the first stage. This is an
important point in instrument design.

A passive attenuator using big honking MOSFETs (2 or 3 ohms ON
resistance) gets rid of the switch nonlinearity completely. The ones I
show cost 20 cents each, and are available everywhere including
Antarctica. Putting the switched attenuator between the two amps means
that it can run at the same narrow range of signals at all times, which
makes doubly sure that the MOSFETs are not going to cause a linearity
problem. That's actually one of the nicer features of this circuit.
Choosing a second-stage gain of 50 means a gain of 1.00 for the
attenuator's highest gain setting, which is easy to do accurately.

The output amp, with a gain of 50, gets you back up from +-200 mV to +-
10V. You don't need switches with a huge voltage range, and the
attendant resistance nonlinearity and temperature drift. *Note that you
can't tune out the nonlinearity and drift with a pot.*

Once again, this design doesn't cause excess noise, offset, or drift,
because the overall gain up to the attenuator output is always at least
2. This is simple to prove--about 3 lines of algebra. It's simple,
cheap, made from jellybean parts, and will work very well. Other than
that, it stinks.

Cheers,

Phil Hobbs
 
K

Ken Smith

Winfield Hill said:
I'm fond of the 74hc4051 and hc4052 cmos switches, but they are
limited to +/-5 or 6 volts of signal swing (the switch's supply
must be below +/-7.5V).

His frequency is low so a CD4051, 2 or 3 could be used. If the amplifier
is inverting, the swing at the gain switch will be smaller than the output
of the op-amp. This makes your suggestion even better.


ASCII art:

R1 R2 R3
---/\/\/--+--/\/\--+------\/\/----------
! ! !
! ---O S1 U1 !
! <-------!-\ !
------------O ! >---
GND--!+/

U1 is some op-amp
S1 is a section of 4053

You can use more resistors in series and a 4052 or 4051 to get more gains.
 
K

Ken Smith

power supplys, so I will have to lower the voltage to power them, I
will probably use some zenner diode.

They draw so little current that even a resistor divider can be a good way
to do it.
 
John Woodgate ha escrito:


The Op-Amps I`m gonna stick with are OP07s, unless there is a major
problem with them. I like the idea that the switch doesn`t have to be
the final stage, somehow I took that idea off my mind. Still I have a
problem using 4051s or 4066 because none of those would allow +-12V
power supplys, so I will have to lower the voltage to power them, I
will probably use some zenner diode.

Use three terminal regulators - much better output impedance than zener
diodes, less wasted current, and you can usually get the voltage you
want, or set it up with an LM317 (or any of its many variants).

The OP-07 is a very nice amplifier, but slow, and doesn't give all that
much gain.

The ua725 and PMI's OP-06 had DC gains in excess of 120dB but both
parts seem to be obsolete.
 
D

David L. Jones

David L. Jones ha escrito:


Thanks Dave, the high-precision amplifier is a good idea, but I still
have that question about the feedback resistor switching.

If you can't use tony reed relays, then as I think someone else has
said probably best to have a fixed gain precision diff amp permanately
on the front end, and then a seperate precision amp for each gain you
want following that. Then you can use any crude solid state switching
device you want on the outputs of the amps.

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

I'm fond of the 74hc4051 and hc4052 cmos switches, but they are
limited to +/-5 or 6 volts of signal swing (the switch's supply
must be below +/-7.5V). If you can setup your second stage for
gains of say 2, 10, 25 and 100, etc., which implies the first-
stage gain is 50 rather than 100, then a gain switch located at
the 2nd-stage's input won't see more than 5V for a 10V output,
so you can use the hc4052, etc. Very easy to get in Argentina.
As for the switch, it selects from among feedback attenuators,
so the cmos FET's series resistance doesn't affect the gain.

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 ?
 
Phil Hobbs ha escrito:
Well, unconventional in the sense of being a minor variant of the one
used in every oscilloscope in the universe, at least until recently....

You're right about the nonlinearity and on-resistance problems with
switches--which is a a strong reason to keep the amplifier gains fixed,
and do the gain switching at low-to-moderate signal levels. There are
also pickup and noise peaking problems with hanging all sorts of
gingerbread on summing junctions. Your predecessor used relays to
switch fixed-gain amplifiers in and out, which isn't a bad design for a
one-off.

What's so hard to understand about the design I posted? You need a gain
of 100, 500, 1000, or 5000. Taking out a common factor of 100 for the
first stage gain means that the amplifier noise, offset, and drift
behaviour will basically depend only on the first stage. This is an
important point in instrument design.

A passive attenuator using big honking MOSFETs (2 or 3 ohms ON
resistance) gets rid of the switch nonlinearity completely. The ones I
show cost 20 cents each, and are available everywhere including
Antarctica. Putting the switched attenuator between the two amps means
that it can run at the same narrow range of signals at all times, which
makes doubly sure that the MOSFETs are not going to cause a linearity
problem. That's actually one of the nicer features of this circuit.
Choosing a second-stage gain of 50 means a gain of 1.00 for the
attenuator's highest gain setting, which is easy to do accurately.

The output amp, with a gain of 50, gets you back up from +-200 mV to +-
10V. You don't need switches with a huge voltage range, and the
attendant resistance nonlinearity and temperature drift. *Note that you
can't tune out the nonlinearity and drift with a pot.*

Once again, this design doesn't cause excess noise, offset, or drift,
because the overall gain up to the attenuator output is always at least
2. This is simple to prove--about 3 lines of algebra. It's simple,
cheap, made from jellybean parts, and will work very well. Other than
that, it stinks.

Cheers,

Phil Hobbs

Well, I understand now, and I must say I really like the idea. It`s
kind of unconventional in the sense that you are the only one among the
one's who replied that proposed this idea instead of the analog switch
or relays ;)

The only problem is that the control signal comes in binary (from a
PIC), so I will have to use a decoder to drive the MOSFETs accordingly.
That adds another IC to the circuit, yet another thing that can go
wrong (but very unlikely). The decoder pops a question: what VGS
voltage shoul I use ?. From what I gather, more VGS voltage better
linearity and for a wider range of VDS. I was thinking about VGS=10V,
but I will need to raise up the voltage coming from the PIC with a BJT,
so I think VGS=5V is fine, the VDS voltage is already low enough so it
doesn`t matter.
 
Ken Smith ha escrito:
His frequency is low so a CD4051, 2 or 3 could be used. If the amplifier
is inverting, the swing at the gain switch will be smaller than the output
of the op-amp. This makes your suggestion even better.


ASCII art:

R1 R2 R3
---/\/\/--+--/\/\--+------\/\/----------
! ! !
! ---O S1 U1 !
! <-------!-\ !
------------O ! >---
GND--!+/

U1 is some op-amp
S1 is a section of 4053

You can use more resistors in series and a 4052 or 4051 to get more gains.

I must say that I can`t understand the schematic, the connections of
the Op-Amp and the switch are all garbled for me. But if I understood
correctly your idea doesn`t stray too much from Win's.
 
[email protected] ha escrito:
Use three terminal regulators - much better output impedance than zener
diodes, less wasted current, and you can usually get the voltage you
want, or set it up with an LM317 (or any of its many variants).

The OP-07 is a very nice amplifier, but slow, and doesn't give all that
much gain.

The ua725 and PMI's OP-06 had DC gains in excess of 120dB but both
parts seem to be obsolete.

I`m not sure about it, but is an LM317 really neccesary ? I thought
Ken's idea of a voltage divider was great :p
 
David L. Jones ha escrito:
If you can't use tony reed relays, then as I think someone else has
said probably best to have a fixed gain precision diff amp permanately
on the front end, and then a seperate precision amp for each gain you
want following that. Then you can use any crude solid state switching
device you want on the outputs of the amps.

Dave :)

Yep, I`ll use OP-07s, they are cheap and have everything I need, I
think. I noted the suggestion of using a faster Op-amp, but it`s
unneccesary as the input signal is very slow. Maybe I`ll switch to an
OP-27 that is a bit better than the 07.
 
P

Phil Hobbs

The only problem is that the control signal comes in binary (from a
PIC), so I will have to use a decoder to drive the MOSFETs accordingly.
That adds another IC to the circuit, yet another thing that can go
wrong (but very unlikely). The decoder pops a question: what VGS
voltage shoul I use ?. From what I gather, more VGS voltage better
linearity and for a wider range of VDS. I was thinking about VGS=10V,
but I will need to raise up the voltage coming from the PIC with a BJT,
so I think VGS=5V is fine, the VDS voltage is already low enough so it
doesn`t matter.

I'd probably want to use CD4000 series logic, running from whatever your
analog supply is (+12 or +15, probably).

There are only 4 gain settings, so it ought to be possible to do this
with a few gates.

The gains are not in a binary sequence, so it isn't instantly obvious
how they're encoded---but one natural guess would be

A1 A0 Gain G2 G1 G0
0 0 100 1 0 0
0 1 500 0 1 0
1 0 1000 0 0 1
1 1 5000 0 0 0

where we assume positive logic, and calling the gates of the MOSFETs G0,
G1, G2 for /5, /10, and /50,

G0 = ~A0 & A1 = ~( A0 + ~A1)
G1 = A0 & ~A1 = ~(~A0 + A1)
G2 = ~AO & ~A1 = ~( A0 + A1)

The obvious solution needs two CD4002 quad 2-input NOR gate packages, or
one CD4002 and a couple of spare inverters. You'll want to use a really
slow RC lowpass between the logic and the MOSFETs to make sure you don't
couple anything off the supply rail into the signal path. If you're
imaginative about it, you can probably do it with one gate package, but
this is left as an exercise for the reader, along with the 5V->10V level
shifters you'll need. Alternatively you can run the gates at 5V, but
don't run them from the logic supply, or you'll be wishing for those
nicce well-behaved relays.

Cheers,

Phil Hobbs
 
[email protected] ha escrito:


I`m not sure about it, but is an LM317 really neccesary ? I thought
Ken's idea of a voltage divider was great :p

A voltage divider can sometimes do the job, with decent by-pass
capacitors, but mostly a three-terminal regulator does a better job.
The LM317 and LM337 would be an over-kill in most cases - fixed
regulators in TO-92 and surface mount packages are available off the
shelf for all of the voltages thst you are likely to lead.

You could improve on Phil Hobb's 2N7002 switches with SD214 parts - the
"on" resistance isn't as good - at 50R to 75R - but the capacitances
are a lot lower.

http://www.linearsystems.com/datasheets/SD214.pdf#search="SD214"
 
David L. Jones ha escrito:


Yep, I`ll use OP-07s, they are cheap and have everything I need, I
think. I noted the suggestion of using a faster Op-amp, but it`s
unneccesary as the input signal is very slow. Maybe I`ll switch to an
OP-27 that is a bit better than the 07.

It does have a lower input noise voltage, but this is only relevant for
low impedance sources.

The LT1028 data sheet has a useful tutorial section in the application
notes

http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1154,C1009,C1021,P1234,D3480

on page 10 of the pdf. Your OP-07 corresponds to the LT1001. and the
OP-27 to the LT1007.
 
K

Ken Smith

Ken Smith ha escrito:


I must say that I can`t understand the schematic, the connections of
the Op-Amp and the switch are all garbled for me.

Change the font setting of your news reader. They any fixed spacing font.
But if I understood
correctly your idea doesn`t stray too much from Win's.

My idea is almost entirely Win's. What I was pointing out is that the
swing at the switch is smaller than the swing at the op-amps output.
 
R

Robert Latest

[The design is] simple, cheap, made from jellybean parts, and
will work very well. Other than that, it stinks.

Nice summing up!

robert
 
Phil Hobbs ha escrito:
I'd probably want to use CD4000 series logic, running from whatever your
analog supply is (+12 or +15, probably).

There are only 4 gain settings, so it ought to be possible to do this
with a few gates.

The gains are not in a binary sequence, so it isn't instantly obvious
how they're encoded---but one natural guess would be

A1 A0 Gain G2 G1 G0
0 0 100 1 0 0
0 1 500 0 1 0
1 0 1000 0 0 1
1 1 5000 0 0 0

where we assume positive logic, and calling the gates of the MOSFETs G0,
G1, G2 for /5, /10, and /50,

G0 = ~A0 & A1 = ~( A0 + ~A1)
G1 = A0 & ~A1 = ~(~A0 + A1)
G2 = ~AO & ~A1 = ~( A0 + A1)

The obvious solution needs two CD4002 quad 2-input NOR gate packages, or
one CD4002 and a couple of spare inverters. You'll want to use a really
slow RC lowpass between the logic and the MOSFETs to make sure you don't
couple anything off the supply rail into the signal path. If you're
imaginative about it, you can probably do it with one gate package, but
this is left as an exercise for the reader, along with the 5V->10V level
shifters you'll need. Alternatively you can run the gates at 5V, but
don't run them from the logic supply, or you'll be wishing for those
nicce well-behaved relays.

Cheers,

Phil Hobbs

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.
 
[email protected] ha escrito:
A voltage divider can sometimes do the job, with decent by-pass
capacitors, but mostly a three-terminal regulator does a better job.
The LM317 and LM337 would be an over-kill in most cases - fixed
regulators in TO-92 and surface mount packages are available off the
shelf for all of the voltages thst you are likely to lead.

You could improve on Phil Hobb's 2N7002 switches with SD214 parts - the
"on" resistance isn't as good - at 50R to 75R - but the capacitances
are a lot lower.

http://www.linearsystems.com/datasheets/SD214.pdf#search="SD214"

Ok, I will try to use a voltage regulator, one small and cheap, it`s a
rather light load we are talking about. Any suggestions beside the
LM317 ?

I do not need to worry about bandwidth for the most part so I don`t
think the capacitance is an issue for the moment. I'd rather stick with
the low rds ON.
 
Ken Smith ha escrito:
Ken Smith ha escrito:
[....]
I'm fond of the 74hc4051 and hc4052 cmos switches, but they are
limited to +/-5 or 6 volts of signal swing (the switch's supply
must be below +/-7.5V).

His frequency is low so a CD4051, 2 or 3 could be used. If the amplifier
is inverting, the swing at the gain switch will be smaller than the output
of the op-amp. This makes your suggestion even better.


ASCII art:

R1 R2 R3
---/\/\/--+--/\/\--+------\/\/----------
! ! !
! ---O S1 U1 !
! <-------!-\ !
------------O ! >---
GND--!+/

U1 is some op-amp
S1 is a section of 4053

You can use more resistors in series and a 4052 or 4051 to get more gains.

I must say that I can`t understand the schematic, the connections of
the Op-Amp and the switch are all garbled for me.

Change the font setting of your news reader. They any fixed spacing font.
But if I understood
correctly your idea doesn`t stray too much from Win's.

My idea is almost entirely Win's. What I was pointing out is that the
swing at the switch is smaller than the swing at the op-amps output.

Changing the font did the trick.

I found this Application Note on signal switching/multiplexing from
Texas Instruments: http://www-s.ti.com/sc/psheets/szza030/szza030.pdf
 
Top