LTC2983
Recommended for New Designs
The LTC2983 measures a wide variety of temperature sensors and digitally outputs the result, in °C or °F, with 0.1°C accuracy and 0.001°C resolution. The...
Datasheet
LTC2983 on Analog.com
Hello,
I'm trying to make my Arduino Due work with the Demo board 2210A, but it's look like I can't!
The communication seems to be ok, since if I remove it, I have an error, and if I remove the 2210A from the 2209A I have another type of error.
For now the 2209A is connected to the 2210A, I have a 1K connected between ch1 and ch2 as Rsense. I have 1k connecteed on pine 3 and 4, and a PT1000 between CH2 and Ch3
The CH 2 is connected to CH 4 either.
This is the code I'm using:
Sensor_1_9.begin(); retStatus = Sensor_1_9.setupSenseResistor( SENSE_RESISTOR_CH, RREF_PT1000 ); retStatus = Sensor_1_9.setupRTD( ECS_IN_CH3, LTC298X_TYPE_PT_1000, SENSE_RESISTOR_CH, 2, LTC298X_MODE_SR, RTD_CURRENT_50uA, RTD_CURVE_EUROPEAN ); retStatus = Sensor_1_9.setupRTD( ECS_OUT_CH5, LTC298X_TYPE_PT_1000, SENSE_RESISTOR_CH, 2, LTC298X_MODE_SR, RTD_CURRENT_50uA, RTD_CURVE_EUROPEAN ); Sensor_1_9.reject6050Hz(); Sensor_1_9.reportCelsius();
To read i'm using this:
Sensor_1_9.selectConversionChannels( channel ); Sensor_1_9.beginConversion( channel ); do { isDone = Sensor_1_9.isDone(); } while( isDone == 0 ); // wait until conversion is finished temperature = Sensor_1_9.readTemperature( channel );
And the library:
void LTC298X::reportCelsius(void) { uint8_t tmp = read8(LTC298X_ADDR_CONFIG_GLOB); //preserve old rejection settings this->write8(LTC298X_ADDR_CONFIG_GLOB, tmp & ~0x04); //unset B[2] } /* * Reject 60 and/or 50 Hz AC noises (75dB @ 1 ms MUX). Select single rejection for 120dB rejection. */ void LTC298X::reject6050Hz(void) { uint8_t tmp = read8(LTC298X_ADDR_CONFIG_GLOB) & ~0x03; //clear rejection bits and preserve reporting unit this->write8(LTC298X_ADDR_CONFIG_GLOB, tmp | LTC298X_REJECT_6050HZ); //set new rejection setting B[1:0] } * * Start sampling of ADCs. INTERRUPT will go LOW while conversion. If done, it toggles HIGH. */ void LTC298X::beginConversion(uint8_t ch) { if (ch > 20 || ch == 0) return; this->write8(LTC298X_ADDR_CMD, LTC298X_CMD_BEGIN | ch); } void LTC298X::beginMultipleConversion(void) { this->write8(LTC298X_ADDR_CMD, LTC298X_CMD_BEGIN); //B[4:0] = 0 } /* * Setup a RTD on a given channel. * Params: * ch | Channel (2-20) to use. CH - 1 is always used. CH - 2 is used on 3-wire and 4-wire RTDs. CH + 1 is used on 4-wire RTDs. * type | Any from LTC298X_TYPE_PT_10 to LTC298X_TYPE_NI_120 * sr_ch | Channel (2-20) of sense resistor * wires | Number of wires (2-5), while 5 equals to 4-wire and Kelvin Rsense * cs_rotation | Current source rotation (only available for > 2 wires) * sr_sharing | Sense resistor sharing, internal grounding * current | Current used for open circuit detection. Any from RTD_CURRENT_5uA to RTD_CURRENT_1mA * curve | Can be any of RTD_CURVE_EUROPEAN, RTD_CURVE_AMERICAN, RTD_CURVE_JAPANESE, RTD_CURVE_ITS_90 */ bool LTC298X::setupRTD(uint8_t ch, uint8_t type, uint8_t sr_ch, uint8_t wires, uint8_t mode, uint8_t current, uint8_t curve) { if (ch < (2 + (wires > 2)) || (ch + (wires >= 4)) > 20 || sr_ch < 2 || sr_ch > 20 || wires < 2 || wires > 5 || (wires < 4 && mode == LTC298X_MODE_CS_SR) || mode > LTC298X_MODE_CS_SR || type < LTC298X_TYPE_PT_10 || type > LTC298X_TYPE_NI_120 ) return false; //invalid //remove unnecessary casts uint32_t transmit = type; //B[31:27] transmit <<= 5; transmit |= sr_ch; //B[26:22] transmit <<= 2; transmit |= wires - 2; //B[21:20] transmit <<= 2; transmit |= mode; //B[19:18] transmit <<= 4; transmit |= current; //B[17:14] transmit <<= 2; transmit |= curve; //B[13:12] transmit <<= 12; //B[11:00] unused for predefined RTD this->write32(LTC298X_ADDR_CONFIG_CH1 + (ch - 1) * 4, transmit); // 0x200 + ch-1*4 return true; }
Anything Popout of your head of what's not working
Hi R_no - can you confirm your wiring configuration? You mention CH1-CH2 being Rsense, CH2-CH3 is a PT1000, and a fixed 1k resistor between CH3-CH4 , but then you also mention CH2 is connected to CH4? That wire is unnecessary - the current can flow through the PT1000 from Rsense to the 1k. Additionally the wire would cause the 1k and the PT1000 to be in parallel when the PT1000 was being measured (CH3 grounded internally).
However, your code shows channels 3 and 5 configured - so maybe the first part was a typo? Please confirm.
-Logan
P.S. the LTC2983 demo software can validate configurations as well as generate arduino compatible code for a given configuration. It may be worth taking a look at.
www.analog.com/.../ltc2983.html
First of all thnaks for the time you take to help me.
I did use the Demo software to cread the base of the design and to look into the code, but I wasn't not able to compile it for my arduino due. Even when I follow the Going Generic paper
Hmm some mistake on the wiring part, so here it is:
ch1-ch2 Rsense
ch2-ch3 PT-1000
ch4-ch5 1k resistor (just to check a vlue)
In shared mode the Demo tool tell me that I have to like the ch2, to ch4,ch6 and so on.
And I look onto the demmo code, and I have to do the mesur on ch3, and ch5, that's why you are seeing it.
OK - that makes sense, thank you.
OK - that makes sense, thank you.