Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file
Dependencies: net 1-wire lpc1768 crypto clock web fram log
/media/uploads/andrewboyson/heating.sch
/media/uploads/andrewboyson/heating.brd
/media/uploads/andrewboyson/eagle.epf
web-this/boiler/web-boiler-ajax.c@105:1899f7ed17ec, 2021-02-23 (annotated)
- Committer:
- andrewboyson
- Date:
- Tue Feb 23 20:35:07 2021 +0000
- Revision:
- 105:1899f7ed17ec
- Parent:
- 104:46ce1aaf8be7
- Child:
- 106:41ed3ea0bbba
Added ability to set the minimum flow rate and removed the correction to delta T relative to speed. Adding the round circuit time and linked to speed. Next task is to linearize the flow.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 47:229338b3adcb | 1 | #include <stdint.h> |
andrewboyson | 47:229338b3adcb | 2 | #include <stdio.h> |
andrewboyson | 47:229338b3adcb | 3 | |
andrewboyson | 47:229338b3adcb | 4 | #include "http.h" |
andrewboyson | 47:229338b3adcb | 5 | #include "boiler.h" |
andrewboyson | 47:229338b3adcb | 6 | #include "radiator.h" |
andrewboyson | 47:229338b3adcb | 7 | #include "ds18b20.h" |
andrewboyson | 47:229338b3adcb | 8 | #include "program.h" |
andrewboyson | 47:229338b3adcb | 9 | #include "1-wire-device.h" |
andrewboyson | 47:229338b3adcb | 10 | |
andrewboyson | 49:9491c966dc60 | 11 | void WebBoilerAjax() |
andrewboyson | 47:229338b3adcb | 12 | { |
andrewboyson | 47:229338b3adcb | 13 | HttpOk("text/plain; charset=UTF-8", "no-cache", NULL, NULL); |
andrewboyson | 47:229338b3adcb | 14 | |
andrewboyson | 48:6eac12df3ad5 | 15 | HttpAddInt16AsHex(BoilerGetTankDS18B20Value() ); HttpAddChar('\n'); |
andrewboyson | 48:6eac12df3ad5 | 16 | HttpAddInt16AsHex(BoilerGetOutputDS18B20Value()); HttpAddChar('\n'); |
andrewboyson | 48:6eac12df3ad5 | 17 | HttpAddInt16AsHex(BoilerGetReturnDS18B20Value()); HttpAddChar('\n'); |
andrewboyson | 105:1899f7ed17ec | 18 | HttpAddInt16AsHex(BoilerGetRtnDelDS18B20Value()); HttpAddChar('\n'); |
andrewboyson | 105:1899f7ed17ec | 19 | HttpAddInt16AsHex(BoilerGetDeltaTDS18B20Value()); HttpAddChar('\n'); |
andrewboyson | 47:229338b3adcb | 20 | |
andrewboyson | 47:229338b3adcb | 21 | int nibble = 0; |
andrewboyson | 47:229338b3adcb | 22 | if (BoilerCall ) nibble |= 1; |
andrewboyson | 47:229338b3adcb | 23 | if (BoilerPump ) nibble |= 2; |
andrewboyson | 105:1899f7ed17ec | 24 | if (BoilerCallEnable ) nibble |= 4; |
andrewboyson | 47:229338b3adcb | 25 | HttpAddNibbleAsHex (nibble); HttpAddChar('\n'); |
andrewboyson | 47:229338b3adcb | 26 | |
andrewboyson | 105:1899f7ed17ec | 27 | HttpAddInt16AsHex(BoilerGetFullSpeedSecs ()); HttpAddChar('\n'); |
andrewboyson | 91:8b192efd0288 | 28 | HttpAddInt16AsHex(BoilerGetTankSetPoint ()); HttpAddChar('\n'); |
andrewboyson | 91:8b192efd0288 | 29 | HttpAddInt16AsHex(BoilerGetTankHysteresis ()); HttpAddChar('\n'); |
andrewboyson | 105:1899f7ed17ec | 30 | HttpAddInt16AsHex(BoilerGetRunOnDeltaT ()); HttpAddChar('\n'); |
andrewboyson | 91:8b192efd0288 | 31 | HttpAddInt16AsHex(BoilerGetRunOnTime ()); HttpAddChar('\n'); |
andrewboyson | 104:46ce1aaf8be7 | 32 | HttpAddInt16AsHex(BoilerPumpSpeed); HttpAddChar('\n'); |
andrewboyson | 104:46ce1aaf8be7 | 33 | HttpAddInt16AsHex(BoilerPumpPwm); HttpAddChar('\n'); |
andrewboyson | 104:46ce1aaf8be7 | 34 | HttpAddInt16AsHex(BoilerGetPumpSpeedCalling ()); HttpAddChar('\n'); |
andrewboyson | 104:46ce1aaf8be7 | 35 | HttpAddInt16AsHex(BoilerGetPumpSpeedRunOn ()); HttpAddChar('\n'); |
andrewboyson | 104:46ce1aaf8be7 | 36 | HttpAddByteAsHex (BoilerGetOutputTarget ()); HttpAddChar('\n'); |
andrewboyson | 105:1899f7ed17ec | 37 | HttpAddInt16AsHex(BoilerGetMinimumFlow ()); HttpAddChar('\n'); |
andrewboyson | 105:1899f7ed17ec | 38 | HttpAddInt16AsHex(BoilerGetMidFlowSpeed ()); HttpAddChar('\n'); |
andrewboyson | 105:1899f7ed17ec | 39 | HttpAddInt16AsHex(BoilerGetFullSpeedDeltaT ()); HttpAddChar('\n'); |
andrewboyson | 47:229338b3adcb | 40 | } |
andrewboyson | 47:229338b3adcb | 41 |