Arduino Forum

Forum 2005-2010 (read only) => General => Frequently-Asked Questions => Topic started by: zitron on May 26, 2007, 05:42 am

Title: Frequently-Used OpAmps?
Post by: zitron on May 26, 2007, 05:42 am
Hi,

I need some kind of a instrumentation amplifier to get a pressure sensor to output 0-5V. It's basically a Wheatstone bridge with strain gauges. I am at a loss of which OpAmp to use, since there are like millions of them. I need one with a gain of about 500 - 1000, can operate at 5V so I can power it with arduino, and does not need negative voltage. I'm not a EE, I've only ever used OpAmps in one lab at school (the 741), what OpAmps do people usually use in the real world? Where can I get one?

Thanks guys,

-Z-
Title: Re: Frequently-Used OpAmps?
Post by: jims on May 26, 2007, 06:55 am
5v single supply, first guess is an LM324.
Title: Re: Frequently-Used OpAmps?
Post by: Daniel on May 26, 2007, 06:58 am
hi

I second the LM324... you might also want to check the book "the Art of Electronics" by Horowitz and Hill. They have an excellent section on choosing op-amps.

D
Title: Re: Frequently-Used OpAmps?
Post by: paulb on May 27, 2007, 04:02 am
The LM324 is cheap and a Radio Shack item, but the output doesn't swing within 1.5 v of positive supply, so the highest output you're going to get out of it is  3.5V. This could be OK is you used the AR voltage to scale things, but sometimes it's a fuss.

I like the newer CMOS rail-to-rail types/

I use the TLV2372  - an 8 pin dip dual, (2374 for a quad) rail-to-rail CMOS type, in my classes - around $1.00
LMC6482 is also a dual, (6484 for a quad) is a higher current unit that handles capacitive loads, if you're trying to drive anything with the op-amp. around $2.50

A lot of choosing an op-amp depends on what parameter you're trying to optimize. I'm not an EE either, though.

Paul Badger
Title: Re: Frequently-Used OpAmps?
Post by: zitron on May 27, 2007, 08:12 am

Thanks a lot, for the info. I think I'll try the LM324 if I can get a sample of it (No radio shack here in the UK!) . 3.5V should be OK for testing if things are working, the 10bit A/D is not enough anyway. I'm planning to get a 16bit A/D for it eventually.

Perhaps I should start a new thread for Frequently-Used A2Ds. I've got a 16bit AD7792, which works great but is too complicated to interface with. Anyone know a simple to use >16bit A/D that comes in a convenient DIP package?

-Z-
Title: Re: Frequently-Used OpAmps?
Post by: jims on May 27, 2007, 06:13 pm
What part of the AD7792 to you consider too complicated? Is 4 pins too many, or is the SPI and all the messing with registers?

I've got a parts order going in Tuesday, I could tack on a couple AD7705s and write up a new tutorial and library if it is just software complexity that is the problem. (I won't move to surface mount until autumn so the AD7792 is out for me, but they look similar in spirit. The registers are different, but the same ideas.)
Title: Re: Frequently-Used OpAmps?
Post by: zitron on May 29, 2007, 05:47 am
Actually, now I think about it, maybe I'm just complaining too much. The AD7792 has all sorts of settings that let you change the gain, update rate, bias currents and so on that I don't really need to touch, but I just "had to" mess with them because they were there to be messed with! That's what made the code really long. I think if I just left everything in default, it'll be just much simpler. What I was hoping for is a way to get data with something as simple as analogRead(), without adding a large amount of code. Obviously, that's not realistic with external components, and I'm asking for too much. It's a really good quality chip though, almost no noise at 16bit with a gain of 128.

-Z-
Title: Re: Frequently-Used OpAmps?
Post by: zitron on Jun 05, 2007, 10:00 pm
Just an update, I've bought a LM324, and got it working in 15 min. Although I think gain of 1000 might be to high, now its so sensitive that I can't even tough the sensor!

Got another question though, what do you do to get resistors to match?

-Z-
Title: Re: Frequently-Used OpAmps?
Post by: Daniel on Jun 05, 2007, 11:09 pm
hi

what do you mean by "matching resistors'...?

D
Title: Re: Frequently-Used OpAmps?
Post by: wandrson on Jun 07, 2007, 12:03 am
Since your original message discussed a Wheatstone Bridge I'm going to assume you are referring to matching the legs of the wheatstone so they are balanced.  For the two segments that are not part of the sensor based voltage divider you can use 1% precision resisters or you can sort through a large number of resistors of the same nominal value replacing one at a time in the Wheatston Bridge until you get a match that is close enough.  The other possibility is to use potentiometers and adjust until balance is achieved.
Title: Re: Frequently-Used OpAmps?
Post by: zitron on Jun 07, 2007, 06:56 pm
Thanks everyone for your help!

Sorry I'm not making this clear. What I meant was that since I was trying to build a Instrumentation Amplifier, which involves 3 OpAmps (using 3 out of 4 from LM324) connected via resistors, like this one from wikipedia:

http://en.wikipedia.org/wiki/Instrumentation_amplifier

From what I know, if I want to reduce the common mode gain and offset errors, the resistors R1's, R2's and R3's should be exactly the same. I don't have a electronics shop, I only have a couple resistors of each value, so trying them one by one is not really an ideal solution. I guess I can use pots, but that'll add 3 pots to the design, plus the one already on the Wheatstone bridge! Buying some 1% resistors may be the best solution.

I get the feeling that I'm following the book too much, trying to build a perfect amplifier. A little less CMRR may not matter in the end at all, since it's not like I'm building a precision instrument.

-Z-


Title: Re: Frequently-Used OpAmps?
Post by: Daniel on Jun 07, 2007, 07:21 pm
hi

for the resistors, buy 1% values, and if you want them matched even closer, use a decent multimeter to measure their values.
Don't forget to use good supply bypassing-- put at last a .1Uf capacitor near the op amp's power pins.

As to the 'ideal' amplifier with an LM384... this is perhaps a bit like trying to build a Porsche with Lego parts. Spend a few bucks and upgrade the chip! Try the TLC2274, or one of the ones mentioned by @paulb above. Here's a link (http://tinyurl.com/yow7sm) to TI's OP amp selector. If you sign up as a developer on their site, they'll happily send you a few free samples of their chips.  
D
Title: Re: Frequently-Used OpAmps?
Post by: zitron on Jun 10, 2007, 02:48 pm
Ok, a couple 1% 100k and 10k resistors plus some caps later, I have a working instrumentation amplifier with gain control! There is some offset error, but I can get rid of that by changing the pot on the bridge. Now I can measure pressure differences of less than 0.5m in altitude (it's better than that but there's a bit of noise because I'm over-sampling the A2D). If I need to improve the performance later, I'll probably get a better chip, or buy a instrumentation amplifier IC. Now all I need to do is figure out why my wireless mouse is interfering with the readings.

This has been really helpful, thanks everyone!

-Z-

Edit: Hey 0008 is out!
Title: Re: Frequently-Used OpAmps?
Post by: agent_orange on Jun 16, 2007, 10:47 am
Your best bet is to buy an instrumentation op-amp. Go to analog devices for example and check their op-amp range for inst op-amps.  Instrumentation op-amps have good CMRR and are specially designed to do the task you want. The data sheets often have good example circuits too.
Title: Re: Frequently-Used OpAmps?
Post by: Daniel on Jun 16, 2007, 09:21 pm
Quote
Ok, a couple 1% 100k and 10k resistors plus some caps later, I have a working instrumentation amplifier with gain control! There is some offset error, but I can get rid of that by changing the pot on the bridge...This has been really helpful, thanks everyone!


hey

why don't you write up a tutorial on what you learned, and put it in the Playground? It would be useful to other users down the line  :)

D  
Title: Re: Frequently-Used OpAmps?
Post by: zitron on Jun 18, 2007, 02:34 am
Agent,

Yeah, I've actually got an AD623 (a instrumentation Op-Amp) sample on the way which I'll use in the final design, and the LM324 will probably be used as a general amp for other stuff that comes along.


Daniel,

Do you want me to write something general about Op-Amps? I don't feel confident enough to actually teach other people what to do with Op-Amps. I feel like I know just enough to be dangerous. I guess I'll do a write up on how to interface with the MPX2102 pressure sensor, and kind of skimp over the Op-Amp stuff. I wish I knew how to use Eagle to make cool diagrams and such!

-Z-

Title: Re: Frequently-Used OpAmps?
Post by: Daniel on Jun 18, 2007, 04:37 am
hey @zitron

I just meant that if you have a working amplifier circuit, it would be good to document this, for others down the line who want to do the same. It doesn't need to be an overall theory article on op-amps, just a how-to on what you were able to do. If you want to make a paper-napkin sketch, I can turn that into an eagle-style schematic easily :)

D
Title: Re: Frequently-Used OpAmps?
Post by: zitron on Jun 19, 2007, 05:46 pm
OK, here's a picture:

http://iluvtocnc.googlepages.com/IMG_0762.JPG

Does it look correct? I used a 470 Ohm 1% for Rgain, so the total gain should be (1+2*R1/Rgain)*R3/R2 = 4270. I haven't checked if that's true, since I don't have anything that can measure in the mV range the sensor outputs.

What would have helped me would be a tutorial on how to do proper data acquisition. When I get all my stuff working, I'll write up something about amplifiers and A2Ds, but I'm going to need some help, since I don't know much about either!

-Z-