Amplifying a 0.01mV to 3.2mV signal to Arduino ADC strength - Op Amp - Page 1
Forum section: electronics / beginners

author: gildasd
author_rank: Frequent Contributor
timestamp: November 20, 2015, 11:13:17 pm
content: Thanks to forum suggestions, I was able to set up basic three wire load cells to have insignificant drift (less than 0.01mV per day).I've tweaked that circuit during the last 2 weeks (long test times) and it'sbetterthan what I can measureNow the output must be converted from it's 0.01mv/0.30mV range to the Arduino ADC 3.2mV/3.3V range.That means that each 0.01mV must become about 3.2mV, or amplified 320 times.No worries for an Op Amp, 10kOhm on the positive and 3MkOhms between the negative and the output! No?Not really, I have about 1.645 V of common mode voltage to remove and the noise on the ground is higher than my signal (must use 6V Samsung phone chargers).So I have to make a difference amplifier. So far I've only tested three version of instrumentation amplifier:This is my "learning" circuit, a solder copy of what I was taught in class:Red = 6VBlack = GroundGreen = -2.8VTop white wire = reference sensor, not loaded.Bottom white wire = test sensor.Sorry about the crap soldering, tried going fast.10K and 100K to work with round numbers to learn.LM741's will be replaced by 14pin 4ex RC4136 or TL084 in definitive version.It does not amplify anything, but manages to reference the signal to ground effectively:I am just wondering that the trimmer (Cermet 100kOhms) is affecting the sensitivity but not amplifying?Thusly should the 10k resistor with the question marks be replaced by a 100k or 1M Resistor?Before this I did 3 test boards, I tried solving it on my own but I have only solder burn marks to show for it...Edi: Added extra view with a previous 4 ex TL084 - that did not work - doing the LM741 version to be able to trouble shoot it.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 20, 2015, 11:39:07 pm
content: Quote from: Aodhan145 on November 20, 2015, 11:37:37 pmIt's DC.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 20, 2015, 11:52:58 pm
content: There is no gain on the differential amplifier.Vout = (V2-V1)*(R3/R1)Therefore:Vout = (V2-V1)*(10k/10k)Vout = (V2-V1)*1Increase the 10k resistor going across the inverting input and the output of the differential amplifier to 3M resistor.That would be a gain of 300 which should be suffice for the arduino adc.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 20, 2015, 11:57:34 pm
content: Quote from: Aodhan145 on November 20, 2015, 11:52:58 pmWill do first thing tomorrow. Thanks!But what is the use of the central trimmer? Sensitivity?Is worth trying to get rid of the 10mV of common mode voltage left over after the first stage?

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 21, 2015, 12:07:32 am
content: Quote from: gildasd on November 20, 2015, 11:57:34 pmJust remembered this is an instrumentation amplifier the equation is different.Don't make the last change sorry. The central trimmer is for gain.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 21, 2015, 12:12:13 am
content: What about using a 9k resistor instead of the trimer. It would get your desired gain. If it still does not work check your soldering..

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 21, 2015, 12:34:31 am
content: Another possibility is getting an instrumentation amplifier IC. All you need is a gain resistor.http://www.farnell.com/datasheets/1837576.pdf

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 08:37:22 am
content: Quote from: Aodhan145 on November 21, 2015, 12:34:31 amI think I will...This a bit of an honest demonstration to my teachers that if amplifying such a small signal using stand alone op amps is possible, that doing it across 8 sensor is a bit nuts.The final boards as well as supplying data for my project, are part of the pcb designing class, so I must keep some parts on it, if I put a single fat IC in the middle, 4 leads in, one lead out and a power connector, the prof would not be amused!I'm looking at that IC, seems pretty cool. Thanks.Here is the schematic from last year's class:The formula given is:vs1-vs2=(1+R2/R1+R3/R1)(v1-v2)As I need to find R1:R1= (R2+R3)/(((vs1-Vs2)/(v1-v2)-1))If I replace the values:R1= (10000+10000)/(((0.0032/0.0001)-1))=645 Ohms.But it does not seem to be doing this...I did a pin by pin check of resistance and continuity, did not find anything amiss.

author: Zero999
author_rank: Super Contributor
timestamp: November 21, 2015, 01:45:32 pm
content: Quote from: gildasd on November 20, 2015, 11:13:17 pmI doubt you'll be able to get the desired sensitivity with general purpose amplifiers. You need an op-amp with a low offset voltage, bias current and high common mode rejection. The OP07 is probably the cheapest and most widely available which would be adequate but the OP747, LT1014, OP747, AD704 would be good.

author: Dave
author_rank: Super Contributor
timestamp: November 21, 2015, 01:49:29 pm
content: I am not surprised that the trimmer isn't actually altering the gain of your circuit. Nodes C and D from your original schematic are merely buffered versions of A and B.The way you have your circuit wired, you have a gain of exactly 1.You need to connect the inputs of the differential amplifier to the outputs of the first two opamps, not the feedback nodes. See attached image.

author: Andreas
author_rank: Super Contributor
timestamp: November 21, 2015, 02:13:26 pm
content: Quote from: gildasd on November 20, 2015, 11:13:17 pmHello,You should use the "right" OP Amp for this purpose.E.g. a LTC2053with best regardsAndreas

author: poorchava
author_rank: Super Contributor
timestamp: November 21, 2015, 02:20:41 pm
content: Yep, using the jellybean general purpose amps won't cut it here. Unless you're trying to proove some point, I'd go for integrated instrumentation amp. It's hard to beat performance of those using discrete solutions.Sent from my HTC One M8s using Tapatalk.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 03:02:06 pm
content: Dave, Well seen, will do.I got some more appropriate op amps to test, the 741 was a test with a known quantity.I 'm checking out data sheets of discrete instrumentation amps, the only major problem is that my comon mode current is too high. I think I can cheat by shifting the sensor current from 0v/3.3v to -1v/2.3v.Thanks for all the help.

author: Marco
author_rank: Super Contributor
timestamp: November 21, 2015, 03:37:13 pm
content: You really need an auto-zero differential amplifier for this if you actually want that 10uv accuracy. Like an autozero inamp, AD8293, MAX4208/9, etc.

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 21, 2015, 03:40:18 pm
content: He says its going to a micro so can't he just calibrate it in software? Then he could use general purpose op amps.

author: Marco
author_rank: Super Contributor
timestamp: November 21, 2015, 03:44:18 pm
content: Quote from: Aodhan145 on November 21, 2015, 03:40:18 pmA couple degrees change in temperature will destroy the calibration.With analog switches there are various ways he could make his own auto-zero mechanism of course.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 03:52:29 pm
content: Quote from: Aodhan145 on November 21, 2015, 03:40:18 pmSorry, I did not explain propely, I'm going for ready made instrumentation amps.

author: Marco
author_rank: Super Contributor
timestamp: November 21, 2015, 03:55:41 pm
content: As I said, you need to be looking at auto-zero inamps.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 04:50:40 pm
content: Quote from: Marco on November 21, 2015, 03:44:18 pmThe sensor to sensor drift is taken care by an unloaded sensor used as a common reference.As for global drift, it does not matter (if in the single mV range) as long as the sensor to sensor drift is the same (all the sensors on the same board sharing refs, voltage channels etc).I want to measure difference between sets of 4 sensors, no the weight on a single sensor.I'll be doing some filtering of data with software, right now the problem is getting it between the goal posts.I did a 24 hour sensor test outside, and the sensor drift was barely visible ( less than 0.01mv). I hope the IC's will fare the same!

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 21, 2015, 05:59:06 pm
content: Prototype it if you have the general purpose op amps. but when making the pcb for your class change the opamps.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 08:56:45 pm
content: Quote from: Dave on November 21, 2015, 01:49:29 pmDid your fix, here are some quick results:Trimmer at 9kOhms1) AB no load = 0.005mVApprox max range = 0.7mV2) CD = -2.668mV (fluctuates from -2.74 to -2.63mV)Approx max range = 2mV3) Vo to Ground =-8.32mV (fluctuates from -8.34 to -8.31mV)Approx max range = 2mVSo it's working (if not sufficiently yet), the base voltage is a bit high, I would like to see below 3.2mV, but this just a first "test".Thanks!

author: mk_
author_rank: Regular Contributor
timestamp: November 21, 2015, 09:27:30 pm
content: Quote from: gildasd on November 20, 2015, 11:13:17 pmEven if you are learning a lot doing it this way - take a look at the AD8237. This tiny (and cheap) Diff-Amp will -with some low tempco-Resistors - do it much better then you can do it....BTDT.Good luck

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 09:45:22 pm
content: Quote from: mk_ on November 21, 2015, 09:27:30 pmNot a bad part.But for this use, I would have to redesign the sensor supply to be negative... And the sense sensors to be positive.That's not a good idea with the sensors I have...Meanwhile,I've been testing the circuit:At 504 Ohms, the range is 23mVA 8 Ohms, the range is 740mV. Below that it becomes unstable.The results I'm finding are not linear nor correspond to the math model I was given...I'm going to do a final test board with a RC4136N.

author: Zero999
author_rank: Super Contributor
timestamp: November 21, 2015, 09:50:45 pm
content: Quote from: gildasd on November 21, 2015, 09:45:22 pmWhy? Do you not have access to decent precision op-amps?

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 10:23:25 pm
content: Quote from: Hero999 on November 21, 2015, 09:50:45 pmI've got what my local Chippy (Gotron.be) has for now.The sensor supply and output was only finished Tuesday. Been fooling around with TL084, LM324 and RC4136 to understand the problem before ordering parts.I really want to avoid a professor going "you could have done this with a 741 for less" during the defence stage of my thesis...I have to dedicate a page to "developing" each part, thus rejecting components.Having been an industrial designer, this is a bit senseless to me, but that's how they want it in my Uni...Testing the RC4136N is just prove it's not the excessive dead bug wiring that is causing problems (if theyhaveto ask)...The INA126/2126 seems to be near perfect, I only need to shift my voltage a bit.

author: Zero999
author_rank: Super Contributor
timestamp: November 21, 2015, 10:44:19 pm
content: An instrumentation amplifier such as the INA126, is definitely the way to go.Your local scupplier sells the OP07 and it's not expensive.https://www.gotron.be/en/componenten/ic-s/lineair/opamp/op-amp-prec-18v-dip8.html

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 10:56:15 pm
content: Quote from: blueskull on November 21, 2015, 10:15:12 pmI am going to trim my sensors with 10 Ohms Cermets (or equivalent).With 100 Ohms it's possible to get all sensors to 0.01mV to the ref but requires patience, I want to get to 0.001mVThen apply a gradual high pass filter on my results in software.These sensors work with 3.2V to 3.5V. After testing, 3.3V gives the most linear result to signal range.The bridge of the sensor is 3.3/~2=1.64V to the ground.So I am going to "cheat" in the final version by supplying 1.7V to the "positive" and -1.6 to the "ground" (added benefit of removing any remaining noise from the ground in the sensors).This will give a common mode voltage of 50mV for a range of 0.1mV. Still not perfect, but a ratio of 500 to 1, not 16000 to 1.This is not for a classic indoor industrial setting where I can get a "0" situation when everybody is having lunch etc (I'd just get cheap industrial scales and hack them).These sensors will be working 24/7 measuring wind force on a object - there is ALWAYS wind in Belgium...I'll have two sensor sets with two objects and I'll be comparing results between the two.If they both drift in a similar manner due to heat/humidity/barometric pressure, then I don't really care, only the difference between the sets matters.So far, the 24 hour tests have shown me that the sensors create far less drift than the connectors to the test board - they MUST be soldered.The max drift I get is 0.01mV for 20°C, but this the limit of what I can detect...I may sound confident, but I might be a total idiot, so don't hesitate to call me out/recommend a part.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 11:11:08 pm
content: Quote from: Hero999 on November 21, 2015, 10:44:19 pmCompletely forgot about it "slaps forehead"... It's even pin compatible with the 741... Used some on a project last year... Still got one on my desk...

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 11:20:19 pm
content: Quote from: blueskull on November 21, 2015, 11:01:52 pmThe 10uV is going to be amplified 330ex in an INA126 (1/3 of the max) then the result fed directly to the ADC of the Arduino.This is for the "1st gen" version, next year I'll have to do an evolution of my thesis in Flemish to get my diploma in two languages (has to with Port State Authority, IMO, Belgian government rules mumbo jumbo) and pushing the resolution way up, like you suggest, is amongst my plans.As an example, this year, I'm summing the result of the sensors per set, next year I'll be doing it separately per sensor, so I'll need exterior ADC's in any case.Thanks for your suggestions.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 21, 2015, 11:44:23 pm
content: Quote from: gildasd on November 21, 2015, 11:11:08 pmFFS... Put an OP07 as the third opamp of the circuit and at 500 Ohms, the range jumped from 23mV to 32mV "bangs head on desk".Edit: If one should feel the need to bang ones head upon ones desk, one should check for upturned 14 pins through hole parts, it hurts and ruins the legs.

author: Zero999
author_rank: Super Contributor
timestamp: November 22, 2015, 10:19:26 am
content: How about replacing all the op-amps with the OP07? They're not expensive!Quote from: gildasd on November 21, 2015, 10:23:25 pmThey may also want you to consider other, cheaper microcontrollers.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 22, 2015, 11:27:39 am
content: Quote from: Hero999 on November 22, 2015, 10:19:26 amThe Arduino was kinda imposed, this being outside on a roof, there is possibility of damage... Quick replacement parts are a must.Additionally, the datalogger from Adafruit is cheap and quite good, I2C parts are common etc.Only the sensor board will be marked in the electronics class, thusly, all the other "stuff" will be 100% off the shelf.The thesis itself is 90% the analysis of the data, 5% will be the electronics (mostly documentation) and 5 % the physical construction.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 22, 2015, 11:44:40 am
content: Quote from: blueskull on November 22, 2015, 10:38:10 amThat's so simple it should have been obvious!In fact I already did a test of basically what you are proposing, but it was outputting 0.8V with no signal...The 741 board was to understand what I was doing wrong.The only issue I have with your proposition is plugging in the sensor directly into the A and B pin.In my tests, the variable resistor on the sensor interferes with the input resistor on the Op amp.However, if I have proved that jelly bean Opamps are crap at amplifying 100uV to 10uV class signals, they do a great job at buffering them.So with a buffer upstream of your A an B pins, this should work.Then with a mV class signal, referencing to ground should be a far simpler proposition.In any case, this should be done with OP07 and not LM741's !This will be the way to go if for some weird reason reason I can't use the INA126's or the AD8237...I'll do a test Monday, thanks!Blueskull's proposition:

author: Kalvin
author_rank: Super Contributor
timestamp: November 22, 2015, 05:48:01 pm
content: Quote from: blueskull on November 22, 2015, 10:38:10 amI tried to verify your calculations. The voltage at input nodeawill not cancel out which will produce quite poor CMRR.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 27, 2015, 03:45:46 pm
content: I did a small circuit to test small voltage amplification of Op amps with varying burden voltages.Seems to work, I'll do a table of measurements of various Opamps tonightThe unity amp is done by a LM358, originally I used a Tl082, but that thing was drifting like a Japanese teen with an Acura up a mountain road.The weird loop is the ground linking all the unused pads: the circuit was picking up something RF.

author: exe
author_rank: Unknown
timestamp: November 27, 2015, 04:35:29 pm
content: Wow, I thought 0.01mV is well below the noise floor of an "open air" scheme...

author: gildasd
author_rank: Frequent Contributor
timestamp: November 27, 2015, 04:50:44 pm
content: Quote from: exe on November 27, 2015, 04:35:29 pmIf I get a nice curve to 0.1mV, then job done. Anything below that is a bonus.The common mode is selected on the unity op amp that goes to the non inverting, then the difference chosen on the second. All that remains is to mark the output of the test. Repeat till fingers bleed.Makes me wish I had a digital scope!

author: Aodhan145
author_rank: Frequent Contributor
timestamp: November 27, 2015, 05:09:51 pm
content: Quote from: gildasd on November 27, 2015, 03:45:46 pmHave you ever heard of one of these things called a solderless breadboard?

author: gildasd
author_rank: Frequent Contributor
timestamp: November 27, 2015, 05:17:34 pm
content: Quote from: Aodhan145 on November 27, 2015, 05:09:51 pmIn the uV domain the contacts on individual pins begins to dominate the measurements. In this case the cermet trimmers being a real pain.

author: gildasd
author_rank: Frequent Contributor
timestamp: November 27, 2015, 08:47:28 pm
content: A simple inverting amp, with a common mode of 100mV, does not work properly with a signal below 100mV.It basically flatlines with a 741 or an Op07 below50mVwith an output of -360mV. I can see that it starts trending to a straight above, but I can really test that because this circuit was not designed to test that.I tested in positive and negative to roughly the same result.Probably because the common mode begins to be reduced in size compared to the signal to be amplified.Using an amplifier this way, with a sensor like this, would impose having a super precise and stable common mode in the 1 to 10uV range... Nope.Building a sensor setup below 100mV common is difficult with the tools I have (Uni scopes don't go below 20mV per division and are noisy below 1mV...)I'm going more and more in the direction of doing this with Zener diodes furnishing a reference fed into a Unity amp.One at -1.6V (on a -3V rail) and the other +1.7V (on a 6V rail) = common mode of 100mV.So I'm going to rewire my board as a simple differential amplifier the test Amp.This is the setup I'm going to use:http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/opampvar6.html#c2R1=10kOhmsR3=100Kohms

author: gildasd
author_rank: Frequent Contributor
timestamp: November 29, 2015, 01:07:34 am
content: Test results:19 measurements done between -100mV to +100mV.100mV, 50mV, 25mV, 10mV, 5mV, 2.5mV, 1mV, 0.5mV, 0.25mV, 0.1mV, -0.25mV, - 0.5mV etc...The "error" is between the predicted result and the measurement.Common mode voltage of 100mVLM358as unity amp -OP07as difference amplifier:Average error at output: 4.84mVMostly due to a spike at 0.25mV (tested multiple times).OP082as unity amp -OP07as difference amplifier:Average error at output: 3.10mVThe error between 0.25mV and 0.10mV (the zone I'm interested in) is about an order of magnitude better than all my other tests.It's probably even better, but I can't test it more finely with my tools.OP082as unity amp -LM741as difference amplifier:Measurement breaks down below 1mV. It drifts erratically from positive to negative.However, down to to 2.5mV, it is far more stable than the OP07, so not so good for measuring, great for fine tuned power rails.500mV of common mode:LM358 as unity amp - OP07 as difference amplifier:Error in the critical zone multiplied by 2.Something I can't quantify; the measurement takes noticeably more time to stabilise.1.64V of common mode:LM358 as unity amp - OP07 as difference amplifier:Does not want to stabilise, keeps ramping up and down over multiple mV even with a signal of 100mVThis is exactly what is happening with the instrumentation amp I built earlier.Conclusion:The issue with the instrumentation has been found: common mode too high by over a magnitude.Don't use a 741 for DC measurements below 2.5mV! As expected.LM082 (thus LM084) works great with the OP07. Not what I expected.

author: gildasd
author_rank: Frequent Contributor
timestamp: December 11, 2015, 09:53:00 pm
content: Prof asked for another round of tests:I've gone all modular...1) Top right: 555 based negative current supply.2) Middle right: LM317 T positive negative rail micro supply (via voltage dividers this goes down to + and - 0,01mV stable.3) Bottom right: Opamp test board, bunch of voltage dividers, second connector to also test with common mode.4) Left: Power rails status leds. If I cross wires, the leds change. Avoids having to test the rails every time.It seems my multimeter's null is off by 0.0004V...This proves that a common mode is a must, below 0.0004 the results go nuts...

author: gildasd
author_rank: Frequent Contributor
timestamp: December 12, 2015, 01:02:33 am
content: If I was to use an OP07, having 0.5mV "below" the signal seems imperative.Above that the amplification is shockingly linear (even with my tools). Below that, it goes a bit weird...More tests tomorrow.However I'm beginning that that the best approach/compromise with the tools at hand is:1) Between 50 and 100mV of common mode.2) About 0.5mV of offset (easy to remove post amplification).Testing to be done:1) Put 100mV instead of ground.2) Summing amp.3) Full instrument amp.