View Single Post
Old 01-12-2011, 05:11 PM   #1
nhanh0112
Đệ tử 4 túi
 
Tham gia ngày: May 2007
Bài gửi: 81
:
Chào bạn!
LM35 thì tui ít dùng. Nhưng tham khảo một số tài liệu thì có nói rằng
con này sử dụng điện áp từ 2.7-5.5v
Và nguyên văn công thức tính của nó với 5v và 3.3v là:
Code:
Voltage at pin in milliVolts = (reading from ADC) * (5000/1024) 
This formula converts the number 0-1023 from the ADC into 0-5000mV (= 5V) 

If you're using a 3.3V Arduino, you'll want to use this: 

Voltage at pin in milliVolts = (reading from ADC) * (3300/1024) 
This formula converts the number 0-1023 from the ADC into 0-3300mV (= 3.3V) 

Then, to convert millivolts into temperature, use this formula: 

Centigrade temperature = [(analog voltage in mV) - 500] / 10
tham khảo: http://www.ladyada.net/learn/sensors/tmp36.html
Chúc bạn đạt đc mục đích
nhanh0112 vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn