electronics laboratory

WBahn

Joined Mar 31, 2012
32,828
Hi, I have a further doubt, what values should I choose for the resistors, obviously the ratio I choose will help me to have the amplification I want. Furthermore, I had thought of making two stages so as to obtain an output voltage, and a possible alternative that seemed valid to me was to use a buffer at the first stage and then another LM358 amplifier at the second stage, in which I sized the resistors so as to obtain the gain I buy between 0 and 5 Vvi seems like a valid alternative
We can't eve start to help you understand how to determine resistor values when you haven't yet shown what circuit topology you are contemplating using. You need to provide a schematic that is your best attempt to come up with a circuit that you think will work. Don't worry about which opamp you are using or component values -- just the basic circuit topology to start with.
 

MrAl

Joined Jun 17, 2014
13,704
Even the 741 has sufficient, barely, GBWP for these specs.
Hi,

Doesn't the 741 op amp have similar specs to the LM358 op amp?
The LM358 has GBW of 1MHz and slew rate of just 0.5v/us, which is not fast enough for 40kHz as specified. Max would be around 15kHz.
 

Thread Starter

monika.duccoli

Joined Jan 12, 2024
72
Hi, I have a further doubt, what values should I choose for the resistors, obviously the ratio I choose will help me to have the amplification I want. Furthermore, I had thought of making two stages so as to obtain an output voltage, and a possible alternative that seemed valid to me was to use a buffer at the first stage and then another LM358 amplifier at the second stage, in which I sized the resistors so as to obtain the gain I buy between 0 and 5 Vvi seems like a valid alternative
 
The LM358 is a pretty good inexpensive (dual) op amp for lots of applications - but it's not "rail to rail, so it will not be much good if you want the output to be linear in relation to the input when it gets close to the power rails. Since you are looking for an output from zero to 5.0V you'll need dual supply (+Vcc and -Vcc) with enough headroom away from zero and 5V.
 

WBahn

Joined Mar 31, 2012
32,828
Hi,

Doesn't the 741 op amp have similar specs to the LM358 op amp?
The LM358 has GBW of 1MHz and slew rate of just 0.5v/us, which is not fast enough for 40kHz as specified. Max would be around 15kHz.
GBWP and Slew Rate are different things. An opamp might be adequate in one and not in the other. I was only talking about the GBWP. The TS needs to determine what their needed GBWP is and what their needed slew rate is and then consult the data sheets of the opamps they are considering.
 

WBahn

Joined Mar 31, 2012
32,828
Thank you for FINALLY showing a schematic.

Note that you have two nodes that are both labeled 'out1'. Most simulators will assume that these are physically the same net (known as connection-by-label).

Before considering whether or not this particular opamp has a shot at doing what you want, first consider whether or not even ideal opamps would do what you want.

What would the output be, with ideal opamps, for in input of -1.5 V and for an input of -0.5 V. Is one of them 0 V and the other 5 V? If not, then you have more fundamental problems to deal with before you start picking particular opamps.

But let's consider the LM358 for just a moment. What does it's data sheet say the output voltage range is if the supplies are ±5 V. Is that consistent with wanting the output to be able to vary from 0 V to 5 V?
 

MrAl

Joined Jun 17, 2014
13,704
GBWP and Slew Rate are different things. An opamp might be adequate in one and not in the other. I was only talking about the GBWP. The TS needs to determine what their needed GBWP is and what their needed slew rate is and then consult the data sheets of the opamps they are considering.
Hi,

Yes they are different things, but if the op amp fails for either one independently of the other the design does not work. That's why I consider them both at the same time when it is time to choose an op amp, especially when the frequency seems questionable for that op amp. Here's your original post:

" Even the 741 has sufficient, barely, GBWP for these specs. "
That has a strong implication that since the GBWP is enough to meet the specs it is good enough for the design.
Not too big of a deal I guess because we would have had to mention it again later anyway.
The catch with these op amps is the GBW is 1MHz, so 40kHz sounds so much less than that it should work, even though it doesn't.

I am starting to see the slew rate mentioned in these cases more on the web now, more than say 10 years ago. Before that it was more typical to see the slew rate being ignored. The other thing that is always ignored is what we might call the "recovery time". That's the time it takes for the op amp to come back into the linear mode after it has been forced out of it by the rest of the circuit. It's amazing how long this time can be, possibly in the seconds. Of course it only applies for a limited number of circuit types. Since this is never mentioned on the data sheet, I had to learn the hard way by designing a circuit years ago that had to come out of the linear mode for each cycle, and so it failed miserably. When I worked in the industry I had a host of data books readily available to me, along with a host of theoretical books on site, and even the entire Rutgers library. None of the books I read during that time ever mentioned this 'feature'.
 

MrAl

Joined Jun 17, 2014
13,704
Hi, I have a further doubt, what values should I choose for the resistors, obviously the ratio I choose will help me to have the amplification I want. Furthermore, I had thought of making two stages so as to obtain an output voltage, and a possible alternative that seemed valid to me was to use a buffer at the first stage and then another LM358 amplifier at the second stage, in which I sized the resistors so as to obtain the gain I buy between 0 and 5 Vvi seems like a valid alternative
Hi,

Unfortunately the LM358 will never meet the spec of 40kHz at 5v. That's because of the limited slew rate not the GBW.
I don't think there is any way to force the slew rate up higher as the mechanism for that is internal to the op amp and only influenced by the inputs in a small way.

So either cross off the LM358 or lower the frequency requirement or output peak for this project. With the formula I posted earlier, you can calculate the max frequency it will be able to handle without extensive distortion. Just a hint: It is lower than 16kHz. That's often referred to as the "power bandwidth" and you should look that up.
 
Top