From f1c20cbff2d55b73e01d97a5f333854297f6ec16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Babi=C4=8D?= Date: Wed, 27 Apr 2016 07:58:08 +0200 Subject: [PATCH] Add the Data and Web interface sub chapter --- figures/plot_preview.png | 3 +++ mainpart.tex | 48 ++++++++++++++++++++++++++++++++++++++-- tukethesis.pdf | 4 ++-- 3 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 figures/plot_preview.png diff --git a/figures/plot_preview.png b/figures/plot_preview.png new file mode 100644 index 0000000..b849905 --- /dev/null +++ b/figures/plot_preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93fbe2973137a0778ad6eeb740d2c74f08e99250890c3941c283e7126eba2aac +size 32077 diff --git a/mainpart.tex b/mainpart.tex index e416649..4f0aa49 100644 --- a/mainpart.tex +++ b/mainpart.tex @@ -5,12 +5,18 @@ The manufactured client node has been inserted into the enclosure containing an \begin{figure}[ht!] \centering \includegraphics[width=.7\textwidth,angle=0]{project_inside} -\caption{The view into the client node's enclosure, before the final assembly}\label{f:project_inside} +\caption{The view into the client node's enclosure, before the final assembly, exposing top side of the board containing linear transformer T1 (green), mains connectors J1 and J2 (blue), a fuse holder for F1 (yellow-ish), a relay K1 (white) and an ESP-12E module}\label{f:project_inside} +\end{figure} + +\begin{figure}[] +\centering +\includegraphics[width=.7\textwidth,angle=0]{project_inside} +\caption{The view onto a fully assembled client node}\label{f:project_outside} \end{figure} \subsection{Discovered problems} -After a few test runs performed on an assembled client node, the first problem became obvious: the node's application processor (contained inside of the ESP-12E module) starts erratically, when the node is plugged into socket. Investigations of the supply voltage under the oscilloscope shows no difference in voltage surges during the boot-up, either if the processor starts or not, suggesting a firmware problem too. The first 220ms of power line inspection can be seen in the figure \ref{f:oscilloscope}. However, this problem does not occur, when the processor is powered from external source via J3, but otherwise makes the node unreliable to use. +After a few test runs performed on an assembled client node, the first problem became obvious: the node's application processor (contained inside of the ESP-12E module) starts erratically, when the node is plugged into socket. Investigations of the supply voltage under the oscilloscope shows no difference in voltage surges during the boot-up, either if the processor starts or not, suggesting a firmware problem too. The first 220ms of power line inspection can be seen in the figure \ref{f:oscilloscope}, showing a voltage fluctuations caused by current surges from the processor starting. However, this problem does not occur, when the processor is powered from external source via J3, but otherwise makes the node unreliable to use. \begin{figure}[ht!] \centering @@ -31,5 +37,43 @@ There are multiple, rather cosmetic issues, that does not affect the functionali \item The longer side of the board is 1mm wider than desired, it doesn't fit easily into the enclosure \end{itemize} +\subsection{Data representation within the web interface} + +Since there exists a possibility to read the RMS Current drawn by the appliance at measured RMS Voltage, at least the apparent power can be obtained by multiplying it, described in deeper detail back in a sub-chapter \ref{ss:ac_power}. + +Having something to work with gives opportunity to continue the work, despite the fact that the desired real power will not be obtained. Client node makes statistical median of the measured current and voltage and every 10 seconds sends them to the could database, creating a data stream. The sample of the stream can be seen in the table \ref{t:cloud_samples}. The timestamp is in the internal format, allowing transformations to any other desired format easily. + +\setlength{\tabcolsep}{.5em} +\begin{table}[ht!] +\centering +\caption{Sample of the data of the measurements stored in the cloud database, showing 10 successive samples} +\label{t:cloud_samples} +\begin{tabular}{|r|r|r|} +\hline +\multicolumn{1}{|c|}{\textbf{current}} & \multicolumn{1}{c|}{\textbf{voltage}} & \multicolumn{1}{c|}{\textbf{timestamp}} \\ \hline +1.0821 & 237.1633 & 2016-04-19T16:26:53.834Z \\ \hline +1.2323 & 237.0149 & 2016-04-19T16:26:41.787Z \\ \hline +1.0335 & 234.3102 & 2016-04-19T16:26:31.168Z \\ \hline +1.6476 & 233.5277 & 2016-04-19T16:26:19.157Z \\ \hline +1.0879 & 235.6132 & 2016-04-19T16:26:08.485Z \\ \hline +1.2149 & 238.0802 & 2016-04-19T16:25:57.706Z \\ \hline +1.1474 & 237.1673 & 2016-04-19T16:25:45.881Z \\ \hline +0.9841 & 238.3774 & 2016-04-19T16:25:35.115Z \\ \hline +0.9922 & 238.8315 & 2016-04-19T16:25:23.355Z \\ \hline +0.9598 & 236.3844 & 2016-04-19T16:25:12.715Z \\ \hline +\end{tabular} +\end{table} + +The data from the could data stream are then visualised on the server node via plotting library, provided by GoogleAPIs. The web interface can be accessed via \texttt{http://vameter.ddns.net}, a \gls{ddns} redirect service provided by \texttt{http://no-ip.com}. It traslates the \gls{dns} to the \gls{ip} of the server node on the local network. If there were multiple client nodes, and the \gls{ip} of the server node should change, this way all of them would be updated. The illustrative results can be seen in the figure \ref{f:plot_preview}. The mentioned apparent power is obtained by multiplying current and voltage, as has been already stated, so these values are not stored or displayed explicitly. + +\begin{figure}[ht!] +\centering +\includegraphics[width=1\textwidth,angle=0]{plot_preview} +\caption{The preview of the visualised data from the data stream displaying 14 hours of data; it can be seen when the appliance was in standby mode (red) or the periodical fluctuations of the mains voltage (blue)}\label{f:plot_preview} +\end{figure} + +The web interface also contains a button for shutting the appliance on or off (by controlling the electromechanical relay K1). It consists of simple ON/OFF button that changes its value accordingly to the relay's state. It also uses the mentioned \gls{ddns} service to contact the server node. + + diff --git a/tukethesis.pdf b/tukethesis.pdf index 1b3e65b..c348612 100644 --- a/tukethesis.pdf +++ b/tukethesis.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a4b8ff9535e807c7fb4d742f8e0dcbe12e304f05d78c8d4c1a60bd0da858c2d -size 4920417 +oid sha256:6ca570c196cfae21f2e00036cd93c73acef3c33158f8d08e6779bbd0f31f591e +size 4946595