Mon, 25 Mar 2024 17:14:56 +0100
Brought the retry attempts to read the DHT11 sensors to the main devices loop. The actual read function is now very simple. Called every 30 seconds when all is well, or 2 seconds if something is wrong.
335 | 1 | |
2 | 1. Introduction. | |
3 | ||
4 | 2. Hardware. | |
5 | ||
6 | 3. Raspberry GPIO. | |
7 | ||
8 | Most of the hardware is connected via the 8 GPIO pins on the 26p connector. | |
9 | Currently the pins are used or reserved for: | |
10 | ||
11 | GPIO0 - out - 433 MHz transmitter module (FS1000A). | |
12 | GPIO1 - out - reserved for PWM. | |
13 | GPIO2 - out - Frontpanel LED. | |
14 | GPIO3 - bus - DHT11 sensor. | |
15 | GPIO4 - in - Frontpanel Key Enter. | |
16 | GPIO5 - in - Frontpanel Key Down. | |
17 | GPIO6 - in - Frontpanel Key Up. | |
18 | GPIO7 - bus - 1-Wire bus (Maxim protocol). | |
19 | ||
20 | ||
21 | 4. Keyed menu. | |
22 | ||
23 | Using three buttons the device can be controlled. The menu is entered by | |
24 | pressing the Enter key for 2 seconds. With the up and down keys you can step | |
25 | through the menu. Press escape to go back, Press enter for 2 seconds to | |
26 | set the new value. | |
27 | Escape is press both arrow keys together. | |
28 | If not in a menu, short touch of the keys activate the LCD display backlight. | |
29 | The arrow keys select the current item to display. | |
30 | ||
31 | ||
32 | General setup | |
33 | ||
34 | Top screen | |
35 | Units setup -- Units -- Select mode | |
36 | Off mode, toggle heater, cooler, fan. | |
37 | Beer/Fridge mode, change temperature. | |
38 | Profile mode -- If OFF, select a profile. | |
39 | If OFF, allow start profile. | |
40 | If RUN, allow pause/abort. | |
41 | If PAUSE, allow resume/abort. | |
42 | If DONE, allow to go OFF. | |
43 | System mode -- Halt | |
44 | Reboot | |
45 | ||
46 | ||
47 | ||
48 | 5. Client/Server protocol. | |
49 | ||
50 | ||
51 | Commands: | |
52 | ||
53 | ARCHIVE DIR | |
54 | ARCHIVE LOG filename (get in LOG format) | |
55 | ARCHIVE GET filename (download file) | |
56 | ||
57 | DEVICE ADD type | |
58 | DEVICE DEL uuid | |
59 | DEVICE LIST | |
60 | DEVICE GET uuid | |
61 | DEVICE PUT uuid | |
62 | ||
63 | GLOBAL GET | |
64 | GLOBAL PUT | |
65 | ||
66 | LIST | |
67 | LIST LOG uuid | |
68 | ||
69 | PING | |
70 | ||
71 | PROFILE uuid,name | |
72 | PROFILE ADD name | |
73 | PROFILE DEL uuid | |
74 | PROFILE LIST | |
75 | PROFILE GET uuid | |
76 | PROFILE PUT uuid | |
77 | PROFILE GETS uuid | |
78 | PROFILE PUTS uuid | |
79 | ||
80 | SIMULATOR ADD name | |
81 | SIMULATOR DEL uuid | |
82 | SIMULATOR LIST | |
83 | SIMULATOR GET uuid | |
84 | SIMULATOR PUT uuid | |
85 | ||
86 | UNIT ADD name | |
87 | UNIT DEL uuid | |
88 | UNIT LIST | |
89 | UNIT GET uuid | |
90 | UNIT PUT uuid | |
91 | ||
92 | ||
93 | ||
94 | Response codes: | |
95 | ||
96 | 100 Help text follows | |
97 | 101 PONG | |
98 | 201 Information follows | |
99 | 211 Device %s added | |
100 | 211 Device %s deleted | |
101 | 211 Profile %s added | |
102 | 211 Profile %s deleted | |
103 | 211 Unit %s added | |
104 | 211 Unit %s deleted | |
105 | 212 Archive directory follows: | |
106 | 212 Archive file follows: | |
107 | 212 Devices list follows: | |
108 | 212 Fermenter list follows: | |
109 | 212 Logfile list follows: | |
110 | 212 Profiles list follows: | |
111 | 213 Device record follows: | |
112 | 213 Global Settings record follows: | |
113 | 213 Profile record follows: | |
114 | 213 Unit listing follows: | |
115 | 215 Profile steps follow: | |
116 | 219 Accepted Device record | |
117 | 219 Accepted Global record | |
118 | 219 Accepted Profile record | |
119 | 219 Accepted Profile steps | |
120 | 219 Accepted Unit record | |
121 | 403 LCD not available | |
122 | 440 No such device | |
123 | 440 No such file | |
124 | 440 No such profile | |
125 | 440 No such simulator | |
126 | 440 No such unit | |
127 | 441 Maximum simulators reached | |
128 | 500 Unknown command | |
129 | 501 Subcommand missing | |
130 | 502 Parameter missing | |
131 | 503 Parameter error | |
132 | 504 Subcommand error | |
133 | 518 recfrom(): %s | |
134 | ||
135 | ||
136 | ||
137 | 6. PID adjustments. | |
138 | ||
363
468ec0d96cce
Back to the old PID algorythm. Version 0.3.1.
Michiel Broek <mbroek@mbse.eu>
parents:
335
diff
changeset
|
139 | * Start with pGain, dGain and iGain set to 0. |
335 | 140 | * Increase Kp until small oscillation. |
141 | * Increase Kd until a little damping. | |
142 | * Increase Ki after Kp and Kd are set until longterm convergence. | |
143 |