Op Amp - Page 1
Forum section: electronics / beginners

author: metrologist
author_rank: Super Contributor
timestamp: February 23, 2018, 02:38:54 pm
content: Would something like this work if Rs is set up to produce 0 to 50mV and R1=1k, R2=100k?

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 23, 2018, 03:10:57 pm
content: A couple of things...The input resistance (looking into the inverting configuration) is 1000 ohms. How are you generating the 0-50mV? If is from a current source, then the resistance of Rs needs to be much less than 1000 ohms if you want it to be accurate (0-50mV).Is the opamp powered with 0 and +5volts? If so, the 0-50mV input wants to drive the ouput of the opamp from 0 to -5Volts. Your opamp cannot go below ground as shown.I have attached a simulation file that will help you think about the problem and experiment.

author: metrologist
author_rank: Super Contributor
timestamp: February 23, 2018, 03:30:52 pm
content: I was too brief.Rs will be very small - probably a shunt from a defective DMM or just a piece if nichrome wire. The voltage across Rs does not seem that important because R1 and R2 will probably be formed from a 100k potentiometer.I see the function of the op amp as to make the inputs equal voltage. When current I flows, the voltage will be lower on the inverting input, so the amp will supply a positive voltage to balance the inputs.The op amp circuit will be powered from 0 and 5V, independent of the current source through Rs. I was looking for 0 to 5V out of the amp.I'm not able to view an asc file.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 23, 2018, 03:50:22 pm
content: OK. Yes, your circuit should work.I am attaching the schematic I simulated. Need an opamp that is happy with single supply and a small negative common-mode input. Op07 that I simulated is not the right choice. Opamp also needs a low offset voltage...maybe LT1077.RS = 0.1 ohmThe current varies from 0 to 0.5 amps.I plotted the voltage on Rs and also the output of the opamp.

author: metrologist
author_rank: Super Contributor
timestamp: February 23, 2018, 04:09:18 pm
content: Thanks! I had some OP27. I guess I could create a virtual ground, but it's not becoming obvious to me how the op amp has a reference to know the difference.I'm sure I have a few LT1077 too.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 23, 2018, 04:23:32 pm
content: Quote from: metrologist on February 23, 2018, 04:09:18 pmI have attached a very simple example of a differential input to illustrate the issue. In order for the bipolars to be biased "on" the common mode input must be large enough to support Vbe and the voltage required across the current source. A simple solution is to use a pnp input, thus allowing the CM input to go below ground. Designing an opamp CM to go below and above the supplies is a complicated matter, but can be done.

author: metrologist
author_rank: Super Contributor
timestamp: February 24, 2018, 11:07:11 pm
content: I tried a TL1072 and could not get any reasonable output. I tried connecting my RD power supply and step the voltage in either inverting or non-inverting inputs and it would not seem to work, just went to one rail or the other. Connecting a bare wire and touching it would seem to make the output vary in random ways.I found a TL1078 and tried building the reference circuit on TDS page 1.http://cds.linear.com/docs/en/datasheet/10789fe.pdfThis has been very frustrating for me. The first problem is I don't know what the chip pinout really is. My chip says 1078, and that should be the pinout shown on the right of TDS page 2. I tried building it twice as shown (I think I made a mistake on the first attempt, so got another chip).The second problem is, I might still have it wrong because the little +/- in the chip does not match the text labeling.The third problem is, I don't understand how to connect the circuit. If it is 100x gain, then it looks like only one op amp is needed, and you connect ground and whichever input you want. Otherwise, you connect both inverting and non-inverting inputs to your - and + inputs, respectively.two days and many hours, this is all I got, a non-functioning blob.If I connect RD, the output is 4.2V, does not matter what input voltage, does not matter if I connect ground and either input, does not matter if I connect to both inputs. If I connect a 12 inch wire between both inputs and move my hand around that loop, I can make the output vary from around 25mv to 4V. It's haywaire though, sometimes it goes one way or the other.The only thing I can think of to do now is try the other chip pinout. I tried labeling the chip pins in the image.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 12:58:48 am
content: Quote from: metrologist on February 24, 2018, 11:07:11 pmI am attaching an image showing how I think the connections should be made, given your assumption as to the package type. Looks like it is different than what you did.QuoteNot sure what you are seeing re "+/-" Maybe you could show a picture of the bare chip without soldering.QuoteThe schematic you are implementing is an "instrumentation amplifier" which means that it is designed to amplify a differential signal riding on a common-mode signal. The configuration you describe is OK for amplifying a signal that his no common mode and has the appropriate average level.QuoteI have been there...many times...many days. Don't give up.QuoteIn all problem-solving scenarios, I break the problem down to manageable chunks. Here is what I suggest you do since you are not certain about the pinout, etc.Put both amplifiers in unity gain configuration: connect the output to the inverting input on both. then take a ground-referenced signal and vary it on both non-inverting terminals. You should see the same signal at the outputs of both amplifiers as the sourcing signal.If you confirm that, then you confirm the pinout....that is a big first step.Next, configure ONE amplifier with the 100x gain connections. Then try it. You can see where I am going.Lets know of your progress!!

author: danadak
author_rank: Super Contributor
timestamp: February 25, 2018, 01:37:12 am
content: Your original circuit post is -1) G = 1002) 5A * .1 ohms = 500mV * G = 50V3) You sound like you want to do this on single supply, so OpAmp hasto common mode to ground on its inputsIn other words G is too high. Also makes more sense to do a non inverting design, soa diff amp makes more sense.Here is a handbook on the basics -http://www.analog.com/en/education/education-library/dh-designers-guide-to-instrumentation-amps.htmlRegards, Dana.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 02:01:15 am
content: Thanks for the support.To explain using the schema image you posted, pin 3 is labeled "inverting input" in text words. Inside the triangle metaphore, there is a +. What does that mean? I've never seen op amp input pins labeled +/- and not have the + mean non-inverting input, so why is there text that says inverting input? I also do not understand the significance of the words "instrumentation amplifier" nor differential signal and common mode (here I would wonder what the difference between an operational vs instrumentation amp, and common vs uncommon mode). I'm sure the function is obvious to me, but I do not understand the abstraction of the words.It gets more confusing as looking at your 10k between outA to -inA would seem it is going from outA to the non-inverting inA (since the other pin is clearly labeled inverting input). I think this is how I had it configured the first time, though.Is this not an unusual datasheet? Why did they even label the inputs in that sample schema that way? It has to be just plain wrong. Also, this is the first time I've seen a dip (pdip and etc. confuse much, why does plastic matter?) presented with different pinouts, and no clear way to know what you have. I wish I had the obsolete round package here.I'll have to find another chip and try a simpler follower or something.BTW, on page 11, fig1a and 1b, aren't those the same? I cannot follow the text preceding that because of it. One works but the other does not, it says...?For example, a 1mV input signalwill cause the amplifier to set up in its linear region in thegain 100 configuration shown in Figure 1a, but is not enough to make the amplifier function properly in thevoltage follower mode, Figure 1b.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 02:05:51 am
content: Quote from: danadak on February 25, 2018, 01:37:12 amI think the input voltage across the shunt is 0 to 50mv. G100 should produce 0 to 5V output?

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 02:24:33 am
content: Quote from: metrologist on February 25, 2018, 02:01:15 amOh, I see your confusion. Well, it is a differential amplifier...there is a noninverting and an inverting input.I have attached a diagram that should clear it up.To prove it to yourself, do a thought experiment.Ground the inverting input and drive a signal into the non-inverting input. Is it truly non-inverting?Next, ground the non-inverting input and drive the inverting input. Is it inverting? It goes through two stages...the first is non-inverting and the second is inverting.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 02:33:18 am
content: Quote from: metrologist on February 25, 2018, 02:01:15 amSee figure.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 02:48:16 am
content: Quote from: metrologist on February 25, 2018, 02:01:15 amThe datasheet is correct. Yes, it is a little confusing because they changed pinouts for different packages.LOL, the old TO-5 cans. Yes, they were cute but the sockets were more challenging...QuoteWell done!!! You found an error in the datasheet.See attached correction.

author: danadak
author_rank: Super Contributor
timestamp: February 25, 2018, 11:43:24 am
content: QuoteThe shunt shown is .1 ohms, max current is 5A, so Vmaxshunt = 5A * .1ohms = 500m mV input to amp.Voutamp = .5Vmax * 100 = 50 volts.Unless I am missing something.Your shunt of 50 mV @ 5A = .01 ohms.Regards, Dana.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 04:33:14 pm
content: Quote from: danadak on February 25, 2018, 11:43:24 amYes, my shunt would need to be 10 mohm. You might have been looking at Wimberleytech's circuit.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 04:37:20 pm
content: Quote from: Wimberleytech on February 25, 2018, 02:24:33 amIn this diagram, the reference circuit is reduced to a simple op amp. Does that mean I need to add a feedback circuit to the inverting or non inverting input, or can I simply just apply 50mA from my power supply to the inverting and non inverting inputs and see 5V output?

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 05:59:28 pm
content: Quote from: metrologist on February 25, 2018, 04:37:20 pmNo it does not. The gain is already established by the four resistors and two opamps, so no feedback is needed to set gain.Lets reset to your original goal: Amplify a 0 to 50mV signal to 0 to 5V. That can be done with one amplifier (LT1078) and two resistors as shown in the attached schematic.

author: bson
author_rank: Unknown
timestamp: February 25, 2018, 06:24:20 pm
content: You need to make sure the two inputs stay within the common voltage limits. The lower limit of the TL072 in particular is Vss + 4V! This means if one end of Rs is grounded it can't possibly work. For your particular scheme you need either a RR input op amp, or you need to bias the input. However, a TL072 in particular isn't very useful with a single 5V rail because of its high low end common voltage limit. You only get about 1V of input range...

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 06:36:03 pm
content: I was off rebuilding the circuit again. When I power it with no input, I measure 4V output. If I short the two inputs, I measure 4V output. If I connect a lead to the non-inverting input, the output goes to mV. If I connect my power meter to the inputs, it outputs 4V no matter what input voltage setting.this is TL1078 and I'm still trying to build the reference circuit on TDS page 1. There is not point in considering anything else if I cannot even get this simple thing to work.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 06:45:51 pm
content: Quote from: bson on February 25, 2018, 06:24:20 pmHe is using a LT1078, and measuring wrt ground, 0 to 50mV. The LT1078 accepts input as low as ground.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 06:51:55 pm
content: I updated my photo and labeled the pins. This one is working the same as the first one, and pretty much the same as the second one too.I've been having far too many problems to continue with this sort of thing.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 07:10:17 pm
content: Quote from: metrologist on February 25, 2018, 06:51:55 pmThe 1M resistor connected to pin 2...where is the other end connected?--it is hard for me to tell.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 07:26:32 pm
content: Next, ground pins 1 and 3, and measure the voltage on every pin of the package and report back.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 07:48:33 pm
content: I bent pin 7 straight up and just over the top of the IC. Both 10k and the 1M are soldered to it (that big blob).Grounding both inputs results in 3mV output.OK, I see the 1M needs to connect to pin 8.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 08:20:05 pm
content: OK, now if I have the inputs shorted together or open, I get 4V out. If I ground pin 3 I get 30mV. It does not seem to matter what I do with pin 1. If I connect my supply to pin 3 and ground, I get 30mV no matter input voltage. If I connect both inputs to supply, I get around 3V with 0V input and 4.2V with 60mV input. If I just connect ashort jumper to pin 3 and touch the insulation, the voltage goes down a couple volts, if I touch pin 3 I get ~600mV out.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 25, 2018, 08:44:08 pm
content: Connect pin 1 to ground and connect pin 3 to ground. Then measure every pin with respect to ground and fill out this table.

author: metrologist
author_rank: Super Contributor
timestamp: February 25, 2018, 11:33:53 pm
content: I had to do some manual labor for a while.1: 0V2: 0V3: 0V4: 0V5: 3mV6: 4.7V7: 3mV8: 3mV

author: rstofer
author_rank: Super Contributor
timestamp: February 26, 2018, 01:23:09 am
content: I may have missed it but did you specify exactly which package you are using? If so, my bad... Skip the rest!In any event, the pinout for the PDIP would be the center image and it is, by far, the more common package.The datasheet makes a reference to another device as justification for the bizarre pinout on the S8 package. Kind of like "we screwed up before and we thought we would do it again".

author: metrologist
author_rank: Super Contributor
timestamp: February 26, 2018, 02:21:59 am
content: I don't know which package I have. Does the the mfg make it possible to tell? They seemed to make some effort to say the presumed packaged is labeled as 1078, but does that mean any other package would have an additional marking? It's a small IC, but it is not like there couldn't be a few more letters printed on it. Perhaps the only thing left to do is try alternate pinouts. Or just do something else entirely. This sucks!

author: rstofer
author_rank: Super Contributor
timestamp: February 26, 2018, 02:29:49 am
content: The SO-8 package should have one edge beveled as in this package drawing:http://cds.linear.com/docs/en/packaging/05081610_G_SO8.pdfThe PDIP is just an ordinary DIP with no beveled edge:http://www.interfacebus.com/ic-package-plastic-dual-in-line-through-hole-description.htmlWe really need to get this squared away because you could be wiping out chips by the bunches.If it is a PDIP, you are putting the power and ground where you shouldn't. Here is the standard pinout:http://www.learningaboutelectronics.com/Articles/Summing-amplifier-circuit.php

author: metrologist
author_rank: Super Contributor
timestamp: February 26, 2018, 02:43:52 am
content: Is the SO-8 package the same as a pdip, dip, or any other acronym one could formulate? Just pissed at the industry now.No, the edge is not beveled. Of course, a beveled edge is the only illustration I recall seeing in the datasheet. So that was another reason I thought I might have that 'qpdip' config.Seriously, what's the difference between dip and qdip? plastic is all I was able to find. Good that does me because aren't they both plastic? I googled this crap at first too. Got no answers for my time.

author: metrologist
author_rank: Super Contributor
timestamp: February 26, 2018, 02:48:19 am
content: BTW, these are board pulls and I measured several chips on a board and found all pin 2 had continuity, and all pin 6 had continuity. How am I getting blunted?

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 26, 2018, 03:04:36 am
content: Quote from: metrologist on February 25, 2018, 11:33:53 pmThese numbers look good enough. Now, can you drive pin 3 to 20mV or something close? Then repeat the table.

author: rstofer
author_rank: Super Contributor
timestamp: February 26, 2018, 03:54:59 am
content: Quote from: metrologist on February 26, 2018, 02:43:52 amThe only similarity is that they all have 8 pins. That beveled edge is not JUST an illustration, on the SO8 when you look end-on, you will plainly see the bevel. There is no mistaking it!Look at the datasheet and notice that the two configurations have different letters after the LT1078 bit. Just knowing it is an LT1078 is meaningless if you don't know what package it is. The letters tell you. OTOH, so does the very pronounced bevel running the entire length of the left side of the package (pins 1-4).It's all there on page 2 of the datasheet. You can see from the shaded edge of the package outline which devices have the oddball pinout.http://cds.linear.com/docs/en/datasheet/10789fe.pdfThere's nothing in the datasheet that discusses qdip. I'm not sure I know what that is.At Digikey they only show 2 packages: PDIP (a regular DIP package for through hole mounting) and SOIC for surface mount. That kind of simplifies things. Is your device intended for through hole mountint? If so, use the PDIP pinout. If it is intended for surface mount, use the SO8 pinout.https://www.digikey.com/products/en/integrated-circuits-ics/linear-amplifiers-instrumentation-op-amps-buffer-amps/687?k=lt1078

author: metrologist
author_rank: Super Contributor
timestamp: February 26, 2018, 07:06:19 am
content: Quote from: Wimberleytech on February 26, 2018, 03:04:36 amPins 1/3 were grounded, so should I remove ground from both pins for this? Previously, "If I connect my supply to pin 3 and ground, I get 30mV no matter input voltage." That was on the output pin, so not sure about the others, and pin1 was floating.I left pin1 grounded:1: 0V2: 0V3: 10mV4: 20mV5: 600mV6: 4.7V7: 12mV8: 12mVThe output seems to track the input in this configuration, ~70mV in hits the output rail. I am guessing this is using just the B section of the chip.There must be a reason for the supplied reference circuit, but it says gain=100 and it also has notes that input is 0.03 to 1.8V, and output is 0.03 to 2.3V. That doesn't make senseQuote from: rstofer on February 26, 2018, 03:54:59 amThe chip is a small surface mount. There is a small bevel, but I've seen wider bevels before.There are no other marking on the chip. It has a stylized LT in the corner, then I think a date code of 406, then below that is 1078. No other characters.The datasheet says the PART MARKING is 1078 for the "odd" pinout, so everything I have tells me it's the odd pinout.

author: metrologist
author_rank: Super Contributor
timestamp: February 27, 2018, 03:07:05 am
content: My last try at this. After looking at the lt1078 datasheet a bit more and the notes below the reference schematic:INPUT RANGE = 0.03V TO 1.8VOUTPUT RANGE = 0.03V TO 2.3V(0.3mV ? VIN+ – VIN– ? 23mV)I don't get the input range because at 30mV, the 100 gain amp would be railed. The note in parenthesis makes sense for the output range.I set up a 500k bourns pot with a battery at each end, center tap set to 1mV. I connect battery ground to the inverting input (circuit -) and center tap to non-inverting input (circuit +). I see ~2V output. I increase input voltage until I hit the output rail at ~43mV input.I repeat the above with a jumper from the inverting input (-) to circuit ground. 1mV input yields about 2mV out. Increasing input voltage to ~75mV hits the output rail.I suppose that configuration is creating a virtual ground at the A- input, and then there is the ratio of 1M/20k, which is about the gain I am measuring. Maybe the A channel is canceling some noise and offset, if I want to pretend it's doing something useful.I think I am just going to use it this way by wiring my shunt between ground and the non-inverting input.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 27, 2018, 02:57:18 pm
content: Quote from: metrologist on February 27, 2018, 03:07:05 amThey are probably referring to "common mode" input range.QuoteThat is close to what I suggested some time back. I would expect more accuracy than you are seeing but if it works for you, that is fine.I have wondered if you are getting some artifacts that you do not see with a DMM but would see with a scope.

author: metrologist
author_rank: Super Contributor
timestamp: February 27, 2018, 06:11:32 pm
content: I read about common mode something as (V1+V2)/2 and differential mode as (V1-V2)/2.How would each of these modes be wired? I suspect differential mode could be modeled as a battery between the + and - inputs to the op amp, and common mode wired as that, and by tying the - input to circuit ground.Since voltage is not an absolute, it the inputs are independent of the circuit, then what are V1 and V2 measured relative to?Where would you expect to see more accuracy? I'm still not sure if the circuit is working or only half working.

author: metrologist
author_rank: Super Contributor
timestamp: February 27, 2018, 06:58:16 pm
content: I got this done...not what I see on my actual circuit, but I have no idea what I'm doing there. But the plot is what I was expecting.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 27, 2018, 07:15:52 pm
content: Here, use this. Take a look at the offset voltage in the sine wave and notice that I have a 0.04 volt bias at the non-inverting input. This circuit indeed requires some offset away from ground.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 27, 2018, 07:36:03 pm
content: Sadly, it appears that the 1078 is not happy with input at ground despite what the datasheet says on the facepage textual description. If I am to believe the simulations anyway. I dont have any I can test on the bench to confirm.<update>It may be more of an issue that the output cannot really go to ground. Taking a look at the output, I see issues with a true ground output. There is a note in the datasheet about. Truly, no single-supply opamp can output ground.

author: danadak
author_rank: Super Contributor
timestamp: February 27, 2018, 11:34:20 pm
content: RRIO opamps can swing to rails, but with no load.Once you place some load on an output, the outputs being CMOSP and N channel devices, all have non zero Rdson, so with loadthey no longer swing to rail.Regards, Dana.

author: metrologist
author_rank: Super Contributor
timestamp: February 28, 2018, 01:29:50 am
content: Thanks for all the information and support. I am especially pleased to have finally downloaded LTspice and to have spent some time playing with the circuit elements here. That exercise allowed me to see similar behavior that my test circuit was presenting, and now I have experienced a tool that is far more useful than anything I've used before.I have simulated some configurations with the LT1078 that I think will work for what I want to do.

author: Wimberleytech
author_rank: Super Contributor
timestamp: February 28, 2018, 02:06:29 am
content: Very happy about your progress!! LTSpice is a very powerful tool. I have used many $expensive$ simulators throughout my career and LTSpice performs very well by comparison.