Trích:
Nguyên văn bởi nhanh0112
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 
|
sắp chết đến nơi rùi nè,hepl me