简体   繁体   English

如何从DS18B20电压获取温度值

[英]How to get temperature value from DS18B20 voltage

I just connected DS18B20 temperature sensor to ADC of a device. 我刚刚将DS18B20温度传感器连接到设备的ADC。 But that device only shows voltage reading from ADC likve 1033 mV. 但是该器件仅显示了从1033 mV的ADC读取的电压。 But I want to get an actual temperature value from the voltage value. 但是我想从电压值中获得一个实际的温度值。 Is there any way to calculate or get the temperature value from voltage reading? 有什么方法可以从电压读数中计算或获得温度值?

Please let me know. 请告诉我。

Thanks, 谢谢,

You need to connect the 18B20 to a microcontroller, or a 1-wire host controller, connected to the microcontroller. 您需要将18B20连接到微控制器,或连接到微控制器的1线主机控制器。 (The difference is whether you want to write your own 1-wire protocol code ... go with the host controller). (区别在于您是否要编写自己的1-wire协议代码...与主机控制器一起使用)。 You'll get a digital value for the temp, no ADC required. 您将获得温度的数字值,无需ADC。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM