Add your comments about the Circuit Note found at www.analog.com/cn0206
Hello
I try to use the AD7793 for Thermocouple Measurement as describe in the CN0206. I'm working with a ATmega16 to communicate with the ADC. Do anyone have a c-Code example how to configure the ADC for this application? This would be very helpful.
Kind regards
Chris
Hello Chris,
attached is the c code for the thermocouple demo. This should be a good starting point for you. You can modify the code for the ATmega 16.
Regards,
Mary.
Hi Mary,
thanks for the c-Code! I have started my first measurings with a Typ-T Thermocouple. I'm using the thermocouple in a range of -20...60°C (ambient temperature). Now I have another few questions to this measurement:
1. Actually i used also a KTY81-110 Thermistor for the cold junction compensation. Would it not make more sense if I use a PT1000 with a higher precision instead of the thermistor? Is it possible to replace the sensor without any hardware modifications? Of course I have to update the software for a PT1000 measuring.
2. Is the following equation right?
ambient temperature = temperature of typ-T thermocouple + temperture of thermistor (pt1000)
Kind regards
Chris
Hi Chris,
1. Yes - you can replace the thermistor with a pt1000. The only change needed is to replace the thermistor with the RTD. No hardware changes are needed for this if you already are using an excitation current to supply the thermistor and a precision resistor, the resistor being used to set the reference voltage.
2. The thermistor is measuring the ambient temperature. So, the absolute temperarture at the thermocouple tip is
temperature of typ-T thermocouple + temperture of thermistor (pt1000)
Regards,
Mary.
Hi Mary,
thanks for your support. We could obtain good results so far! My next step is to implement a PT1000 1/3 B sensor.
First I have another question about the AD7793. During tests I notice that the first measuring with the AD7793 was always incorrect, also when I switch the channel and start measure on this channel. I try to fix the effect of "first failmeasurement" of ADC with delays and restart the ADC before measure, but I can't fix the problem. Actually I discard the first measurement before I start with the real measurement. Is there any possibility to fix this problem smarter? What is the precise reason for this effect?
Kind regards
Chris
Hi Chris,
Do you see this " first fail measurement" error when using the CN0206 Labview Evaluation software?
Neil
Hi Neil,
I don't use the CN0206 Labview Evaluation Software. I developed a electronic circuit for my own application.
Kind regards
Chris
Hi Chris,
can you detail the exact sequence that you are using when you see the fail measurement. Has a valid reading been taken for the cold junction and the Thermocouple at this point. If you send me the sequence being used, this may help identify the problem.
Regards,
Mary.
Hi Mary,
At the moment I use two AD7793 for two thermocouple sensors. Later I will work with 6 sensors. Yes I can make successful readings, all readings after the first reading are valid. Ensuring you find the detail sequece of the measprocess:
1. activate the first AD7793 over chip select
2. initialise the AD7793 for cold junction measurement (set the right register on channel 2)
3. start single reading, delay, read data, calculate cold junction temp
4. initialise the AD7793 for thermocouple measurement on channel 1
5. start single reading, delay, read data, calculate thermocouple temp (mean over 10 measurements
6. calculate the absolut temperatur with cold junction and thermocouple values
7. deactivate the first AD7793 and activate the second AD7793
8. repeat all steps with the second AD7793
9. .......
Actually I have to repeat the step 3. and 5. due to the first fail measurement, before I can use my data. i don't know the source of this effect.
I hope this could help you to enclose the error.
Kind regards
Chris
Hi Chris,
the procedure that you are using is correct. Is it the first conversion (CJ and TC) on ADCI only that are invalid or are the first conversions on ADC2 (TC and CJ) also invalid.
When you say first conversion, is this the first conversions after powering up the ADCs. When you select a channel, is the first conversion on the channel valid. If you are seeing issues after changing channel, then the problem may be because the external circuitry does not have enough time to settle when the channel is selected. Adding some time after selecting the channel would help.
What do you mean by the conversions fail - are the conversions totally invalid or are they different from the expected value by a constant amount.
Regards,
Mary.
Hi Mary,
the first conversation on ADC2 is also invalid.
With first conversation I mean the first conversation after selecting the ADC, it happens not just after powering up the ADCs. In the first conversation I have invalid data on both channels (CJ and TC). Only if I do another measurement with the same ADC I receive the valid data.
I already try to fix the problem with delays on critical sections, but the delays didn't solve the problem. It looks like the problem has another origin.
With fail conversations I mean diffrent values than expected. The first conversation measure indeed temperature, but this temperature doesn't react with the sensors (CJ and TC).
Kind regards
Chris
Hi Chris,
just to confirm, when you select the ADC (take CS low), the first conversion on the CJC channel and the first conversion on the TC channel is invalid. If you take further readings from this ADC, both the CJ and TC channels are valid. How is the ADC configured - are you using single conversion mode or continuous conversion mode. If you are using single conversion mode, the ADC performs a single conversion and then powers down. So, the on-chip bias circuit and the on-chip reference are powered down. Each time you perform a single conversion, these circuits need to power up. Can you try continuous conversion mode. Also, when CS is high, how is the ADC configured (power down mode or is it still converting).
Regards,
Mary.
Hi Mary,
I located the error. Afterwards it was simple, just like evreytime.
I configure the ADC in single conversation mode, so it needs 120ms (update rate 16.7Hz) to settle. Due to this data I programmed a delay of 200ms after a conversation. Unfortunately the delay function is limited to 17ms, after this limit the exactly delay could not be guaranteed. Finally I update the delay function and now the ADC works well.
Kind regard and thank you for your support
Chris
Hi Chris,
glad to hear that you have resolved the issue in your system and everything is now working correctly.
Regards,
Mary.