Feeds:
Entradas
Comentarios

Archive for marzo 2011

Arduino y LM335

El LM335 es un sensor de temperatura:

Codigo para arduino:
Hi – just for information:…

I just got a LM335 temperature sensor, and after reading multiple forums and guides about it, I have got the following formula to work…

(((voltajearduino * lecturapinanalogico) / 1024) / 10) – 273.15

voltajearduino: analog reference voltage in mV (shoud be ~5000 for a 5v Arduino)
lecturapinanalogico: Value from analogread(pin)
1024: Arduino measues analogread in 1024th’s of the referece voltage – multiplying the input by the reference voltage (in mV) and dividing by the input resolution (1024) will give the input value in mV
10: input is 1mV/0.1°C; divide by 10 to give 10mV/1°C + decimals
-273.15: mesurement is in Kelvin. -273.15 to give celcius

So, for example…

(((5000 * 600) / 1024) / 10) – 273.15 = 19.87°C

Hope this helps someone!

Martin.

Read Full Post »