Instrumentation Amplifier Ref pin buffer - Page 1
Forum section: electronics / projects

author: Dubbie
author_rank: Unknown
timestamp: January 25, 2018, 05:11:56 am
content: Hi,Just so I don't commit the sin of an X Y question, I'll explain what I am trying to do first.I need to sense the presence of a very weak magnetic field. I have bought and tested an Allegro linear hall sensor part. It seems to perform very well and from the distance I require sensing from, I get a reliable 1mV signal on my 6.5digit DMM.The part outputs a VCC/2 DC voltage, then swings above and below that depending on the polarity of the field. I plan to input the signal into a MCU ADC. I plan to run boxcar averaging of the readings which will run about 20-80hz and then trigger on a preset deviation. I was thinking that around 100 x gain would be good.I have two main constraints.1: power. I am working with an extremely limited power budget, so the lower power the solution the better. I plan to shutdown this circuitry when not in use.2: space. I have very little space. At the moment I have room for 1 dfn part of around 2 x 2mm and 4 0402 passives.My first idea was to use an ordinary op-amp in inverting configuration with a 1/2 vcc voltage divider on the noninverting input.I couldn't really get this to work well enough on the breadboard. My second plan was to use an intrumentation amplifier. I found this one:http://www.analog.com/media/en/technical-documentation/data-sheets/AD8235.pdfwhich looks good size wise, and the fact that it only needs one gain resistor. The problem is, it strongly recommends buffering the REF pin. Because I don't really care that much about accuracy, do you think I can get away with just a straight say 20k/20k divider? that will burn 100uA which isn't ideal, but doable.Here was my plan for the opamp which worked in the sim, but couldn't get it working nearly that well in real life.

author: Zero999
author_rank: Super Contributor
timestamp: January 25, 2018, 09:12:03 am
content: How about using the standard differential op-amp configuration?

author: tszaboo
author_rank: Super Contributor
timestamp: January 25, 2018, 09:43:21 am
content: I dont think G=100 would work. These sensors have an offset voltage:Quiescent Output Voltage VOUTQ B = 0 G; TA = 25°C 2.4 2.5 2.6The AD8235 has also 25mV offset.So the typical is 2.5V but the offset can be as much as 125mV. You cannot amplify that 100x.I would first look for a sensor with higher sensitivity.There are also things called Programmable gain amplifiers, some of them pin selectable gain, and no, they are not only for video/RF. Also for signals.

author: Dubbie
author_rank: Unknown
timestamp: January 25, 2018, 10:00:03 am
content: Thanks for the thoughts NANDBlog.Hero999, do you think it would improve on my circuit? I can’t quite see how it would. Also it blows my space budget for passives.

author: Zero999
author_rank: Super Contributor
timestamp: January 25, 2018, 10:40:13 am
content: Oh I see, the circuit I posted is no good. I was going to suggest the TLE2426 but it will be too big and draw 170µA.Do you know why the circuit you used didn't work? Offset does sound like a valid explanation.What Hall effect sensor are you using?Does it need to respond to DC or can it be AC coupled?

author: Dubbie
author_rank: Unknown
timestamp: January 25, 2018, 11:00:52 am
content: I think it was the offset. I will try again tomorrow with a soldered version instead of crappy breadboard. Also lower gain. I did think about ac coupling but I thought it would use a lot of power for the length of TC that I would use. Also it would take a long time to settle from wake up. I was trying to find a DC solution first. I don’t really care about the dc level, I just want to detect a 1mV change from ~1 sec ago.Part is:ALLEGRO MICROSYSTEMS A1395SEHLT-T

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 25, 2018, 01:54:39 pm
content: Just a couple notes:As to the sensor part, trying to make use of such low output levels means that your sensing chain would be very sensitive to any external magnetic perturbation. We don't know much about your setup and if it's going to be protected from this or not. But you may get a lot of false positives in a real environment, unless this is what you're looking for. Just something to keep in mind.Driving the REF pin of most instrumentation amplifiers from an high-impedance source is not a good idea and will degrade their CMRR a lot. In your case, since the negative input will most likely be connected to GND, this will translate to offsets that may make the design unusable at gains of 100 or maybe even 10.As others have stated and you are converging to, this is most likely an offset issue. One thing to consider is the mismatch between the Vcc/2 internal ref of the sensor and your own Vcc/2. This mismatch, however small it may seem, will get amplified by your gain and become significant. At a gain of 100, just 1% of mismatch will translate to 100%, thus getting the amplifier into saturation. I understand that AC-coupling may not be a solution in your case, because at such low frequencies, the transient behavior may make your circuit detect false positives and/or miss true positives.(As a side note, in your case, since you're dealing with a single-ended output, I don't see what benefits you would get from an instrumentation amplifier.)One idea would be to DC couple the sensor's output and to lower the gain to maybe 10, using a single-supply, rail-to-rail opamp, and make use of the ADC's resolution to be able to safely detect a 1 mV change. 10 mV on a 3.3V full scale is approx. 8.37 bits, thus giving you 3.63 bits of overhead if you have a 12-bit ADC. With some simple digital filtering, you may be able to detect the change in a reliable manner. (But again, I think it may be very sensitive to external perturbation.)

author: fcb
author_rank: Super Contributor
timestamp: January 25, 2018, 02:54:18 pm
content: Depending on your microcontroller, you could generate the 1/2 Vcc rail with a PWM. This would allow you to turn it on/off at will (saving power at the expense of boot) and also trim it fairly precisely to cope with the effect of hall sensor offset AND the large gain stage.If the weak magnetic field your looking for has definite on/off elements (e.g. perhaps a slowly rotating gear) you could easily write an automatic control to adjust slowly adjust the PWM for maximum signal.Other methods I've seen are using pair of identical sensors placed back-back to create a basic differential output, alright for tracking offsets caused by thermals.

author: Marco
author_rank: Super Contributor
timestamp: January 25, 2018, 03:43:01 pm
content: Quote from: Dubbie on January 25, 2018, 05:11:56 amYou get a reliable shift of 1 mV ... at a constant temperature and constant environment/earth magnetic field.You can of course use an auto-zero opamp and an integrated tempco matched resistor pair to reliably measure a 1 mV shift relative to 1/2 Vcc ... no problem at all (but forget about instrumentation amplifiers, they're not needed). I'd make sure that across a range of realistic operating conditions your Hall sensor quiescent point won't drift far more than 1 mV though, cause I'm relatively certain it will. In which case you need some kind of automatic calibration, in which case offset drift in an opamp and resistors stop mattering too.

author: MasterT
author_rank: Frequent Contributor
timestamp: January 25, 2018, 04:43:13 pm
content: I think you don't need an amplifiers at all, feed Vcc/2 and output directly to 24-bits ADC and all set since you already have uCPU in the project.At the moment I'm doing voltmeter with 0.1 millivolts precision, my NAU7802 turns out slightly non-liner in the 16-bits range - error 60 uVolts at 5V range.

author: tszaboo
author_rank: Super Contributor
timestamp: January 25, 2018, 05:18:50 pm
content: I believe the LTC6910 does exactly what you want to do. Comes in SOT23 package, It has the VREF/2 splitter built in, plus a buffer for it, runs from 2.7V and a gain of 25/50/100, which is pin selectable. You need maybe just a capacitor for it.

author: Dubbie
author_rank: Unknown
timestamp: January 25, 2018, 06:16:11 pm
content: That looks perfect NANDBlog. Unfortunately I don’t have room for the package.  oh wait. It fits in 3x3mm. I DO have space. Thanks!Regarding tempco drift, I realise that there will be drift all over the place. I don’t care because I am just measuring the first derivative, not the absolute value.

author: Marco
author_rank: Super Contributor
timestamp: January 25, 2018, 06:40:56 pm
content: If you want a first derivative you can just just use your original plan (inverting amplifier, resistor divider on the non inverting input) and connect the hall sensor with a capacitor. Even with a high quality amplifier/divider like the LTC6910 you are going to run into the problem that the quiescent point of the Hall sensor won't correspond to the reference voltage of your amplifier and that the difference gets amplified. With capacitive coupling you avoid that headache entirely.You can even replace the boxcar filtering with a simple RC filter after the amplifier, though something like median filtering inside the MCU would be more robust against impulsive noise.

author: Dubbie
author_rank: Unknown
timestamp: January 25, 2018, 07:03:27 pm
content: Thanks for all the good advice. I’ll keep tinkering and let you know how I go.

author: Dubbie
author_rank: Unknown
timestamp: January 25, 2018, 10:33:34 pm
content: I think I have a solution.I put this together before realising that the opamp I grabbed was a 5V part. It seemed to work ok for this anyway.I settled on a gain of 20 which seems to be a good compromise between offset mismatch and gain for the ADCthe first image is the steady state.The second is my messy bench.The third is waving a HDD magnet about 180mm away from the Hall sensor.Lastly, waving my phone with it's speaker magnet about 90mm away.I plan to hook it up to a MCU next and see what sort of garbage I get through the ADC. I am sure it will be a mess compared to the 10 PLC of the DMM. I think a bunch of averaging or median filtering will be in order.Thankfully for my application I can tolerate a few false positives.

author: nctnico
author_rank: Super Contributor
timestamp: January 25, 2018, 10:46:27 pm
content: Quote from: Dubbie on January 25, 2018, 05:11:56 amThe datasheet says the reference input has an input impedance of 200k Ohm so with 20k/20k you have an error of 10%. However there are regulators with very low operating currents. I'd get one of those to minimize part count.

author: Someone
author_rank: Super Contributor
timestamp: January 25, 2018, 11:14:24 pm
content: Quote from: Dubbie on January 25, 2018, 06:16:11 pmAt which point its very similar to PIR detection circuits, they might get you hits when searching for opamp applications.