From 60266c403df423b9629da867b7389ecb19551f8f Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 30 Mar 2018 11:35:12 +0100 Subject: explain signal analysis --- additions/HW/thermostat/waveforms-large.png | Bin 0 -> 132075 bytes additions/HW/thermostat/waveforms-small.png | Bin 0 -> 50323 bytes src/HW/thermostat/document.en.rest.txt | 27 +++++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 additions/HW/thermostat/waveforms-large.png create mode 100644 additions/HW/thermostat/waveforms-small.png diff --git a/additions/HW/thermostat/waveforms-large.png b/additions/HW/thermostat/waveforms-large.png new file mode 100644 index 0000000..636dd13 Binary files /dev/null and b/additions/HW/thermostat/waveforms-large.png differ diff --git a/additions/HW/thermostat/waveforms-small.png b/additions/HW/thermostat/waveforms-small.png new file mode 100644 index 0000000..d8b9239 Binary files /dev/null and b/additions/HW/thermostat/waveforms-small.png differ diff --git a/src/HW/thermostat/document.en.rest.txt b/src/HW/thermostat/document.en.rest.txt index d3c282d..9ea1bcf 100644 --- a/src/HW/thermostat/document.en.rest.txt +++ b/src/HW/thermostat/document.en.rest.txt @@ -26,6 +26,8 @@ The current candidate is a ESP32_ running off (probably alkaline) batteries, using a DHT11_ sensor. .. figure:: thermometer-diagram.png + :alt: diagram showing a ESP32 microcontroller wired up to a DHT11 + sensor :align: center Connections: @@ -58,6 +60,8 @@ Harper`_ and probably others, I connected a 433MHz receiver to my soundcard: .. figure:: rf-receiver-diagram.png + :alt: diagram showing a 433MHz receiver wired up to a stereo audio + cable via resistors :align: center Connections: @@ -73,12 +77,31 @@ soundcard: 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). +and spent a few hours puzzling them out. This is what the recorded +waveforms look like: + +.. figure:: waveforms-small.png + :alt: two similar but not identical saw-toothed waveforms, one + above the other + :target: waveforms-large.png + :align: center + + The two signal trains (one for "on" and one for "off") + +It took a while to realise that those saw-toothed waves were actually +square waves, mangled by all the filters that my soundcard has, and +that the heights were different only because of those same filters. + +Measuring the number of samples between rising edge and falling edge +gave me the timing. Then I had to do the whole thing again when I +noticed that the "low" widths where not always equal to the preceding +"high" width: it's not a 50/50 duty cycle square wave. Then I built a transmitter: .. figure:: rf-trasmitter-diagram.png + :alt: diagram showing an Arduino UNO wired up to a 433MHz + transmitter :align: center Connections: -- cgit v1.2.3