Please could someone help, I am trying to read a gas sensor which produces a linear voltage between 0mv and 40mv.
The ten bit ADC of the atmel328p obviously has a resolution of 1024, I would like a reading of two decimal places between 0% and 100% meaning 0 to 10000 so a 14bit ADC will give me 16384 resolution which would be more than adequate and allow for software calibration a lot better. I only need to read at a sampling rate of 1 sample per second 1hz.
Please advise.
Bear in mind that I would like to try to avoid going negative voltages on certain op amps as I will be running from either 6v or 9v battery power. i2c is always for me, a preferable method.
I have tried many different ideas, I have struck the limit of the pga on the ads1115, discovered the non linearity of the el cheapo op amps, learnt the nyquest theory and used oversampling and decimation to write a complex script and ramp generator to create false extra bits, just need some help. Instrument amplifiers need dc dc convertor to create negative volts and seem to run into bit component count and possibly not as efficient as a ads1115 type with just a bit better pga. Thanks
dialup_2001:
I have tried many different ideas, I have struck the limit of the pga on the ads1115,
How so ? I might guess (having not looked at the datasheet) that the noise figure might not be as good as an instrumentation amp, but ???
dialup_2001:
discovered the non linearity of the el cheapo op amps,
Since your signal is basically DC, I suspect most op-amps are linear enough but you do have to use them within their dynamic range limitations (common mode voltage and output swing vs supply voltages)
dialup_2001:
learnt the nyquest theory and used oversampling and decimation to write a complex script and ramp generator to create false extra bits, just need some help.
Hmmmm, OK. I can only guess this was for noise reduction that wasn't done in the analog domain. Given the response time of the sensor to what begins to be your accuracy is in the many 10's of secs, you really only need a BW of 1 Hz.
dialup_2001:
Instrument amplifiers need dc dc convertor to create negative volts and seem to run into bit component count and possibly not as efficient as a ads1115 type with just a bit better pga. Thanks
You can run them off a single supply and then apply some offset voltage. See what was done here, Fig 6. (that's an INA114). I don't know why they zero'd it at 1 VDC. I also think the schematic shown is missing the load resistor for the sensor.
Over what range of O2 ppms is your measurement supposed to work ? Given the 9-13 mV in air (20.9% O2), I might assume something like 75-80% O2 at the top end. Or is that because you used 9 mV in air to get ~40 mV in 100% O2 ? So it might be as high as 60+ mV if the sensitivity of the sensor is high. Will you really be measuring a 0 ppm (0%) O2 environment ? 100 % ??
Amazing, thank you so much, I will build that circuit this morning as I have a INA114.
I assume those two voltage dividers on the reference and the pin 3 are giving 1v and this is what you mean by zeroing it at 1v?
Would 218 x 7mv (which it currently measures in air with my multimeter) not mean 1.7v at the output which would be more than the reference voltage and so not work?
dialup_2001:
870mv at pin 5, 1.008v at pin 4 and output at pin 6 1.692v
No change when breathing on o2 sensor which typically brings it down to 18% O2
Thanks
OK, I think I (finally) have a working LTspice simulation of a INA114 and the circuit previously linked to. What do you have for a device, a DIP or SOIC package ? Then pin numbers above don't make sense, they aren't consistent with one or the other. Also do you have a 10k (or other) resistor in parallel w/the sensor outputs ?
(click on to open)
FWIW I swept a 0-100 mV output from the sensor (w/a 10k from Vin+ to Vin-) and get basically no output change when simulating the circuit shown in that link. I’m thinking about that result …
I’m not liking the circuit shown in Fig6 in the above link, at least for what I guess is the OP’s usage. First the writer determines he needs a gain of 218 and computes the Rg needed to be 213 ohms. Alas that number is wrong, it’s 230.4 ohms to get a gain of 218. Perhaps it’s was rounded up (231) and there’s a typo (231 → 213) ?
Then I quasi-question the gain of 218. The PDF states a range of 0 - 55 mV for the sensor (I think that to be correct). Applying that gain means a range of almost 12 V. That’s not possible on a 5 V supply. Perhaps the writer was trying to bias the system and get good resolution across a limited range of O2 ppms, putting the rest of the range into the either the + or - rails ? That would seem to be the case when you read the O2 calibration results, wherein the writer then states the gain expected is now 213 (another typo ?) and the usable range desired was 0 - 25 % O2. Whatever the case may be, if the OP of this thread wants the full 0 - 100 % range, the gain needs to be reduced.
Lastly, though I’ve not seen it explicitly in the INA114 datasheet, the INA114 output seems limited to range about 1.2 - 1.3 V from the supply voltages (per my playing around with the sim in LTspice). If those supplies are ground and 5 V, then the output is limited to be between 1.2 - 3.8 V before saturating. This is probably why the writer biased the output to 1 V (presumably w/0 % O2).
Perhaps there’s a rail-rail instrumentation amp now made (the INA114 is an old Burr Brown design), though my guess is that, due to noise reasons, there isn’t. That doesn’t preclude adding another rail-rail op-amp after the INA to shift and further amplify the 1 - 4 V signal into a 0 - 5 V one. Using that to add an active LPF would also be on my list of to-do’s. But first I need to re-ask … what does the OP of this thread need for a dynamic range of O2, 0 - 100 % or some lesser range ?
I can’t believe how much trouble you go to to help someone you don’t know!
would I be silly to think about using a 24bit adc with a pga even if I only ‘stretch’ the signal across 10% of its span I would still get a good reading?
I will post in about three hours sone other chips adcs I have lying around. Thanks
Perhaps there’s a rail-rail instrumentation amp now made (the INA114 is an old Burr Brown design), though my guess is that, due to noise reasons, there isn’t.
Turns out there is at least one rail-to-rail instrumentation amp ...
Going back to the original circuit … R1 (10k) and R2 (2.5k) set the wrong bias voltage for the float sensor. In my sim that results in the output being stuck in the lower rail, ~1.3 V. I think R2 should be 10k. Then, to match the 0-55 mV sensor output to the true range of the INA114, the gain needs to be reduced. Rg should be ~1400 ohms.
Could you assist me in getting some output from this even if I have to run it from 9v or something just so I can test although ina122 on order for arrival on Tuesday
dialup_2001:
Could you assist me in getting some output from this even if I have to run it from 9v
Easy peasy.
First you still want to allow the bias currents for the INA to flow and than means R1 and R2 connected as shown in the original schematic (or to the Vin- pin, it makes no difference), but make R1 = R2 and around 10k ea. This will put the sensor biased about halfway btw ground and Vcc.
Then set R4 to get you ~1.5 V (for now) at Vref, given R3 in the divider is 10k and whatever Vcc is. If Vcc is ~8.5 V then make R4 = ~2K. This will add about a ~1.5 V offset to whatever the O2 amp’ed voltage is. That will keep the INA114 out of it’s lower rail and into it’s linear region.
Then set the gain as mentioned above. You want (for now) the 0 - 55 mV output of the sensor to map into the 1.5 - 5.0 V linear range of the INA114 output (given Vcc > 6.5 V). Independent of Vcc (5 V or “9 V”) that’s a gain of (5.0 - 1.5)/0.055 = 63.6. Which makes Rg = 798 ohms, probably 806 or 820 ohms depending on what you have available. Using the above values (Rg = 806) I get the following simulated output for the sensor going from 0 mV (prior to 10 msec) to 55 mV (after 110 msec).
(click on to open)
As you can see Vout (of the INA114) runs from ~1.5 to 5.0 V given that sensor gain and output range.
OK, thanks. Running a LTC2400 with a precision reference and getting 9.xxxmv (so 1uV resolution, but not as it jumps about 3 digits so getting a resolution of about 3uv)
I am quite happy but my god spi code can be complex. I will try you suggestion tomorrow morning.