summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-03-25 15:07:16 +0100
committerdakkar <dakkar@thenautilus.net>2018-03-25 15:10:07 +0100
commitacfa9683248bc7cd25dda20d53307879fabb8f33 (patch)
treefc7800224d77d98e2e8bdd64cac3966ac809dc4f /src
parentanime bump (diff)
downloadthenautilus-acfa9683248bc7cd25dda20d53307879fabb8f33.tar.gz
thenautilus-acfa9683248bc7cd25dda20d53307879fabb8f33.tar.bz2
thenautilus-acfa9683248bc7cd25dda20d53307879fabb8f33.zip
rough writeup of the thermostat project
Diffstat (limited to 'src')
-rw-r--r--src/HW/thermostat/.gitignore2
-rw-r--r--src/HW/thermostat/document.en.rest.txt105
l---------src/HW/thermostat/du2html.xsl1
3 files changed, 108 insertions, 0 deletions
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