Go Down

### Topic: Amplifying a 100 mv signal from a pressure transducer to 0-5V or 0-10V (Read 6027 times)previous topic - next topic

#### TomGeorge

#30
##### Oct 10, 2015, 11:09 am
Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom.......
Everything runs on smoke, let the smoke out, it stops running....

#### raschemmel

#31
##### Oct 10, 2015, 11:13 amLast Edit: Oct 11, 2015, 05:05 am by raschemmel
The OP doesn't have one. He only simulated it. That's his simulation.
The LT1215 GBP is 23 Mhz.
Gain for f= 40 kHz, Vin = 0.100 V, Vout = 5V p-p (gain = 50)
fMAX= 23 Mhz/50 = 460 khz
That should still exceed FS with 100 mV input.
Look at gain of OP's simulated circuit schematic  (SAME circuit as Instrumentation Amp on page-1 of LT1215 datasheet.

OP is simulating a VOLTAGE SUBTRACTOR /DIFFERENCE AMPLIFIER with a DIFFERENTIAL AMPLIFIER circuit schematic.
(He has 2 inputs instead of one. )
Difference Amp is Vout=( V2-V1)

Differential Amp has only ONE input. The Pressure sensor outputs (+Output & - Output) should connect to V- and V+.
His simulation is wrong because he has TWO inputs ( wrong simulation configuration)
Actually, if the circuit really was a Difference Amp ( instead if a Differential Amp) the output
would be zero with two equal amplitude inputs.

As you can see from the scope shots, the Differential Amplifer circuit shown on Page-1 of the LT1215 datasheet works fine with an input of 100 mV at 40 kHz and produces and output of 5V (approx)
FYI, RESISTOR VALUES
113 - 47 = 66 => 68
47+68=115 (close enough)
115 ~ 113
1020-470= 550 => 560
470+560=1030 (close enough)
1030~1020

See attached for 40 kHz Reference Clock and Frequency Counter.
Both are Plug&Play: connect Freq Counter (// Input: Pin D5) to Reference Clock UNO (#define ref_clock 3) to measure 40096  Hz

Click "File/Save buffer to file"

Quote
Frequency Counter
Frequency: 40096 Hz.
Frequency: 40096 Hz.
Frequency: 40096 Hz.
Frequency: 40096 Hz.
Frequency: 40096 Hz.

As you can see, the clock generator is stable.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### alitarraf

#32
##### Oct 14, 2015, 02:37 am
Raschemmel, Thanks so much for all the detailed info and your uno sketch.

For the resistor values, I am still having some issues though.

Will wiring my LT 1215 as a 2 op amp instrumentation amplifier with the following resistor values do the job?(See the attached schematic)

Does it matter what I select for R4 and R3? Obviously R1/Rg is setting my gain, right?

With this clarified I will order the L1215 and wire it up with resistors I have around.

Thanks
Ali T.

#### raschemmel

#33
##### Oct 14, 2015, 04:01 amLast Edit: Oct 14, 2015, 04:02 am by raschemmel
Quote
Does it matter what I select for R4 and R3? Obviously R1/Rg is setting my gain, right?
If R1 = R2,
and,
R3=R4,

then the only thing that matters is that 2 x (R2/Rg) = 48.54
because R2/R1 = 1

To be honest, I used a 5V test signal, and a voltage divider of 100k & 2.2 k with the 100 k as the input and the 2.2 k connected to GND and the junction of the two as the output. This gave me a voltage divider with the equation:
Vout = VIN x 2.2/102.2 = VIN x 0.02152
Let VIN = 5V,
Vout = 5 V] x 0.02152 = 0.10763  = 107.63 mV
I connected the V-IN - of the LT1215 two amp instrumentation amp on page 1 of the datasheet to GND, and connected the output of the voltage divider to the VIN + input.
The output was about 4.4 V , which equates to a gain of 40, which is double the Differential Gain shown in the graph. I don't know why. My plan was simply to try it and see what kind of gain I got
using a 100 mV input  and it turned out to be much better than I expected. You shouldn't have any problem with yours and you can use the 40 kHz Reference Clock Generator sketch to test it. (assuming you have at least two arduinos.) You can use the Frequency Counter sketch to measure it.

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### alitarraf

#34
##### Oct 14, 2015, 04:34 pm
Thanks, I will order it, and try the circuit and post my result.

Ali T.

#### alitarraf

#35
##### Oct 23, 2015, 06:02 pm
Hey everyone!

This is an update on my progress. So I got some results for the ADS 1115 board from adafruit that I would like to share, and also need to hear your opinion on how to tackle the noise issue.
Attached are:
1- Circuit schematic exactly matching the adafruit connections except I added the ground wire from my sensor to the ground of the arduino near Aref.
2- Data collected
3- Arduino sketch

The pressure sensor is 100mv for 35 bar which means an output of 2.857mV/bar.
The initial set of data has an amplitude variance of a bit more than 1mv corresponding to 0.35 bar, and I would like to lower that.

So my question is how to minimize the noise variance, to have a better signal to noise ratio?
Applying an FFT on the data collected is showing a low frequency noise ~0.01-0.03Hz.

One more thing I should add, I am using the ADS 1115 with a gain of 16, and a range of voltage of +- 0.256V, so 1 bit is 0.0078125mV for the conversion from ADC value to voltage in the plots.

Thank you!
Ali T.

#### raschemmel

#36
##### Oct 23, 2015, 06:14 pm
Why don't you insert an RC LPF in between the sensor and the ADS1115. Did you remember to change the code from the default to the ADS1115 code ?

Google RC LPF for further info. Time constant = R*C . Cutoff frequency = 1/RC
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### Magician

#37
##### Oct 23, 2015, 06:49 pm
Congratulation, you did your first step with data acquisition.
So my question is how to minimize the noise variance, to have a better signal to noise ratio?
Applying an FFT on the data collected is showing a low frequency noise ~0.01-0.03Hz.
What software calculates fft? Your peaks, in 0.01-0.03 likely to be windowing problem, what kind of windowing you apply?
Printing data over serial one by one isn't gonna to work above 10 samples / sec. Especially with low serial baud rate, increase to 115200 at least.  To get correct fft results, you must acquire samples precisely  in timing, there are libraries TimerOne or MsTimer2 that could help you to run "results = ads.readADC_Differential_0_1();  " periodically, let say 500 Hz, but you have to define a sampling array, store data to this array and print it to PC ones it finish.

#### raschemmel

#38
##### Oct 24, 2015, 01:24 am
fc=1/(2*Pi*R*C) => C = 1/(2*Pi*fc*R)

Let fc = 100
Let R = 100

C = 1/(2*Pi*100*100)
C = 15.9 uF
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### alitarraf

#39
##### Oct 24, 2015, 02:06 am
Thanks Magician! I did the FFT with Origin Pro. By windowing you mean the start point and end point of my time array?
For the timing I just used the Millis() of arduino and printed it over serial at a 9600 baud rate. My understanding is that the interval of timing matters more than the precision time tracking. But I will give it a try at higher baud rate to see if there is any difference.
I am not aware of the libraries you mentioned, I will look into them, and see how can I implement.

Raschemmel, yes I modified the standard arduino sketch. You are essentially saying that I do a low pass filter with a resistor and capacitor, I should give that a try also. In your example calculation you use fc =100, should it not be 0.006Hz, since I have the first peak amplitude at that point from FFT?

Thanks
Ali T.

#### Magician

#40
##### Oct 24, 2015, 02:17 am
Quote
For the timing I just used the Millis() of
There is no milis() in code you posted .
Quote
My understanding is that the interval of timing matters more than the precision time tracking.
I do not understand, hope you are not a troll-bot?  Or there is z-troll bot some where in the middle between us, pretty common things in crappy banana republics.
Quote
By windowing you mean the start point and end point of my time array?
I'm not familiar with Origin Pro.
https://en.wikipedia.org/wiki/Window_function

#### alitarraf

#41
##### Oct 24, 2015, 02:33 am
Check the red box in the attached picture for millis().
Do you think millis is accurate enough ?

Window function looks interesting, didn't know about them. So how do I deal with them in this case?

Ali T.

#### raschemmel

#42
##### Oct 24, 2015, 03:04 amLast Edit: Oct 24, 2015, 05:07 pm by raschemmel
A low pass filter is centered at the midpoint of cutoff frequency. It isn't intended to filter out every single spike. If that is your criteria then yes you should recalculate but personally I don't think it matters. You're measuring pressure and if you get the measurements you want then you can implement a S/W LPF if it makes that much difference to you.  What is the purpose of the pressure measurements ?

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

#### Magician

#43
##### Oct 24, 2015, 03:16 am
Is this software package?
http://www.originlab.com/index.aspx?go=Products/Origin/DataAnalysis/SignalProcessing/FFT%20and%20IFFT
http://www.originlab.com/index.aspx?go=Products/Origin/DataAnalysis/SignalProcessing/FFT%20and%20IFFT

It's strange you didn't know windowing, second paragraph explains it.

Go Up