forked from M-Labs/thermostat
Compare commits
2 Commits
16c78c5784
...
d815a9ae55
Author | SHA1 | Date | |
---|---|---|---|
d815a9ae55 | |||
c9defac87c |
16
README.md
16
README.md
@ -239,22 +239,6 @@ of channel 0 to the PID algorithm:
|
|||||||
output 0 pid
|
output 0 pid
|
||||||
```
|
```
|
||||||
|
|
||||||
### PID output clamping
|
|
||||||
|
|
||||||
It is possible to clamp the PID algorithm output independently of channel output limits. This is desirable when e.g. there is a need to keep the current value above a certain threshold in closed-loop mode.
|
|
||||||
|
|
||||||
Note that the actual output will still ultimately be limited by the `max_i_pos` and `max_i_neg` values.
|
|
||||||
|
|
||||||
Set PID maximum output of channel 0 to 1.5 A.
|
|
||||||
```
|
|
||||||
pid 0 output_max 1.5
|
|
||||||
```
|
|
||||||
|
|
||||||
Set PID minimum output of channel 0 to 0.1 A.
|
|
||||||
```
|
|
||||||
pid 0 output_min 0.1
|
|
||||||
```
|
|
||||||
|
|
||||||
## LED indicators
|
## LED indicators
|
||||||
|
|
||||||
| Name | Color | Meaning |
|
| Name | Color | Meaning |
|
||||||
|
@ -74,9 +74,9 @@
|
|||||||
for program in ${self}/pythermostat/*.py; do
|
for program in ${self}/pythermostat/*.py; do
|
||||||
if [ -x $program ]; then
|
if [ -x $program ]; then
|
||||||
progname=`basename -s .py $program`
|
progname=`basename -s .py $program`
|
||||||
outname=$out/bin/thermostat_$progname
|
outname=$out/bin/$progname
|
||||||
echo "#!${pkgs.bash}/bin/bash" >> $outname
|
echo "#!${pkgs.bash}/bin/bash" >> $outname
|
||||||
echo "exec python -m $progname \"\$@\"" >> $outname
|
echo "exec python3 -m $progname \"\$@\"" >> $outname
|
||||||
chmod 755 $outname
|
chmod 755 $outname
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import math
|
import math
|
||||||
import logging
|
import logging
|
||||||
import time
|
|
||||||
from collections import deque, namedtuple
|
from collections import deque, namedtuple
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
@ -237,14 +236,13 @@ def main():
|
|||||||
|
|
||||||
tec = Client()
|
tec = Client()
|
||||||
|
|
||||||
data = tec.get_report()
|
data = next(tec.report_mode())
|
||||||
ch = data[channel]
|
ch = data[channel]
|
||||||
|
|
||||||
tuner = PIDAutotune(target_temperature, output_step,
|
tuner = PIDAutotune(target_temperature, output_step,
|
||||||
lookback, noiseband, ch['interval'])
|
lookback, noiseband, ch['interval'])
|
||||||
|
|
||||||
while True:
|
for data in tec.report_mode():
|
||||||
data = tec.get_report()
|
|
||||||
|
|
||||||
ch = data[channel]
|
ch = data[channel]
|
||||||
|
|
||||||
@ -257,8 +255,6 @@ def main():
|
|||||||
|
|
||||||
tec.set_param("output", channel, "i_set", tuner_out)
|
tec.set_param("output", channel, "i_set", tuner_out)
|
||||||
|
|
||||||
time.sleep(0.05)
|
|
||||||
|
|
||||||
tec.set_param("output", channel, "i_set", 0)
|
tec.set_param("output", channel, "i_set", 0)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user