can't calculate the result of LM741 op-amp in negative feedback loop

Thread Starter

manaduar

Joined Mar 25, 2014
3
Hello all,

I previously tried asking for help on a different site and got virtually no answers, so I'm hesitant turning to another forum, but I'm not making any ground on my own so here goes. I hope I find some help here.

the background: I'm going to be reviewing PC power supplies for a web site. To do these reviews I need to be able to put a selectable load from 10% to 100% load, spread across multiple rails and multiple voltages, on power supplies that can reach (and sometimes exceed) 1500W.

I've looked at several options for a load and to buy the pro equipment I'd be looking at $1000's, up to possibly 20k, which I can't come near to affording. So after researching I've decided the best option is to build my own constant current load.....IF I can actually succeed in building it. I may also build multiples of them.

I'm not an electrical engineer so I'm probably missing some basic information but I've spent weeks researching, learning, and experimenting. I'm going to spare all the details of what I'm trying to set up and focus on one part at a time, one question at a time, as the last time I described my setup I got nothing but a lot of "if you're not an EE then you shouldn't be messing with that stuff cause it's over your head" flak and no answers, I also got a lot of, "why bother, just do it this way" type of responses where they spent more time typing to tell me why I shouldn't worry about learning than they would have if they just answered my questions.

Right now, I'm working with op-amps first. The short explanation to my problem is that I'm planning out a simple circuit, calculating the expected results, putting it on a breadboard and testing it, but not getting the calculated results or anywhere near them.

there's 4 components that I'm using here, an LM741 op-amp, various resistors, 9v batteries, and wires.

I've attached an image that I made on the previous forum per their request for a visual reference where I show 9 different configurations. I've tried all these and many many others. these are just general representations of what I used.

for the moment, I'm only wanting to reference attempt 7 and 8 cause I think those are the best examples of what I THINK my setup should look like to not have problems.

I also put the formula at the bottom cause that's the one basic piece of information that I need and in the case of this build, the Vout is really the only important factor and being able to accurately predict and control it. Also, I'd like to point out that on the setup used in attempt 7&8, I have set this up where I use a 100k pot in place of R2. (R1 is connected to Vout and R2 connected to the negative battery post) I've also set it up where I've used 2 batteries connected in series for my inputs (same as I'm using for the supply in the picture).

If we look at attempt 7 for example, and assume the voltage is exactly 9v for Vin, then my Vout SHOULD be 9.9V but I won't get that. I realize there's a saturation point that I could be hitting, that's why I started using the setup from 7&8 instead of 4,5,&6. But then I got into wondering if I was dealing with 18v difference or if I was only getting +9v and -9v, So I don't know if my saturation point in 7&8 should be 9v or 18v.

We can call that the first question right there:
in example 7 & 8, knowing that my Vout cannot exceed my Vs+, then is this Vs+ considered +9v or 18v?

Another change I've experimented with that isn't in the image has been using up to 4 batteries in series for a total of 36V and it hasn't changed my results. I thought that if the Vs+ was measured as the total voltage difference from vs- OR as only the positive side, I would get either 18v or 36v. The idea was that if by going to this setup to have the higher saturation point, I could first focus on being able to accurately calculate the inputs and outputs, then if that worked out, I could set up an input that could exceed 36v and see what I actually got, then I would know which point of view to take for my Vs+, but I digress.

even when connecting 4 batteries in series, with attempt 7 I would still not get 9.9. In the process of all my testing, I've used up some of the power in these batteries, so it's possible that they just aren't actually putting out enough power and/or my inexperience keeps me from being able to realize if the difference between the results and my calculations are a result of v-drop or other real-world physics that the math doesn't take into account. So I switched to using attempt 8.

with attempt 8, per my math, the Vout should be 99v. This is obviously beyond the saturation point so surely I'd see something above 9v here right? but even with the 4 battery series, I still don't get 18v or 36v. I'm still only getting around the 9v neighborhood.

Note:
last forum I asked questions on I was berated for not being specific and saying EXACTLY what voltage I got. I can't give an exact voltage because it wasn't the same every time. the batteries all look the same and I wasn't keeping track of how much time was on each, so they were all at different power levels. in reality I wasn't even getting a full 9v just testing the battery directly with a multimeter. it was usually something in the high 8's (8.76, 8.93, 8.67...) I realize when we're talking about an expected result of 9.9 and a reading of 9.5 (which the readings I got weren't even this close) then knowing exact decimal points is important, but that's also why I scaled up so that I should be seeing voltages in the 18 or 36v range, and when I was still getting readings in the 8v or 9v range I knew the gap was too large to be an issue of precision. So while I know that precision is important in electronics, in my case the lack of precision does not take away from the comprehension of the outcome, if I'm calculating that I should get 18v but I only get 9v, then that's enough information to know there is a problem with my calculations, my setup, or my measurements. There is no further information to gather from the technical facts that the input battery alone measured 8.93, the two supply batteries in series measured 17.58, and in attempt 8 I got a reading of 8.81.

I did look into the datasheet on the op-amp (again, this was an LM741 but I've also tried all of this with an LM324) and while I exceeded some thresholds, the were not to the point that there should have been damage. What that is to say is, there should be no malfunction in my op-amp, and even if the op-amp may have an output limit of, say 25V, (this is example just for making the point, I don't want to dig out the datasheet and give actual examples due to time it'd take to finish this post) that's higher than what I'm getting, so the fact that I'm not getting the results that I calculated I should is not a result of the limit of the op-amp.

The only other issue I can think of, is that maybe I'm not measuring properly. Maybe I'm connecting my multimeter to the wrong nodes. But I've tried to work around this when testing by measuring at several different points and while I can't rule it out, I doubt this is the problem. With that said though, if we look at attempt 8, I would set my positive probe in the positive battery post, and measure from the Vout pin and immediately after R1 ( Vin ), and after R2.....and sometimes this would get the same measurement in all spots, not every time though. I'd also try positive probe on the Vout pin and measure across R1 and also across R2. I'd try between R1 and R2 and measure to the negative post.....hopefully I'm painting a clear enough picture that I would take multiple readings and TRY to approach it with a logical method.

I know some people may have opinions on better ways to test power supplies, like resistor banks, or decade boxes, or light bulbs, or "reviews are for idiots." and that's fine but I'm not asking for work-arounds. Even if I don't build the constant current load that I'm attempting now, maybe a few years from now I'll want to try and do something completely different and new and need to understand op-amps at that point. My point is, I only pointed out my goal as background information, if anybody can and is willing to help, I'd be very appreciative of any assistance, but please can we only focus on the topics I'm bringing up and whatever information I need to understand them? I don't want/need a lecture on the decline of the journalistic profession and the moral depravity of contributing to its decay :/
 

Attachments

Thread Starter

manaduar

Joined Mar 25, 2014
3
We can call that the first question right there:
in example 7 & 8, knowing that my Vout cannot exceed my Vs+, then is this Vs+ considered +9v or 18v?

and

why in example 8 is my Vout not 18v or 36v?

if you didn't read the TL version, you're probably going to give an answer that I already addressed.
 

AnalogKid

Joined Aug 1, 2013
10,971
You are on the right track (power sources, feedback loop. gain equation), but you are missing some of the basics of how electronic circuits and their power sources relate to each other. We can fix that.

First first, you need larger resistors. A 741 can not drive a 10 ohm resistor. To make even 1 volt across it would take 100 mA, about 5 times its normal output current range. It's been a while since I've read the 741 data sheet, but most general purpose opamps can not be counted on for more than 10 or 20 mA at anything near their max output voltage. So swap your 10 and 100 for 10K and 20K, and when you get the connections fixed things will happen correcly. If you need lower values later, scaling can happen. Also, 10K and 20K means you'll be working with gains of 1 or 2 or 3 instead of 10. The lower gains make it harder to saturate the output, but still enough gain to tell if things are working correctly.

Now the crunchy parts.

All of your circuits suffer from a common problem, that there is no electrical connection between the input signal and the power sources. In #9 you almost have it, but there is no connection between the input battery - and the center tap of the two power batteries. The common circuit reference potential (Ground, system ground, or GND) does not have to be the lowest of all voltages in the circuit. The power connection in #9 with a center tap is not just valid, but what you want. But everything in the circuit has to have some relationship with GND, and one terminal of the input battery is floating.

Separate from all of that, the 741 is not a good part for this for several reasons, among them that it requires a lot of headroom. To get the output to get to +9 or -9 V, the Vcc and Vee pins have to be a minimun of +/_12 V. For reasons that will come up later, think about changing to an LM324 or LM358, and read their datasheets. Lotsa intro circuits.

Circuits 1, 2, 5, 8, and 9 are attempting a gain of 100. With a 9 V input, you are trying for a 90 V output with only 9 V power. To go forward with 9V power, you will need a way to reduce your input to only 1 or 2 volts so there is enough headroom to see the effect of gain. This can be a pot or a 2-resistor divider. Research or ask.

I know the circuit you want to build, have built it for myself and others. Without giving you another round of "just do this you dummy", try this. If you search for "constant current source" +schematic, Yahoo will cough up dozens of schematics. Plow through them and you'll notice that many are variations of a single theme, an opamp driving a power transistor, using a feedback loop to maintain a constant current. I know you don't want to leap there without learning along the way, but having a defined end point for the journey can reduce the wrong turns.

ak
 
Last edited:

crutschow

Joined Mar 14, 2008
34,201
To reiterate one of the basics of electrical circuits, all parts of the circuit need to have a return path to a common point, typically called "common" or "ground" (Gnd). If you remember that all the currents from all the signal sources and power supplies need to be provided with a path for that, then your circuits will be happy.
 

Thread Starter

manaduar

Joined Mar 25, 2014
3
ok, I just typed so much that it told me my post was too long and wouldn't let me submit :( So I gotta try this a little bit at a time.

Analogkid, you're a $%^&* saint. Hands down the most awesome help I've received by far.

between this statement:

First first, you need larger resistors. A 741 can not drive a 10 ohm resistor. To make even 1 volt across it would take 100 mA, about 5 times its normal output current range. It's been a while since I've read the 741 data sheet, but most general purpose opamps can not be counted on for more than 10 or 20 mA at anything near their max output voltage. So swap your 10 and 100 for 10K and 20K, and when you get the connections fixed things will happen correcly. If you need lower values later, scaling can happen. Also, 10K and 20K means you'll be working with gains of 1 or 2 or 3 instead of 10. The lower gains make it harder to saturate the output, but still enough gain to tell if things are working correctly.
and this statement:

Circuits 1, 2, 5, 8, and 9 are attempting a gain of 100. With a 9 V input, you are trying for a 90 V output with only 9 V power. To go forward with 9V power, you will need a way to reduce your input to only 1 or 2 volts so there is enough headroom to see the effect of gain. This can be a pot or a 2-resistor divider. Research or ask.
I think I'm understanding part of it. First thing I want to point out is that as far as the value of the resistors goes, something else I had tried was using 50k resistance for R1 (connected to output) and a 100k pot for R2. I used my multimeter to check the resistance of the pot before I hooked it up and it was going from 100 Ohms to 104 Ohms. So when I cranked it all the way across the full range, I would be getting a gain anywhere from 501 to 1.5 (I believe the math is right here). but when I'm measuring voltage, I might see a change from 8.6 to 8.8 or something to that effect. But it sounds like my logic is wrong reading your statement.

Circuits 1, 2, 5, 8, and 9 are attempting a gain of 100. With a 9 V input, you are trying for a 90 V output with only 9 V power.
Is this not something an op-amp should be able to do? I realize that they have upper thresholds so I won't actually see 90v, that was what I was refering in my original post when I mentioned a Vout threshold of 25v or something to that effect, but shouldn't I be able to take some incoming voltage value and be able to get a larger output voltage value if I have a supply voltage large enough (in other words, Vout can go up to saturation)?

To go forward with 9V power, you will need a way to reduce your input to only 1 or 2 volts so there is enough headroom to see the effect of gain. This can be a pot or a 2-resistor divider. Research or ask.
Trying to see the effects of gain was why I was adding batteries to my supply voltage to raise the saturation point (and basically the main issue I'm having). Is there a reason 1 or 2 volts would work better than 8 or 9 if you have the headroom (a high enough saturation point and such) to see the effects of a 1 - 4 gain? Are you refering to putting a voltage divider on the positive post of my input battery? I feel like theres something here that I'm not understanding that's one of my major problems.

So swap your 10 and 100 for 10K and 20K, and when you get the connections fixed things will happen correcly. If you need lower values later, scaling can happen. Also, 10K and 20K means you'll be working with gains of 1 or 2 or 3 instead of 10.
I have tried 50k resistor and a pot that goes from 100 to 100k, so I think that covers what you're referring to.

that's the first portion of my original post, I'll just start there. major thanks for all the help.
 

AnalogKid

Joined Aug 1, 2013
10,971
A standard opamp is not a switching power supply, so its output voltage can not exceed either of the + and - DC supply voltages. And most older parts like the 741 can barely come within 2 volts of them. So while your batteries are 9V, you have to assume that your output never will be greater than 7. Newer parts require less headroom, but there is no need for them here.

Attached is a page with three pairs of schematics. The left side mimics your original drawing style, and the right side is the same circuits drawn in the conventional manner. It is standard for schematics to indicate where power comes from and goes to, but not show every power connection with a line. This makes it easier to focus on the signal connections, which usually are the important parts. So all +9V arrows are connected together, as are all -9V arrows and all ground symbols.

Schematic pair #1 is what I think you were trying to do with your drawing #9. I cleaned it up a bit, used different resistor values so the 741 output doesn't saturate or go into current limiting, and completed the connections in the input circuit. As you adjust the pot from 0 to 9V, the output will try to go from 0 to 27V, but will clip around 7 or 8 volts. Try this and let us know how it worked.

If that worked, rearrange things as in #2. Notice the change in the pot connections.

Finally, #3 is different in that it is an inverting amplifier. As you turn the pot up, the output should go down. Note that the gain for this amp is 2, not 3. Equations and explanations are on the web.

ak
 

Attachments

#12

Joined Nov 30, 2010
18,224
I have told AK in a PM that I am happy about his contributions. Now I'm saying it in public. Most beginners are not as sharp as he is.
 
Top