I have problems reading output from AD594 via my cobra ADCs.
I have not been able to find a similar topic on the forum - or at least one that I understood
I’m novice to electronics, but an experienced programmer.
Its an type J thermocouple chip that translates readings into 10mV/Celsius
I use the ground/5v out on the cobra.
When i read from an Analog In (say ad3, I have tried others) the results fluctuate a lot.
If I use my volt-meter (across ground Vout (leg 7 & 8)) i get a very stable reading of about 0.204v +/- 0.001v. This corresponds to a temperature of 20.4C, which is very reasonable for my basement temp.
When using analog in pin 3, with a scale of 1…3300, i get readings between .27v and 0v. The result changes every time i read, i doesnt seem to depend the frequency with which i read.
I hope someone can explain this, and advice what to do,
Its not really a matter of precision. 10-bit adc would mean a resolution of 3.3mV = 1/3 of a degree Celsius, isnt that right?
Anything within 1-2-3 degrees celsius would be fine.
Below is a sample of the readings from a03 an mV (1 per second). In a similar period of time my v-meter readings was 192-194. I dont understand “digital filtering”, But if you mean (Im guessing ) applying statistical mehtods on data. But they are far to unstable to make sense at all.
I only have three wires on A03, gnd and 5V in/out.
the “whole” program is
AnalogIn ain = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.AD3);
ain.SetLinearScale(0, 3300);
int i = 0;
while (true)
{
int v = ain.Read();
i++;
Debug.Print(i.ToString() + " : " +v.ToString() );
Thread.Sleep(1000);
}
First I used the pc-usb as power supply for the cobra. Now I use a somewhat standard 9V 300 ma wall-plugin thing from the closet …
In the example circuits of the datasheet there are no capacitors present, and I was kind of hoping that since I bought a complete circuit, this would all be taken care of. Its so easy when looking at datasheets
I did in fact try to fiddle a little with a capacitor, but I lack knowledge to figure out the size and where exactly to put it …
The decoupling capacitors and other means of having clean signals and power sources are considered more automatically understood so you may not find them mentioned in datasheets.
I use an AD595 and K-Type on a Panda II fed by an ADG407 8 to one multiplexor. I get very stable results to a 12 channel datalog with this code.
int i;
//get thermocouple 1
address0.Write(false);// write address to multiplexor
address1.Write(false);
address2.Write(false);
Thread.Sleep(50);// let it stabilize before reading
VoltTemp = 0;
for (i = 0; i < 50; i++) //smooth 50 readings
{
int voltage = PinVoltage.Read();
VoltTemp = VoltTemp + voltage;
Thread.Sleep(1);// absolutely essential or you will get major TC noise
}
therm1 = VoltTemp / 50;
therm1 = (therm1 * thermAdjust / 10);
LCD.Write(1, 1, ((therm1).ToString("F0")));
You probably want to add at least one 0.1uF (100nf) capacitor at the analogue header from Ad3 to Gnd, then average 2-3 readings. You will also want a 0.1uF and possibly something like a 1uF cap from the AD595’s VCC to GND.
The ones on the AD595 will decouple it’s power supply somewhat and smooth out any voltage fluctuations caused by current draw or other ripple in the circuit. This will give it a nice stable power supply which it needs for conversions.
Your multimeter will have some smoothing and filtering in it (this is why when you switch voltages on a DMM it will not change to the new voltage immediately - it will lag slightly behind). This is why your reading is dead level.
I’ve only played with the AD595 briefly however I do recall getting very stable and accurate readings from K-Type thermocouple. I didn’t have any filtering or decoupling on mine, however I know my power supply was very stable and also very clean.
In my app I record every 5 seconds so the large delays I built in are no problem. Even on my commercial daq’s I have to crank the sample size up to 20 to get clean readings.
This is an example of the output for just the TC’s
The record rate in this set is 3 seconds, and it reads a tach, current, voltage and cfm as well. If you need faster reading you could use FOR loops and experiment with them until they become unstable. The response time for a K-type thermocouple is very slow, even 26 gauge so you won’t get much from faster readings.
I have a couple of suggestions that might save you some time as you build out your TC datalogger. The AD594 and 5 are two versions of the same chip, one biased for J-type and one for K-type. The K-type is slightly more linear and will stand higher temperatures.
If you are not using a split power supply, they will not read below 0 C and both are biased to read 25C at 250mv. Temperatures below 25 C will be slightly non linear because of this and that the ADC is non linear at lower voltages due to a slight offset which you will find in the board datasheet. This is addressable with a little calculus if it is a problem for you.
The AIN on the Panda must be 3.3 v or less so you can only read to 330C. My requirements were a minimum of 450C so I dump the output of the AD595 into a voltage divider before sending it to the An In pin. That is what the thermAdjust number in my code is for.
I would advise against putting any filter caps on the An In pin. It will give you a very smooth readings, but the reading will be wrong, invariably too low in my work, compared against a Handheld Atkins thermocouple meter.
The data sheet for the AD595-4 suggests that the ground to pin 1 is optional. If you are not using a split power supply I believe it is mandatory as I could not get reliable results any other way.
A 50 mfd cap as close to the Vcc of the AD595(4) as possible is also pretty much required
I think I have by now tried all your suggestions.
And it’s not really working.
I bought an 7805 based voltage regulator: http://www.electrokit.se/download/G008.pdf
Is it something like this I should use to supply power? - I not, would you recommend something?
And I have also tried the various suggestions concerning capacitors.
If I use the AD594 as a stand-alone thermometer without attaching a sensor (connect 1 and 14), I get somewhat stable readings, but they still fluctuate +/- 4 d.celsius measured once a second.
Using a sensor it fluctuates much more.
randomr: Do I understand you right, that you are using a moving average of 20 observations? That would of course smoothe things out, but also give unprecise and slow response times. I tried using 5 obs. but that still fluctuated a bit.
I dont expect that I need to measure more than 330 C (I need to measure the smoke temp. in my
chimney) probably 250-300 max.
Lars: The code I use averages 50 readings as fast as the Panda will read them (I assume the Cobra adc is not much different) except for the 1 millisecond Thread.Sleep. But if you look at the table I posted a while back you will see that the readings are very stable. This piece of equipment runs for days at a time and the graphed curves are extremely smooth. On all 8 thermocouple channels from 25C to 425c on therm 1 and up to 225 c on Therm 2 and 3.
The Thread.Sleep(1) is essential. Without it you will get major TC noise.
Here is a graph of the unit in operation with 6 of the TC readings shown. If you look at the blue green stack line, you will see the noise as I missed adding the sleep line in my first run through.
The data from my commercial Omega Daq’s is no smoother.
To give you a comparison, here is a graph from a $1500 16 bit commercial Omega DAQ. The timebase and y axis are different in this run and it is an average of 20 samples and slightly smoother than the $39 Panda, but not much.
You have to bear in mind that they are trying to make nanosecond wide reading of microvolts, pass them through 2 opamp stages and adjust for CJC effects.