I have a pressure sensor that work like a wheatsone bridge. It is already balanced out of the box. When I power the unit with 5v , I read the voltage between Node A and Node B and this vary between 0 and 90 mV. 0 mv being ambient pressure and 90mv being 10 bars. This part work just fine.
Problems:
1 - Bad resolution on arduino: the voltage range is small (0 - 90 mV) and the arduino ADC is 5.8 mV per step giving me a bad resolution.
2- To obtain the value between node A and B, I need 2 arduino analog pin and a substraction in the arduino code. One pin should be enough.
My solution is to put an Op-amp as a comparator and amplifier (gain of 5 to 10 would be enough for me) between my sensor and the Arduino. This way, I need 1 analog pin and I increase the resolution. Example: with a gain of 10, my measuring range become 0 to 900 mV.
Base on google schematic, this sound simple but somehow, It don't work. Here is my Op-amp setup.
Based on the schematic (attached image) and reading in this website, I should obtain a Vout between 0 and 900 mV with these resistors:
R1 = 1k
R2 = 10k
R3 = 10k
R4 = 1k
since Vout = R3/R1 * (V2 - V1)
My Opamp is not rail to rail. I also only have +5 volts and 0 Volts not = / - 5 volts. I could biais the opamp input to 1/2 Vcc but I am not certain how to do this without interfering with the sesnor already balanced wheatsone bridge.
any insigth will be appreciated. If it work, It will turn out into a very affordable depth sensor that I will share on this forum.
thank you
More stuff:
My opamp is the one I have not the one I should use... LM358.
I also have some audio typical OPamp. (RC4558, Lm741, TL072cn)
There is really no info about the sensor but I my reading show it work on it's on.
the voltage range is small (0 - 90 mV) and the arduino ADC is 5.8 mV per step
You do not say which Arduino board that you have. Many Arduinos have a 1.1V Vref setting allowing 0.001075V resolution (10 bit ADC). Some processors also have differential analog inputs.
If you need the op-amp - Off the top of my head... Replace R4 with a [u]voltage divider[/u] (two 2K resistors) to bias the +input at 2.5V. That should bias the output at 2.5V and you can subtract-out the bias in software. (Of course, a 2.5V bias won't work with the 1.1V reference.)
I replaced R4 with a voltage divider. Doing this gave me an output of 2.5 volt but the output don't seem to rise with the sensor changes of state. At least if it do so, it is not with a gain of 10x like R3 and R1 are suppose to work. I would assume the value to rise to 3,5 volts (± 900mV).
When the sensor is powered without a opamp, I read about 2.5 volts on node A and B. This is why I tough biais was not required in the first place.
If I connect both instrument node to inverting and non-inverting output with nothing else. The opamp output is 0 volt. When I gently press the sensor, the output jump to 4.5 volt. It behave more like a logic switch (fully on / fully off). So it is comparing my two output but not gradually.
I have not tried the sensor + opamp on arduino yet (it work with 2 analog pin without opamp but with bad resolution). When the sensor will produce a nice 0 - 1 volts output with the opamp then I am confident analog read will be enough to get good reading on the arduino (any board).
Ditch the sensor, and buy one with integrated and temp compensated instrumentation amp.
They have a "10% to 90% of the supply" output, and are much easier to use with a common 5volt Arduino.
Need a different type for newer 3.3volt Arduinos.
Leo..
Got it! !!!
There is a mistake in the attach schematic in my initial post. R1 and R2 need to be equal and R3 need to match R4. With this and an OpAmp, I was able to have a full scale read between 0 and 4.5 volts with a LM358p. Probably way better if I use a more appropriated opamp. I just need to play around with the gain setting. My actual gain of 10 is apparently to high since I expect variation from 0 to 900 mV and have way more. Don't know why... ? Maybe because I decrease R3 from 10 to 1k.
Any of the many instrumentation amp chips will probably do for this. So long as you can set the gain
appropriately. An instrumentation amp is designed precisely for the task of amplifying a small voltage difference
between two points and ignore the common-mode voltage.
RC4558 TL072 are two very typical op-amp for stompbox circuit and audio amplification. What are the typical instrumentation OP-amp? I dig on google and found some IA at 100$ and other at 10$. There is so many option. Any suggestion?
Yes, that's electronics, there are many options. Did you check out the HX711? Its an instrumentation
amp combined with ADC commonly used for this purpose with Arduinos.
Standard opamps would be poor for this task, as the CMRR isn't high enough. Instrumentation amps
are normally built from 3 opamps in a particular configuration that boosts CMRR.
The principal benefits of an instrumentation amp are if there is considerable variation on the common mode voltage, or the output impedance of the signals is high.
Without the spec on the actual sensor I'd suggest since the op is getting good amplification the output resistance must not be huge. A simple op amp should do the job very well.
IMPORTANT: You need (diagram from your question, opamp18.gif) R1=R2, R3=R4
then for a zero impedance source the gain is given by Vout = (V2-V1) R3 / R1
so for a gain of 10 you could choose R1 = R2 = 10k, R3 = R4 = 100k
your actual gain will be a bit less due to the source impedance, but you can either adjust your resistor values or change the conversion factor in your program.
High gain differential amplifier using a single opamp relies on a precision resistor network
to manage drift/temperature sensitivity, instrumentation amp topology doesn't.
With the single opamp version 1% metal film resistors are probably a requirement for
stable behaviour - the gain needed is only about 50 here so its less critical than many
circuits.
I agree Mark, if youre measuring it with an Arduino against an internal reference you arent going to get the precision you would need an instr amp for; it Would reduce the effect of source resistance, but with the single op amp you can manage that with high value resistors. As modern op amps are so good ( you wont remeber the ones before the 741) that isnt a problem.
most of the effects can be balanced out in calibrartion.
My sensor output a signal from 0 to 90 mV. Based on my reading the HX711 can reach 20 mV, 40 mV or 80 mV depending on the gain setting and Vcc of the setup. In my case 3.3 V or 5 volts are either good. So a gain of 32 at 5 volt return 78 mV while I obtain about 51 mV with 3.3 volt. Is my understanding correct? https://www.robotshop.com/media/files/pdf/hx711-load-cell-amplifier-datasheet.pdf
And if my understanding is good, is there a HX7xx with higher range?
A wheatstone bridge can be made less sensitive by adding a resistor across it's two outputs.
In case of a HX711, use a resistor between A+ and A-
Try a value of 10x the value of the Wheatstone bridge resistors.
You might not need to if you power the sensor from E+ and E- of the HX711 (you should).
That regulated/stable supply is about 4.3volt, and should reduce output from a 5volt sensor by ~14%.
Leo..