Interfacing of LM 35-temperature sensor with BOLT

Can we interface LM 35 sensor with BOLT.

I want to visualize temperature from 0 degree to 150 degree/100 degree over cloud. Please help in this issue

yes LM35 can be interfaced directly with Bolt.

The output pin of the sensor will be connected to pin A0 and Vcc pin of sensor to 5v pin of Bolt and Gnd pin of sensor to Gnd pin of Bolt.

In addition for stability connect a 1KOhm resistor between Output and Gnd pin of sensor.

Next the ADC values first need to be converted into voltage values. Using the formula

V = ADC * 5 / 1023

And then the temperature can be calculated by the formula

T = V / 10mV


T = V * 100 Degrees Celcius

1 Like
  1. So if i am using LM35 temperature sensor, i have to do the above calculation myself?
  2. Why is a 1KOhm resister required? what will happen if i dont use it, or use a 330Ohm resistor?

I have connected LM35 as instructed above. BOLT graph is showing constant value of 290 which by above formula translates to 141 deg celcius. The actual temperature in the room is between 24 and 26 deg celsius. What am i doing wrong? i have tried a 330Ohm resistor and also with 10KOhm resistor - i get the same values.

Hi Siddarth,
The formula posted by Datta was meant for an earlier version of Bolt WiFi module, which sampled an analog value in the range of 0 to 5 volts.

The Bolt WiFi version 2, which you probably have, samples analog values in the range of 0 to 1 volt.

As such if you replace the 5 in Datta’s formula for Voltage value, with 1, you will get approximately the correct reading.

In your case, the LM35 is reading a value of 28.34 degrees Celcius, when the Bolt WiFi module logs a value of 290.

how can i fetch negative temperature?

Hi @pvthakkar10,

As mentioned in the link below, you will not be able to use LM35 with the Bolt to get -ve temperature readings,

Please use a LM60 or LM61 instead.

What are the proper connections to connect Bolt IOT device to LM35 temperature sensor?

There are three pins, when you put the LM35 such that the flat surface comes above,

Right pin -> Ground (Connect to Gnd)
Middle Pin -> Output (Connect to A0)
Left Pin -> VCC (Connect to 5V)

for more check out:

1 Like

@vinayak.joshi when I am multiplying my A0 value to .097 it is giving this error
TypeError: can’t multiply sequence by non-int of type float

from boltiot import Bolt
import time
api_key = “”
device_id = “”
mybolt = Bolt(api_key, device_id)
while True: