Raspberry Pi 设置上的 Max31865 [英] Max31865 on Raspberry Pi setup

查看:56
本文介绍了Raspberry Pi 设置上的 Max31865的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对编码很陌生.我正在尝试通过我的 Raspberry Pi 3 读取 PT100 rtd.我读到我需要 Max31865 RTD 放大器来正确读取数据,因为电阻太小了.我相当确定我已正确插入它.我正在使用这段代码,只是稍微编辑了一下.https://github.com/steve71/MAX31865

I'm pretty new to coding. I'm trying to read a PT100 rtd via my Raspberry Pi 3. I read that I needed the Max31865 RTD amplifier to properly read the data because the resistances are so small. I am fairly certain I have it plugged in correctly. I'm using this code, only slightly editted. https://github.com/steve71/MAX31865

到目前为止,我得到了两个不同的输出,但它似乎与我正在更改的任何内容(主要与 readTemp 关联的字节)无关,因为我已经运行了两次相同的代码并获得了两个输出.输出如下:

I'm getting two different outputs so far but it doesn't seem to correlate with anything I'm changing (The byte associated with the readTemp mostly) since I've run the same code twice and gotten both outputs. The outputs are as follows:

config register byte: ff
RTD ADC Code: 32767
PT100 Resistance: 429.986877 ohms
Straight Line Approx. Temp: 767.968750 degC
Callendar-Van Dusen Temp (degC > 0): 988.792111 degC
high fault threshold: 32767
low fault threshold: 32767

config register byte: 08
RTD ADC Code: 0
PT100 Resistance: 0.000000 ohms
Straight Line Approx. Temp: -256.000000 degC
Callendar-Van Dusen Temp (degC > 0): -246.861024 degC
high fault threshold: 0
low fault threshold: 0

任何帮助将不胜感激.

推荐答案

我现在正在处理完全相同的问题.你的 Pt100 是 3 线还是 4 线?

I'am dealing exactly with the same issue right now. Do you use your Pt100 with 3- or 4-wires?

我通过在原始代码的第 78 行设置正确的配置状态寄存器解决了这个问题 (https://github.com/steve71/MAX31865) 到 0xA2

I fixed the problem by setting the correct configuration status register in Line 78 of the original code (https://github.com/steve71/MAX31865) to 0xA2

self.writeRegister(0, 0xA2)

我使用的是 4 线,所以我必须将 bit4 从 1(3 线)更改为 0(2 或 4 线)

I am using 4-wires, so i had to change bit4 from 1 (3-wires) to 0 (2- or 4-wires)

0xb10100010

在此之后,我将其作为输出

After this, i've got this as output

config register byte: 80
RTD ADC Code: 8333
PT100 Resistance: 101.721191 ohms
Straight Line Approx. Temp: 4.406250 degC
Callendar-Van Dusen Temp (degC > 0): 4.406808 degC
high fault threshold: 32767
low fault threshold: 0

Brrr...我房间里很冷,不是吗?为了解决这个问题,我不得不将 170 线的参考电阻更改为 430 欧姆

Brrr... it's very cold in my room, isn't it? To fix this, i had to change the reference resistance in Line 170 to 430 Ohm

R_REF = 430.0 # Reference Resistor

很好奇,因为我红了很多次,这个设备上安装了一个 400 欧姆的电阻作为参考.实际上,在 SMD 电阻器上有一个 3 位代码431",表示 430 欧姆.嗯……

It's curious, because i red a lot of times, there is a 400 Ohm resistance mounted on this devices as the reference. Indeed, on the SMD resistor is a 3-digit Code "431" which means 430 Ohm. Humm...

但现在我在这里很温暖

Callendar-Van Dusen Temp (degC > 0): 25.091629 degC

最好的问候

这篇关于Raspberry Pi 设置上的 Max31865的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆