Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[SOLVED] ±6x variable gain op-amp

Status
Not open for further replies.

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
I am working at building a simple band pass filter followed by an op-amp circuit used to either boost the band or to reduce it, based on a potentiometer. The gain should be ±6x which means that when the potentiometer is full right a 6x boost is applied; when it's full left a -6x reducing is applied; when it is half-way it should have no gain.
The problem with this is that I'm unable to think of a good configuration for the op-amp to achieve these ranges. I thought at using the inverting configuration and set RF=10K (potentiometer) and R1=5K, which can give me ±2x; although, I don't know how to increase the range up to ±6x.
Can you please show me a way to achieve this? I'm going to use it for a home-made 10 band graphic equalizer and I only need "simple" solutions, not any complicated circuit for hi-fi audio.

p.s. May I assume that 6x means 6db ?
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,808
Helped
2,738
Reputation
5,473
Reaction score
2,648
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
103,058
You can vary gain over an enormous range by connecting the wiper of the potentiometer to the inverting input.

Screenshot:



I guess 'low gain' should read 'negative gain' or 'fractional gain'.

The 1k input resistor is included to represent some amount of impedance in the source device.

It may take some effort to make this technique work properly in a bandpass filter.
 

LvW

Advanced Member level 5
Joined
May 7, 2008
Messages
5,824
Helped
1,739
Reputation
3,480
Reaction score
1,338
Trophy points
1,393
Location
Germany
Activity points
39,133
I am working at building a simple band pass filter followed by an op-amp circuit used to either boost the band or to reduce it, based on a potentiometer. The gain should be ±6x which means that when the potentiometer is full right a 6x boost is applied;
p.s. May I assume that 6x means 6db ?
You are asking us if you may assume this?
* A gain of (+-)6 means: gain Magnitude of 6 (non-inverting or inverting)
* A gain of (+-) 6 dB means: gain of +2 or 0.5.

That is a big difference. So -what do YOU want?
 

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
@LvW: on most equalizers I've seen there were ranges from +12db to -12db. I'm not really comfortable with db ranges because I know nothing about managing the db scale. So basically, I would need +/-6db per band. But I knew I was wrong assuming 6x = 6db so I thought I would ask first.

@BradtheRad: You're telling me that in a inverting configuration of the op-amp I may use the wiper of the potentiometer as splitter for the 2 resistors (RF and R1)? In that case I must make sure it won't ever get to 0 in any of the sides of the potentiometer or I'd get a 0 value for one of the resistors which is not allowed. Now, considering that I'd like to have +/-6db gain (BTW, yes, low gain is actually the negative gain) what potentiometer value should I use and how may I calculate the db gain?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,871
Helped
14,125
Reputation
28,507
Reaction score
12,808
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,832
@BradtheRad: You're telling me that in a inverting configuration of the op-amp I may use the wiper of the potentiometer as splitter for the 2 resistors (RF and R1)? In that case I must make sure it won't ever get to 0 in any of the sides of the potentiometer or I'd get a 0 value for one of the resistors which is not allowed.
You didn't review the circuit thoroughly. It already has a series resistor on the left side, limiting the maximum gain. Turning the wiper to the right end is surely "allowed", but might be unwanted, because it sets zero gain.

Generally, your imagined circuit isn't a good graphic equalizer design, because it doesn't give an exactly flat characteristic in neutral position.

Usually, graphic equalizers are using a slightly different concept, adding or substracting the band of interest. As an example see the schematic of a simple commercial device:

 

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
What do you mean with "doesn't give an exactly flat characteristic in neutral position" ? If you mean the 3db loss because of the passive RC filter then it's ok, I thought I would pre-amplify the input before sending it to the filters.
The circuit you posted it's quite nice but I'm not sure I understood how it works. The project I am working on will be used for my graduation exam for electronics, so it has to be something I thought and I can explain.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,871
Helped
14,125
Reputation
28,507
Reaction score
12,808
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,832
The equalizer is based on active inductors. You can visualize it's operation by replacing the circuit at each potentometer wiper with a LCR series circuit.

You didn't exactly describe the intended combination of bandfilter channels, so my comment about not achieving a proper flat response is based on assumptions. If you simply add the output of multiple bandfilters, it would be founded.
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,808
Helped
2,738
Reputation
5,473
Reaction score
2,648
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
103,058
You're telling me that in a inverting configuration of the op-amp I may use the wiper of the potentiometer as splitter for the 2 resistors (RF and R1)? In that case I must make sure it won't ever get to 0 in any of the sides of the potentiometer or I'd get a 0 value for one of the resistors which is not allowed. Now, considering that I'd like to have +/-6db gain (BTW, yes, low gain is actually the negative gain) what potentiometer value should I use and how may I calculate the db gain?
Just to follow up on this point (since it goes with the title of the thread, because my method (post #2) is not necessarily the best way to make a parametric equalizer)...

You can install extra resistors at each end of the potentiometer, in order to limit the amount of gain up or down. The input resistor must be included with the upstream resistance, whatever that is.



There is a problem if the pot has a linear response curve. Gain will increase very quickly at the high end of pot travel. (This problem is common in controlling audio volume.) It could be solved by using a pot with a logarithmic response, but then it's a question which end of pot travel will end up needing the 'compressed' response, and which end needs 'expanded' response.

Anyway you might also experiment by installing additional resistors across the terminals of the pot, to alter its response curve, or to get 3dB attenuation at the center of pot travel, etc.
 
  • Like
Reactions: FvM

    FvM

    points: 2
    Helpful Answer Positive Rating

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
The bands I'll be using for this equalizer are 10:
32Hz (LPF)
64Hz, 125Hz, 250Hz, 500Hz, 1KHz, 2KHz, 4KHz, 8KHz (BPF*)
16KHz (HPF)
*BPFs have central frequency the one indicated above and as band start/end point the previous and next band central frequency.
The whole equalizer is made as follows:
Input -> 3db preamplifier ->> RC filter(s) ->> op-amp(s) for gain control -> op-amp (mixer) for band collection -> output
That's how I thought it should be made. As you can see it won't be such a great equalizer, but I don't care unless it works for the purpose... it'll work right? No, it won't. When I get a better look at the circuit Brad showed me, besides the input resistor and the potentiometer in the gain control, there will be the RC filter which will modify the gain range and behaviour. May I use an op-amp as buffer to divide the RC filter stage and the gain control stage?
About the potentiometer type, I was thinking that it would be a good idea to use a linear one, but after what you showed me, Brad, I'm not sure anymore which one to choose. After the description I made here about the equalizer stages, can you suggest me one?
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,808
Helped
2,738
Reputation
5,473
Reaction score
2,648
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
103,058
When I get a better look at the circuit Brad showed me, besides the input resistor and the potentiometer in the gain control, there will be the RC filter which will modify the gain range and behaviour. May I use an op-amp as buffer to divide the RC filter stage and the gain control stage?
Once you get one audio band working, you'll have a better idea how to make all ten work.

I'm not sure how useful my schematic will be. I have not seen a bandpass filter whose gain adjustment is constructed around it.

There are many schematics around for parametric equalizer projects. The one FvM posted (#5) is just one configuration. It does not use coils, but a gyrator or active inductor. You'll probably want to use that or a similar circuit, because otherwise you must spend all day winding custom coils and testing them for the correct Henry value.

By the way, my Radio Shack graphic equalizer has +12 and -12 dB for each band. Since you will do a lot of work just to make a 6 dB range, you might as well aim for 12 dB.

About the potentiometer type, I was thinking that it would be a good idea to use a linear one, but after what you showed me, Brad, I'm not sure anymore which one to choose. After the description I made here about the equalizer stages, can you suggest me one?
A graphic equalizer gets its name because of the sliding potentiometers. You get a visual indicator of the gain of each audio band. Rotary pots are less expensive, I suppose, but you'll need to look close to read the knob every time.

You will need to test the effect of both linear and logarithmic types, before you get the other nine. The idea is to push the pot, say 1/4 inch, and each time you do so you'll hear the volume increase by 2x (subjectively speaking).
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,871
Helped
14,125
Reputation
28,507
Reaction score
12,808
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,832
The bands I'll be using for this equalizer are 10:
32Hz (LPF)
64Hz, 125Hz, 250Hz, 500Hz, 1KHz, 2KHz, 4KHz, 8KHz (BPF*)
16KHz (HPF)
*BPFs have central frequency the one indicated above and as band start/end point the previous and next band central frequency.
The whole equalizer is made as follows:
Input -> 3db preamplifier ->> RC filter(s) ->> op-amp(s) for gain control -> op-amp (mixer) for band collection -> output
I guess, you'll check the overall behaviour of the intended topology in a circuit simulation. Let's discuss the pros and cons of this and alternative approaches after it.
 

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
I'll try to avoid the coils as much as possible. Soon I'll be posting the circuit I thought and then I'll make some simulation tests to see whether it's working or not.
BTW I'm using Proteus ISIS for circuit simulation. Is there any better choice for audio simulations?
 

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
I've considered LTSpice but I can't figure out how to properly use it even to design the circuit. Anyway I've tried simulating the circuit in ISIS with no luck. Input (WAV file) and preamplifier was OK but as soon as the signal got to the RC filter (64Hz LPF, R=2.470 Ohm, C=1uF) I could see nothing on the output. I'll attach here the circuit I'm using, could someone try simulating it in LTSpice for me?


EDIT
forgot component values in the circuit.
C1 = 1uF (LPF capacitor)
R1, R5, R6 = 1K
R2 = 2,2K (2.470 Ohm - LPF resistor)
VR1, VR2 = 10K Lin potentiometer
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,808
Helped
2,738
Reputation
5,473
Reaction score
2,648
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
103,058
I made a simulation. I found the second potentiometer needed to be re-arranged.

Your last op amp was creating hysteresis via a positive feedback loop. I switched the inputs around.

Screenshot:

 
  • Like
Reactions: T3STY and FvM

    FvM

    points: 2
    Helpful Answer Positive Rating

    T3STY

    points: 2
    Helpful Answer Positive Rating

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,871
Helped
14,125
Reputation
28,507
Reaction score
12,808
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,832
I found the second potentiometer needed to be re-arranged.
I guess, it's an erroneous copy of the circuit suggested in post #8.
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,808
Helped
2,738
Reputation
5,473
Reaction score
2,648
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
103,058
I guess, it's an erroneous copy of the circuit suggested in post #8.
Yes. Just the same, his way looked like it ought to work.

Anyway it seemed that way to the eye, until I tried dialing the potentiometer around, and found I could not get an AC signal.
 

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
Sorry, I've wrongly inverted the - and + in the last opamp. Anyway, what does the vertical resistor on the output of the last opamp do? Does it simulate a load on the output?
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,808
Helped
2,738
Reputation
5,473
Reaction score
2,648
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
103,058
Sorry, I've wrongly inverted the - and + in the last opamp. Anyway, what does the vertical resistor on the output of the last opamp do? Does it simulate a load on the output?
Yes, since I can see that current flows back and forth through a load, it confirms there is true AC at the output. Also that it is at a low enough impedance to drive a small load.

The load might end up being a megohm, in the input of the next op amp.
 

T3STY

Full Member level 4
Joined
Apr 17, 2012
Messages
239
Helped
24
Reputation
48
Reaction score
24
Trophy points
1,308
Activity points
3,715
I've been able to simulate the circuit in ISIS now, it worked just like it should! I've tested with 2 band pass RC filters at time, besides the "steppy" audio caused by non real-time circuit simulation, the rest was doing the job! During the simulation in ISIS I found that using a 10K Lin potentiometer was giving me too much attenuation/boost. I've reduced it to a 5K potentiometer and this time the quality seemed to be better even at maximum gain. Tried with Log potentiometer but I wasn't satisfied at all, with wipe at 50% it was giving half the input while at 75% it was almost at the maximum amplification value. I should have expected that though, Log potentiometers have a logarithmic change which works just like this.
Now, it only remains to calculate that +/-12 db (or 6 db, whatever) threshold. If someone could explain me in a few words how the db scale works I may spend some time on finding the right value for the gain potentiometer.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top