\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{fancyhdr}

%\pagestyle{fancy}
%\fancyhead{}
%\fancyfoot{}

\title{MRAKOMĚR}
\author{Kaklik}


%\fancyhead[C]{\begin{tabular}\hline \title nejaky text \hline \end{tabular}}
%\fancyfoot[L] {/\today / \author / www.mlab.cz}
%\fancyfoot[R]{\thepage }

\begin{document}

\maketitle
\tableofcontents

\newpage

\section{Why you need the MRAKOMĚR?}
MRAKOMĚR is a cloud meter sensor suitable for protect maintenance free telescopes against rain and snow. The MRAKOMĚR function is command cupola or other telescope housing to close if MRAKOMĚR see a cloudy sky. 

\section{Measuring principle}
MRAKOMĚR act as a IR thermometer because clouds reflecting a much IR radiation. Then the measuring unit catch the reflected radiation and count it's intensity to determine how much cloudy sky is above the telescope. If a level of water vapor is over the copula is ordered to close. 

\section{Technical realization}
The thermopile sensor is directed  to the zenith and integrate radiation flux over $90^\circ$ angle. However there must not be any terrestrial (atmospheric  heated) object in viewing  angle because they can cause malfunction by it's IR radiation.        

The thermopile sensor in MRAKOMĚR  is covered by small and thin HDPE cupola which protect the senor itself against atmospheric events. The HDPE material have good transparency in IR but sometimes there can be a condensate water. As solution for this problem (condensate water is resolved as cloudy) there is a 2W heating resistor in MRAKOMĚR case which is suitable to stop water condensing on thermopile sensor housing or it can melt the accidental ice too. 

MRAKOMĚR is connected to telescope computer (IBM PC ) over USB interface  board where is standard RS232 port emulated. Also there is a option of direct RS232 connection if it is desired by user. But in this mode an external power source is needed. And in addition there is an optocoupled output channel which is activated in cloudy or if the computer get frozen.

Sensor and interface part of the MRAKOMĚR is connected together trough  cable connection up to 100m long (the electronics is protected by some transils against damage by electric surge on stormy locations)

\section{Communication protocol}
If MRAKOMĚR is plugged to the computer it communicate by speed 2400 baud (8N1) and every second transmit an message such as: 

\begin{verbatim}
$M4.1 2866 2383 -63 17 15 *5A
\end{verbatim}

Where MX.X is the version and revision 2866 is a number of measuring (0 to 65535). 2383 is a temperature in sensor case (23.83 $^\circ$C). And -63 meaning that sky "have" -0.63 $^\circ$C. Last two numbers before star is number of seconds to turn off the heating and to close the cupola (this counter will resets if appropriate command is received). After a star symbol is hexadecimal value of XOR of symbols between \verb+$+ and *.

\begin{table}[htbp]
\begin{center}
\begin{tabular}{|c|c|}
\hline  h & turn on heating for 20s \\ 
\hline  c & turn off heating  \\ 
\hline  o & open cupola \\ 
\hline  x & open cupola and turn on heating \\ 
\hline  l & close cupola \\ 
\hline  i & list version and some help (only if cupola is closed)  \\ 
\hline  r & turn on periodical messaging every second \\ 
\hline  s & turn off periodical messaging \\ 
\hline  u & switch MRAKOMĚR to firmware update mode \\ 
\hline 
\end{tabular}
\caption{MRAKOMĚR commands}
\end{center}

\end{table}

\section{Conclusions}
MRAKOMĚR is device suitable to perfectly protect telescope. But sometimes may detect cloudy sky even if it clear it is happened when water vapor condensate on sensor housing. It can be prevented by turn on heating if weather conditions is near to condensate point. 

\end{document}
