This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Connect LM35 to analog input of EZ430-RF2500

Other Parts Discussed in Thread: LM35

Hi everybody,

I've a problem. I've tried to connect a temperature sensor LM35 (http://www.national.com/ds/LM/LM35.pdf) to P2.0 analogic port of  EZ430-RF2500. My question is about the electric connection with this 2 components. I have directly connect the Vout of LM35 and the ground of its power supply respectly to P3 and P1 of the board. The reading is wrong because for example if I misure the output voltage of the LM35 (open loop) with a multimeter is 0.26V (26 C°) and when I connect it to the EZ430-RF2500 I read 0.17V (17C°) and it is exatly the value that the ADC10 read and convert to digital.

What do I need?

 

Thanks a lot and sorry for my orrible english!

Daniele.

  •  

    Hi,

           Have u checked the voltage measurement by connecting to the other pins ?

           In that case r u getting the same voltage(with the same error)?

           How exactly u configured the ADC10 ?

     

  • Thanks for the answer!

    I've tried to connect the Vout to P4 (A1 analogic port), but the result was the same.

    I use the demo_ED code for EZ430_RF2500, with added of these lines before the battery voltage measuring:

    ADC10CTL1 = INCH_1; //P4
    ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE; //Vref 1.5V
    for( degC = 240; degC > 0; degC-- );    // delay to allow reference to settle
    ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start
    __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled
    results[2] = ADC10MEM;
    ADC10CTL0 &= ~ENC;

  • r u connecting any reference voltage at P7 pin of ur board(VRef+)? if , is it must be 1.5 V

    if not change ur SREF_1 to SREF_0

    add the below statement in ur code i.e., u have to wait until ADC conversion ends

    while( ADC10CTL1 & ADC10BUSY );      // wait for conversion to be finished

  • I try it, but it isn't the problem. Because always the Vout of LM35 when I connect it to the board of EZ430 go down the voltage.

    I think is correct to set SREF_1 because with REFON the ADC10 use its internally reference V+= 1.5V. The conversion is ok! The problem was why does the LM35 output voltage go down when I connect it to the Ez430 pins?? Is there an electrical problem so I need to use resistor or capacitor?

     

  • This case i dont know exactly, but i think there is a shunt resistance of very low value between ur port pin to GND which causes the voltage drop .

     

  • Hello Danielle,

    I verified LM 35 Datasheet and is written that Power Supply must be 4V until 20V. The target board consists 2 batteries (1.5 V). I think that is the problem.

    MC

  • Hi all, My team and I I have managed to solve the problem with regards to the LM35, We used a single 9V power supply and powered up the the LM35 and RF2500 using 5V and 3.3V regulators respectively.

    Now, my team have managed to connect the analog output of the LM35 to analog input P4 of the RF-2500.

    My next question would be, what are the codes that is needed to be edited in the eZ430-RF2500 Sensor Monitor Demo v1.02.eww ? Will it be displayed in the wireless sensor monitor based on the edited codes in the .eww file?

    Hope to hear from you all soon, developers :)

  • Hi,

     

     

    Can you provide a diagram of the connection of LM35 to the eZ430-RF2500?

     

    And the codes to read from LM35 and display the reading?

     

    Thanks

  • Hi there, my knowledge of the project might be a little rusty but nevertheless, here is what I can provide you :) Btw, it did display the temp on my comp perfectly :)

    My project was a chronos working together with the rf2500.

    here are the codes:

        // if it is time to measure our own temperature...

        if(sSelfMeasureSem)

        {

          char msg [6];

          char addr[] = {"HUB0"};

          char rssi[] = {"000"};

          int degC, volt;

          volatile long temp;

          int results[2];

         

          ADC10CTL1 = INCH_10 + ADC10DIV_4;     // Temp Sensor ADC10CLK/5

          ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + ADC10SR;

          for( degC = 240; degC > 0; degC-- );  // delay to allow reference to settle

          ADC10CTL0 |= ENC + ADC10SC;           // Sampling and conversion start

          __bis_SR_register(CPUOFF + GIE);      // LPM0 with interrupts enabled

          results[0] = ADC10MEM;

       

          ADC10CTL0 &= ~ENC;

       

          ADC10CTL1 = INCH_11;                  // AVcc/2

          ADC10CTL0 = SREF_1 + ADC10SHT_2 + REFON + ADC10ON + ADC10IE + REF2_5V;

          for( degC = 240; degC > 0; degC-- );  // delay to allow reference to settle

       

     ADC10CTL0 |= ENC + ADC10SC;           // Sampling and conversion start

          __bis_SR_register(CPUOFF + GIE);      // LPM0 with interrupts enabled

          results[1] = ADC10MEM;

          ADC10CTL0 &= ~ENC;

          ADC10CTL0 &= ~(REFON + ADC10ON);      // turn off A/D to save power

         

          ADC10CTL1 = INCH_1; //P4

          ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE; //Vref 1.5V

          for( degC = 240; degC > 0; degC-- );    // delay to allow reference to settle

          ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start

          __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled

          results[2] = ADC10MEM;

          ADC10CTL0 &= ~ENC;

     

         

          // oC = ((A10/1024)*1500mV)-986mV)*1/3.55mV = A10*423/1024 - 278

          // the temperature is transmitted as an integer where 32.1 = 321

          // hence 4230 instead of 423

          temp = results[0];

          degC = (((temp - 673) * 4230) / 1024);

          if( tempOffset != 0xFFFF )

          {

            degC += tempOffset; 


     

  • Hi, Thanks for providing me this circuit diagram and your response

     

    Can you tell me at which point of the target board should i use 1) from the sensor to the target board 2) from target board 3.3 regulator?

     

    Have you done this project or connection before?

    sy

     

    THanks

  • Hi,

    We have done this before. I cant really remember which pins, I gotta dig my archives. In the meantime, the answer to your question actually lies within the datasheet. Suppose you have some form of knowledge of I/O of MCU's. It should be pretty straightforward. If you dont, then be prepared to burn a few chips. If your chip has burnt out or spoilt, the light will just blink if I can remember correctly and no data will be transmitted. If it heats up, you know, you have done your grounding wrong and your chip is as good as a keychain.

    try look at inputs 4,5,6 and 8. If my memory serves me well, either 4,5,6 was for power and ground and pin 8 was for the input of whatever signal you are trying to transmit.

  • Dear Sir,

     

     

    Pin 4 (pin name:DVDD) (power-digital) 1.8 - 3.6V digital power supply for digital I/O

     

    Can i know the ground, can use analog ground? the Table 13 have 20pins but  the target board only have18pins

     

    Pin 8 is analogI/O

     

    is the above correct?

     

  • Can i use the pin 14 or 15 power(analog).. it also 1.8 -3.6V analog power supply connection?

     

     

    Thanks

  • Dear Sir,

     

     

    the code end with a open bracket { degC +=tempOffset;

     

     

    pls advise

     

     

    Thanks

**Attention** This is a public forum