# How to connect LM35 Tempreture sensor to xbee

I suppose to calculate actual temperature of remote location using lm35 temperature sensor and xbee sensor. I am getting analog input from sensor, but I am unable to calculate temperature. complete scenario is given below.

# Scenario:

I have Connected LM35 Temperature sensor to XBee (Consider sensing node) pin0 which Analog (ADC) and sampling rate is 4 Seconds. Same I have another XBee as Coordinator which is accepting values from xbee sensing node. The coordinator is connected to UART-4 of BeagleBone via it's TX and RX pins. I have used python-xbee python library to read from serial port i.e. UART-4. I am successfully getting analog values from remote xbee. But I am not able to calculate temperature from received analog values.

# Sample Frames Which I am Receiving

{'source_addr_long': '\x00\x13\xa2\x00@\xd6\xa58', 'source_addr': '\xaa\xf9', 'id': 'rx_io_data_long_addr', 'samples': [{'adc-0': 182, 'adc-1': 466, 'adc-2': 1023}], 'options': '\x01'}


# Note:

adc-0 is pin of remote xbee where I have connected tempreture sensor.

adc-1 is pin of remote xbee where I have connected Humidity sensor.

adc-2 is pin of remote xbee where I have connected CO2 sensor.

How should I calculate temperature. Current temperature is ~ 16 to ~ 18 C

• What have you attempted thus far? You have a raw value from the ADC, convert it to voltage, and then convert that to temperature. Also, you have given no information about the XBee reference voltage, the humidity sensor, or the CO2 sensor (hint: datasheets are important). – uint128_t Jan 24 '16 at 19:05
• I tried to convert the analog values using equation. But its incorrect temp = (5.0 * analogRead(tempPin) * 100.0) / 1024; Source Link – Vaibhavraj Roham Jan 24 '16 at 19:19
• reference voltage is 3V3 – Vaibhavraj Roham Jan 24 '16 at 19:21
• Then it might be a good idea to change the 5.0 to 3.3. – uint128_t Jan 24 '16 at 19:28
• Isn't LM35 calibrated in degrees Celsius? Something like 10mV/∘C? – jippie Jan 24 '16 at 19:31

Temperature ( oC) = Vout * (100 oC/V)