【问题标题】:Temperature Regulation Circuit Arduino温度调节电路Arduino
【发布时间】:2019-03-24 16:54:15
【问题描述】:

我目前正在使用 arduino 开发水流控制系统。目标是我可以使用 arduino 设置水流的温度。

我有一个 Y 形的软管部分。在 Y 形件的左上臂上,我有恒定的冷水流,大约 12°C。在 Y 件的右上臂上,我有一个阀门,我可以用它来调节我混合的热水量。热水温度约为 50°C。为了调节热水的摄入量,我使用了伺服电机,它将阀门转动到某个位置。 在 Y 的下部,我有一个温度传感器,它告诉我水的混合温度。

我想出的将水混合到特定温度的算法如下所示:

1. Calibrate by calculating the minimum and maximum temp and corresponding servo positions
1.1 set the servo position to the absolute minimum, wait for 10 seconds and get the temperature -> minTemperature, minPos
1.2 set the servo position to the absolute maximum, wait for 10 seconds and get the temperature -> maxTemperature, maxPos

2. Set the mixing temperature to X°C
2.1 (maxTemp-minTemp)/(maxPos-minPos) = p °C/pos
Which means that changing the position by 1 position changes the mix temperature by p °C
2.2 minPos + (x-minTemp) / p = targetPos

3. If abs(measuredTemp-x)>Tolerance than do 2.

当涉及到现实生活中的实施时,这种方法是否可行?其他的热调节电路是怎么做的?

【问题讨论】:

  • 看起来PID 是你想要的。不要期望整个伺服位置范围内的比例。

标签: algorithm arduino temperature


【解决方案1】:

这基本上可以工作,但是您应该解决几个问题:

  1. 伺服位置和温度之间的关系不会是线性的。至少在 4 个不同的位置进行校准并拟合三次多项式。

  2. 因为阀门有很多摩擦,并且现成伺服系统中的定位算法并不出色,所以当您命令从较低位置移动到位置“X”时,它会到达的位置是与您命令从更高位置移动到相同位置“X”时它所处的位置不同。您应该针对升高温度和降低温度校准不同的曲线,并确保您命令的运动缓慢接近所需温度以获得可重复的结果。

  3. 根据校准曲线到达正确位置后,如果温度不正常,您可以缓慢地朝它移动并调整校准。您可能想假设错误来自输入温度的差异并进行相应调整。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-31
    • 2019-02-24
    • 2012-10-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多