From acfa9683248bc7cd25dda20d53307879fabb8f33 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 25 Mar 2018 15:07:16 +0100 Subject: rough writeup of the thermostat project --- additions/HW/thermostat/arduino.jpg | Bin 0 -> 1440306 bytes additions/HW/thermostat/dht11.jpg | Bin 0 -> 309233 bytes additions/HW/thermostat/esp32.jpg | Bin 0 -> 519900 bytes additions/HW/thermostat/receiver-build.jpg | Bin 0 -> 1148214 bytes additions/HW/thermostat/rf-pair.jpg | Bin 0 -> 1028565 bytes additions/HW/thermostat/rf-receiver-diagram.png | Bin 0 -> 522839 bytes additions/HW/thermostat/rf-receiver-diagram.svg | 227 ++++++++++++++++++++++ additions/HW/thermostat/rf-receiver.jpg | Bin 0 -> 238198 bytes additions/HW/thermostat/rf-transmitter.jpg | Bin 0 -> 161010 bytes additions/HW/thermostat/rf-trasmitter-diagram.png | Bin 0 -> 1307724 bytes additions/HW/thermostat/rf-trasmitter-diagram.svg | 113 +++++++++++ additions/HW/thermostat/stereo-cable.jpg | Bin 0 -> 659679 bytes additions/HW/thermostat/thermometer-diagram.png | Bin 0 -> 381892 bytes additions/HW/thermostat/thermometer-diagram.svg | 106 ++++++++++ additions/HW/thermostat/thermometer.jpg | Bin 0 -> 717833 bytes additions/HW/thermostat/transmitter-build.jpg | Bin 0 -> 1639281 bytes src/HW/thermostat/.gitignore | 2 + src/HW/thermostat/document.en.rest.txt | 105 ++++++++++ src/HW/thermostat/du2html.xsl | 1 + 19 files changed, 554 insertions(+) create mode 100644 additions/HW/thermostat/arduino.jpg create mode 100644 additions/HW/thermostat/dht11.jpg create mode 100644 additions/HW/thermostat/esp32.jpg create mode 100644 additions/HW/thermostat/receiver-build.jpg create mode 100644 additions/HW/thermostat/rf-pair.jpg create mode 100644 additions/HW/thermostat/rf-receiver-diagram.png create mode 100644 additions/HW/thermostat/rf-receiver-diagram.svg create mode 100644 additions/HW/thermostat/rf-receiver.jpg create mode 100644 additions/HW/thermostat/rf-transmitter.jpg create mode 100644 additions/HW/thermostat/rf-trasmitter-diagram.png create mode 100644 additions/HW/thermostat/rf-trasmitter-diagram.svg create mode 100644 additions/HW/thermostat/stereo-cable.jpg create mode 100644 additions/HW/thermostat/thermometer-diagram.png create mode 100644 additions/HW/thermostat/thermometer-diagram.svg create mode 100644 additions/HW/thermostat/thermometer.jpg create mode 100644 additions/HW/thermostat/transmitter-build.jpg create mode 100644 src/HW/thermostat/.gitignore create mode 100644 src/HW/thermostat/document.en.rest.txt create mode 120000 src/HW/thermostat/du2html.xsl diff --git a/additions/HW/thermostat/arduino.jpg b/additions/HW/thermostat/arduino.jpg new file mode 100644 index 0000000..9b74ba9 Binary files /dev/null and b/additions/HW/thermostat/arduino.jpg differ diff --git a/additions/HW/thermostat/dht11.jpg b/additions/HW/thermostat/dht11.jpg new file mode 100644 index 0000000..fea0494 Binary files /dev/null and b/additions/HW/thermostat/dht11.jpg differ diff --git a/additions/HW/thermostat/esp32.jpg b/additions/HW/thermostat/esp32.jpg new file mode 100644 index 0000000..4b4e519 Binary files /dev/null and b/additions/HW/thermostat/esp32.jpg differ diff --git a/additions/HW/thermostat/receiver-build.jpg b/additions/HW/thermostat/receiver-build.jpg new file mode 100644 index 0000000..fcd7329 Binary files /dev/null and b/additions/HW/thermostat/receiver-build.jpg differ diff --git a/additions/HW/thermostat/rf-pair.jpg b/additions/HW/thermostat/rf-pair.jpg new file mode 100644 index 0000000..aa94256 Binary files /dev/null and b/additions/HW/thermostat/rf-pair.jpg differ diff --git a/additions/HW/thermostat/rf-receiver-diagram.png b/additions/HW/thermostat/rf-receiver-diagram.png new file mode 100644 index 0000000..c624076 Binary files /dev/null and b/additions/HW/thermostat/rf-receiver-diagram.png differ diff --git a/additions/HW/thermostat/rf-receiver-diagram.svg b/additions/HW/thermostat/rf-receiver-diagram.svg new file mode 100644 index 0000000..2df4b25 --- /dev/null +++ b/additions/HW/thermostat/rf-receiver-diagram.svg @@ -0,0 +1,227 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + 47kΩ + 22kΩ + + diff --git a/additions/HW/thermostat/rf-receiver.jpg b/additions/HW/thermostat/rf-receiver.jpg new file mode 100644 index 0000000..3e4e217 Binary files /dev/null and b/additions/HW/thermostat/rf-receiver.jpg differ diff --git a/additions/HW/thermostat/rf-transmitter.jpg b/additions/HW/thermostat/rf-transmitter.jpg new file mode 100644 index 0000000..3c283ac Binary files /dev/null and b/additions/HW/thermostat/rf-transmitter.jpg differ diff --git a/additions/HW/thermostat/rf-trasmitter-diagram.png b/additions/HW/thermostat/rf-trasmitter-diagram.png new file mode 100644 index 0000000..eb84d56 Binary files /dev/null and b/additions/HW/thermostat/rf-trasmitter-diagram.png differ diff --git a/additions/HW/thermostat/rf-trasmitter-diagram.svg b/additions/HW/thermostat/rf-trasmitter-diagram.svg new file mode 100644 index 0000000..1d8e885 --- /dev/null +++ b/additions/HW/thermostat/rf-trasmitter-diagram.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/additions/HW/thermostat/stereo-cable.jpg b/additions/HW/thermostat/stereo-cable.jpg new file mode 100644 index 0000000..66e943f Binary files /dev/null and b/additions/HW/thermostat/stereo-cable.jpg differ diff --git a/additions/HW/thermostat/thermometer-diagram.png b/additions/HW/thermostat/thermometer-diagram.png new file mode 100644 index 0000000..365b874 Binary files /dev/null and b/additions/HW/thermostat/thermometer-diagram.png differ diff --git a/additions/HW/thermostat/thermometer-diagram.svg b/additions/HW/thermostat/thermometer-diagram.svg new file mode 100644 index 0000000..6eeace3 --- /dev/null +++ b/additions/HW/thermostat/thermometer-diagram.svg @@ -0,0 +1,106 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/additions/HW/thermostat/thermometer.jpg b/additions/HW/thermostat/thermometer.jpg new file mode 100644 index 0000000..cbe30b5 Binary files /dev/null and b/additions/HW/thermostat/thermometer.jpg differ diff --git a/additions/HW/thermostat/transmitter-build.jpg b/additions/HW/thermostat/transmitter-build.jpg new file mode 100644 index 0000000..c998f32 Binary files /dev/null and b/additions/HW/thermostat/transmitter-build.jpg differ diff --git a/src/HW/thermostat/.gitignore b/src/HW/thermostat/.gitignore new file mode 100644 index 0000000..08d33d4 --- /dev/null +++ b/src/HW/thermostat/.gitignore @@ -0,0 +1,2 @@ +/document.en.du.xml +/document.it.du.xml diff --git a/src/HW/thermostat/document.en.rest.txt b/src/HW/thermostat/document.en.rest.txt new file mode 100644 index 0000000..d3c282d --- /dev/null +++ b/src/HW/thermostat/document.en.rest.txt @@ -0,0 +1,105 @@ +=========================== +Building a smart thermostat +=========================== +:CreationDate: 2018-03-25 12:47:54 +:Id: HW/thermostat +:tags: - hardware + - software + +I'd like to have a computer-controller thermostat, that behaves the +way I want to, doesn't need to talk to external servers, can measure +temperature in multiple rooms. + +I'll need: + +* multiple cheap temperature sensors that can report their readings + wirelessly +* a way to start / stop the boiler +* some clever software to decide when to turn the boiler on/off based + on the temperature readings +* a computer to run that software + +The sensors +=========== + +The current candidate is a ESP32_ running off (probably alkaline) +batteries, using a DHT11_ sensor. + +.. figure:: thermometer-diagram.png + :align: center + + Connections: + + =============== ====== + microcontroller sensor + =============== ====== + +5V VCC + GND GND + pin 13 DATA + =============== ====== + +`The code for the thermometer`_ uses the DHTesp_ library to read the +sensor, and the `esp8266-oled-ssd1306`_ library to drive the +display. The final sensor will most probably not have a display. + +.. _ESP32: https://en.wikipedia.org/wiki/ESP32 +.. _DHT11: https://www.adafruit.com/product/386 +.. _`The code for the thermometer: + https://www.thenautilus.net/cgit/thermostat/tree/sensor/thermostat.ino +.. _DHTesp: https://github.com/beegee-tokyo/DHTesp +.. _`esp8266-oled-ssd1306`: + https://github.com/ThingPulse/esp8266-oled-ssd1306/ + +Talking to the boiler +===================== + +Using the process described by `Steven Hale`_, `Dave Hope`_, `Ross +Harper`_ and probably others, I connected a 433MHz receiver to my +soundcard: + +.. figure:: rf-receiver-diagram.png + :align: center + + Connections: + + ============= ======= + From To + ============= ======= + Power + receiver VCC + Power - receiver GND + Power - microphone cable shielding via 22kΩ resistor + receiver data microphone cable channel via 47kΩ resistor + ============= ======= + +By turning the knob the thermostat that was installed with the boiler, +I generated the on and off signals. I recorded them with Audacity_, +and spent a few hours puzzling them out (I'll write more details about +this part at some future time). + +Then I built a transmitter: + +.. figure:: rf-trasmitter-diagram.png + :align: center + + Connections: + + =============== =========== + microcontroller transmitter + =============== =========== + +3.3V VCC + GND GND + pin 7 DATA + =============== =========== + +and wrote `code to send the correct pulse train`_. The receiver wired +to the boiler recognises the signals and turns on and off. + +.. _`Steven Hale`: + http://www.stevenhale.co.uk/main/2013/08/home-automation-reverse-engineering-a-worcester-bosch-dt10rf-wireless-thermostat/ +.. _`Dave Hope`: + https://damn.technology/controlling-british-gas-wr1-receiver-arduino +.. _`Ross Harper`: + http://rossharper.net/2015/11/decoding-a-siemens-rcr10433-thermostat-signal-to-control-a-boiler-from-a-raspberry-pi/ +.. _Audacity: https://www.audacityteam.org/ +.. _`code to send the correct pulse train`: + https://www.thenautilus.net/cgit/thermostat/tree/trasmitter/sender.ino diff --git a/src/HW/thermostat/du2html.xsl b/src/HW/thermostat/du2html.xsl new file mode 120000 index 0000000..e2487e0 --- /dev/null +++ b/src/HW/thermostat/du2html.xsl @@ -0,0 +1 @@ +../../../templates/du2html.xsl \ No newline at end of file -- cgit v1.2.3