1 | \documentclass[a4paper]{article}
|
---|
2 |
|
---|
3 | \setlength{\topmargin}{0mm} %1 inch is always there!
|
---|
4 | \setlength{\oddsidemargin}{0mm} %1 inch is always there!
|
---|
5 | \setlength{\evensidemargin}{0mm} %1 inch is always there!
|
---|
6 |
|
---|
7 | \setlength{\textwidth}{16cm}
|
---|
8 | \setlength{\textheight}{25cm}
|
---|
9 |
|
---|
10 |
|
---|
11 | \setlength{\headheight}{0mm}
|
---|
12 | \setlength{\headsep}{0mm}
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 | %um die deutschen Umlaute eingeben zu können
|
---|
17 | % müssen diese 3 Pakete eingebunden werden.
|
---|
18 | % welches der Pakete was macht, weiss ich nicht.
|
---|
19 | \usepackage[T1]{fontenc}
|
---|
20 | \usepackage[latin1]{inputenc}
|
---|
21 | %\usepackage{ngerman} % nur wenn z.B. 'Inhaltsverzeichnis' auch deutsch sein soll.
|
---|
22 |
|
---|
23 | \usepackage{graphicx} % for pictures
|
---|
24 | \usepackage{float} % for figures with english descriptions
|
---|
25 |
|
---|
26 | \restylefloat{figure} % can nor force it with H
|
---|
27 | \restylefloat{table} % can nor force it with H
|
---|
28 |
|
---|
29 | \title{FSC - facts about the board}
|
---|
30 | \author{D. Neise}
|
---|
31 | \date{07.02.2011}
|
---|
32 |
|
---|
33 | \begin{document}
|
---|
34 |
|
---|
35 | %title page contains TOC
|
---|
36 | \maketitle
|
---|
37 | \tableofcontents
|
---|
38 | %\newpage
|
---|
39 |
|
---|
40 | %\listoffigures
|
---|
41 | %\listoftables
|
---|
42 |
|
---|
43 | \section{Basic Facts and Purpose}
|
---|
44 | % no pictures in SVN repos ... no space.
|
---|
45 | %\emph{picture here - 3D model of FSC}
|
---|
46 |
|
---|
47 | This document presents electronic facts and figures of FACTs FSC board. FSC stands for {\bf F}act {\bf S}low {\bf C}ontrol. The name is a bit misleading, since the boards sole purpose is to monitor slowly changing parameters, such as:
|
---|
48 | \begin{itemize}
|
---|
49 | \item up to 64 temperatures (RTD sensors, e.g. Pt1000 or Pt100),
|
---|
50 | \item up to 4 humidities (designed for Honeywell HIH-40xx family),
|
---|
51 | \item the DC levels of all 36 FACT low voltage supply channels,
|
---|
52 | \item the current consumption on each LV-channel (actually a dc-voltage\footnote{see FLV specs for further details}).
|
---|
53 | \end{itemize}
|
---|
54 |
|
---|
55 | FSC uses an 8MHz ATmega32L micro controller(MCU) to readout the muxed 24bit sigma delta ADC (AD7719) which is connected to the RTDs. In addition the 10bit ADC, which is part of the ATmegas32L, is used to monitor the humidity, LV-voltages and LV-currents.
|
---|
56 | The muxers on FSC belong to analog devices ADG77xx family, and are controlled by the MCU.
|
---|
57 | The User has access to FSC via an Ethernet Interface, provided by WIZNETs W5100, the brother of W5300, which is used on FACTs FAD boards.
|
---|
58 |
|
---|
59 | AD7719 and W5100 communicate with the MCU via the same SPI bus, which results in the fact, that a lot of user interaction might slow down temperature measurement or vice versa. Additionally the user should be aware, that sigma delta ADCs have a prolonged settling time, when muxed. Redout of all 64 temperature channels takes about 13s, while one single channel might be readout with at a rate of 10Hz.
|
---|
60 |
|
---|
61 | In addition FSC runs a 32bit timer, counting miliseconds since timer init. The timer is initialized to zero, when FSC is powered. User may synchronize FSCs timer to Unix time.
|
---|
62 |
|
---|
63 | \subsection{Measuring}
|
---|
64 | \label{sec_measuring}
|
---|
65 | The user may send a command telling FSC, what to measure. FSC will measure it and return the result, right after the measurement was finished. It is possible to tell FSC to measure several sensors at a time.
|
---|
66 | Users may activate (see table \ref{tbl_FSC_CMDS}) beliebige sensor channels, by writing into the aproriate 'enable register', to specify which channel should be measured during the next measurement phase.
|
---|
67 | %In case one is not sure which channel was activated beforehand users may issue a 'status' command, to gather information about FSCs current status.
|
---|
68 | Whenever the user completed the channel activation process the 'measure' commands may be issued. Since the high resolution ADC AD7719 used for resistance measurement and the 10bit ADC used for voltage measurement run independently on different time scales, different 'measure' commands are defined. 'measure resistances' will start the measurement of all activated resistance channels possibly taking some seconds, while 'measure voltages' will start a measurement of the activated voltage channel and be ready almost instantaneosly.
|
---|
69 | Since a measurement might take some time, FSC generates an answer, once the 'measure' command received, informing the user about the command reception. The results are later submitted in a single message to the user, which is called a telegram.
|
---|
70 | Since the maximum readout data rate for the MCU from W5100 memory (~100kb/s) is substantially smaller than the data rate over ethernet, is is possible for the user to fill the W5100 receive memory, while FSC is still working on the first command. Although not extensivly tested, the reaction of W5100 to a completly filled memomry is not critical. It will stop acknowledging incoming TCP/IP packets, which ususally causes the sender to keep sending them. Eventually a time out on user side will occur and the connection will look like lost, but actually it was just given up by the sender.
|
---|
71 | During a 'measure resistance' FSC is not checking for incoming commands. So incoming commands will pile up in W5100 input FIFO. Which means, sending a lot of on demand commands will delay FSCs reaction to the following commands consecutivly.
|
---|
72 | The W5100 transmission FIFO can recieve 4kbyte. I am not sure what happens in case this FIFO is completely full, but I guess W5100 will reject incoming TCP/IP packets and the user side PC will constantly keep on (re)sending them. Since a typical command consists of less than 10bytes it is necessary to send a lot of commands without receiving any answer before the FSC FIFO is full.
|
---|
73 | The theoretical limit for data readout from the W5100 FIFO into the ATmega microncontroller is about 98kbyte/s.
|
---|
74 |
|
---|
75 | \subsubsection{RTD switching}
|
---|
76 | FSCs high resolution ADC AD7719 only bears one single input channel. So the RTDs are beeing multiplexed during the resistance measurement. This multplexing includes the RTDs current supply of about $400\,{\mu}A$. In case the RTDs are near to FACTs G-APD signal lines, low frequency crosstalk might be induced due to these switching processes.
|
---|
77 | In case of FACT there might be two families of RTDs. About 30 pieces will be mounted next to the G-APDs, while a smaller number of sensors will be mounted in the electronics compartement, where this kind of noise will not contribute much.
|
---|
78 | Maybe this swithcing noise can be completely cancelled by parallel capacities of $C_P \approx 10\,{\mu}F$.
|
---|
79 |
|
---|
80 |
|
---|
81 | \subsection{The Telegram}
|
---|
82 | As previously outlined the results of a measurement will be submitted in a single message called telegram. The format of this telegram is given in table (\ref{tbl_telegram}). Despite the fact that the measurement of several RTDs might take several seconds, the storage and transmission of the time of each temperature measurement is regarded as too much overhead, hence the time of the last measurement taken for a telegram is submitted within. Subsequent all activated sensor measurement results are beeing transmitted. A result always consists of a sensor ID and the actual data. Detailed information about the composition of the sensor ID can be found in table (\ref{tdl_sensor_id}). The data might be either 3 byte in case of an RTD or 2 byte in case of all other sensors. For detailed information of sensor data see section \ref{sec_sensor_data}.
|
---|
83 | \begin{table}[htpb]
|
---|
84 | \begin{tabular}{|l|l|l|}
|
---|
85 | \hline
|
---|
86 | address & mnemonic & description \\
|
---|
87 | \hline
|
---|
88 | byte 0 & 0x00 & special telegram header \\
|
---|
89 | byte 1..2 & length & length of telegram in byte \\
|
---|
90 | byte 3...6 & time & time, when measurement was finished.\\
|
---|
91 | byte 7 & sensor ID 0 & \\
|
---|
92 | byte 8..x & data 0 & data field is eigther 2 or 3 byte wide. \\
|
---|
93 | & & depending of sensor type. \\
|
---|
94 | \hline
|
---|
95 | byte ... & ... & sensor IDs and data until end.\\
|
---|
96 | \hline
|
---|
97 | \end{tabular}
|
---|
98 | \caption{composition of FSC telegram}
|
---|
99 | \label{tbl_telegram}
|
---|
100 | \end{table}
|
---|
101 |
|
---|
102 | \begin{table}[htpb]
|
---|
103 | \begin{tabular}{|l|l|l|}
|
---|
104 | \hline
|
---|
105 | ID bits & meaning \\
|
---|
106 | \hline
|
---|
107 | 00pp.psss & temperatur sensor no. sss on port ppp \\
|
---|
108 | 01vv.vvvv & voltage sensor no. vvvvvv (between 0..35) \\
|
---|
109 | 10cc.cccc & current sensor no. cccccc (between 0..35)\\
|
---|
110 | 1100.0hhh & humidity sensor no. hhh \\
|
---|
111 | &\\
|
---|
112 | ... & to be completed \\
|
---|
113 | \hline
|
---|
114 | \end{tabular}
|
---|
115 | \caption{composition of the sensor ID - ad exemplum}
|
---|
116 | \label{tdl_sensor_id}
|
---|
117 | \end{table}
|
---|
118 |
|
---|
119 | \subsection{Sensor Data}
|
---|
120 | \label{sec_sensor_data}
|
---|
121 | FSC supports many different sensors. The first type is any resistive sensor, such as RTDs. The second type is any sensor outputting a voltage between 0VDC and 4.096VDC. In order to keep the firmware independent from the sensors and to keep it as simple as possible, the measured data is treated as less as possible before beeing output.
|
---|
122 |
|
---|
123 | Since the resistance measurement is perfomed in a ratiometric manner, the resistance is measured as a 24bit fraction of an onboard fix reference resistor of $\mathrm{R_{ref}} \approx 6.25 \mathrm{k\Omega}$ (see table \ref{tbl_REG_overview}). The value of $\mathrm{R_{ref}}$ is not stored as a constant value, so the user should measure its value once and submit it to the FSC. In case no value is submitted, $\mathrm{R_{ref}} = 6.25\,k\Omega$ is assumed.
|
---|
124 | FSC does not multiply the measured fraction with the reference resistance. Hence the resistance is unknown on FSC and cannot be transformed into a temperature. Similarly the current of the low voltage supply channels, which is converted into a voltage level and measured by FSC is not beeing treated in any way by the MCU but directly transmitted to the user via ethernet.
|
---|
125 | The format of each sensor data is given in table \ref{tbl_sensor_data_format}.
|
---|
126 | \begin{table}[htpb]
|
---|
127 | \begin{tabular}{|l|l|l|l|l|l|}
|
---|
128 | \hline
|
---|
129 | sensor name & actual physical value & resolution & width & format & unit \\
|
---|
130 | \hline
|
---|
131 | temperature & resistance &24 or 16 bit & 24 & unsigned int & fraction of $\mathrm{R_{ref}}$ \\
|
---|
132 | humidity & voltage & 10 bit & 16 & unsigned int & V \\
|
---|
133 | voltage & voltage & 10 bit & 16 & unsigned int & V \\
|
---|
134 | current & voltage & 10 bit & 16 & unsigned int & V \\
|
---|
135 | \hline
|
---|
136 | \end{tabular}
|
---|
137 | \caption{sensor data format}
|
---|
138 | \label{tbl_sensor_data_format}
|
---|
139 | \end{table}
|
---|
140 |
|
---|
141 |
|
---|
142 |
|
---|
143 |
|
---|
144 | \section{Ethernet Interface}
|
---|
145 | FSC runs as a TCP/IP server, this means after W5100 was initialized, FSC will listen on a Port, but will not attempt to connect to any server. Since W5100 does not support DHCP, FSC has a fix IP\footnote{see FACT Elogbook / doc}. The Port is defined as 5000.
|
---|
146 | For simplicity of firmware coding, the UI is non human readable. Table (\ref{tbl_FSC_CMDS}) shows which commands are defined (so far).
|
---|
147 | Some commands need parameters others don't. Table (\ref{tbl_FSC_CMD_PACKAGE}) shows how a message containing a command is defined.
|
---|
148 | Since TCP/IP packages on the ethernet might be delayed up to minutes timescale it is handy to identify command packages by a (nearly-)unique ID instead of its time only. So when the user receives an answer of the FSC, it is possible to relate it to a specific command.
|
---|
149 | Generally FSC copies the package ID of a given command package into its answer.
|
---|
150 |
|
---|
151 | The following commands are defined:
|
---|
152 | \begin{table}[htpb]
|
---|
153 | \begin{tabular}{|l|l|l|}
|
---|
154 | \hline
|
---|
155 | command & function & description \\
|
---|
156 | \hline
|
---|
157 | 0x00 & -reserved- & -reserved- \\
|
---|
158 | 0x01 & status & returns entire FSC registers. see table (\ref{tbl_REG_overview}) \\
|
---|
159 | 0x02 & write reg(U8 addr, U8 data) & write data to register address \\
|
---|
160 | 0x03 & read reg(U8 addr) & return only specified register \\
|
---|
161 | 0x04 & measure active R-channels & see see \ref{sec_measuring} \\
|
---|
162 | 0x05 & measure active V-channels & see ... \\
|
---|
163 | 0x06 & measure all active channels & see ... \\
|
---|
164 | 0x07 & set timer(U32 data) & set internal timer \\
|
---|
165 | 0x08 & start timer & start timer after setting. see \ref{sec_time_register}\\
|
---|
166 | 0x09 & stop timer & stop timer before setting. \\
|
---|
167 | &&\\
|
---|
168 | ... & ... & to be completed \\
|
---|
169 | && \\
|
---|
170 | 0xFF & reset & reset all internal registers and peripherals \\
|
---|
171 | \hline
|
---|
172 | \end{tabular}
|
---|
173 | \caption{FSC commands}
|
---|
174 | \label{tbl_FSC_CMDS}
|
---|
175 | \end{table}
|
---|
176 |
|
---|
177 | \begin{table}[htpb]
|
---|
178 | \begin{tabular}{|l|l|l|}
|
---|
179 | \hline
|
---|
180 | address & mnemonic & description \\
|
---|
181 | \hline
|
---|
182 | byte 0 & command & see table\ref{tbl_FSC_CMDS}\\
|
---|
183 | byte 1 & package ID & (nearly-)unique package identifier \\
|
---|
184 | byte 2 & length & length of data section - if apropriate\\
|
---|
185 | byte 3..1k & data & parameters for command - if apropriate\\
|
---|
186 | \hline
|
---|
187 | \end{tabular}
|
---|
188 | \caption{composition of FSC commands}
|
---|
189 | \label{tbl_FSC_CMD_PACKAGE}
|
---|
190 | \end{table}
|
---|
191 |
|
---|
192 | FSC answers with a short acknowledgement to any command. An acknowledgement contains the command in the first byte and the (nearly-)unique package ID of the command package in the second byte.
|
---|
193 | \begin{table}[htpb]
|
---|
194 | \begin{tabular}{|l|l|l|}
|
---|
195 | \hline
|
---|
196 | address & mnemonic & description \\
|
---|
197 | \hline
|
---|
198 | byte 0 & command & command, which caused this acknowledgement \\
|
---|
199 | byte 1 & package ID & package ID of the command package \\
|
---|
200 | \hline
|
---|
201 | \end{tabular}
|
---|
202 | \caption{composition of FSCs acknowledgement}
|
---|
203 | \label{tbl_FSC_ACK}
|
---|
204 | \end{table}
|
---|
205 |
|
---|
206 | If the user issued a measurement command, a telegram is beeing send whenever the measurement is done. In case of free running mode even several telegrams will be submitted. In order to distinguish a telegram from a command acknowledgement, the first byte is always 0x00, see table (\ref{tbl_telegram}).
|
---|
207 |
|
---|
208 | %\newpage
|
---|
209 | \subsection{FSC Registers}
|
---|
210 | Table \ref{tbl_REG_overview} shows an overview of the FSC registers. Most registers may be read and written. Only the first two registers are readonly. Detailed descriptions of the register contents (will) follow. All registers are 8bit wide.
|
---|
211 | \begin{table}[htpb]
|
---|
212 | \begin{tabular}{|l|l|l|}
|
---|
213 | \hline
|
---|
214 | {\bf address} & {\bf name} & {\bf description } \\
|
---|
215 | \hline
|
---|
216 | 0x00 & status3 & status register. TBR \\
|
---|
217 | 0x01 & status2 & see \ref{sec_status_register} \\
|
---|
218 | 0x02 & status1 & \\
|
---|
219 | 0x03 & status0 & \\
|
---|
220 | 0x02 & time\_s3 & current time in secondsMSB\\
|
---|
221 | 0x03 & time\_s2 & see \ref{sec_time_register}\\
|
---|
222 | 0x04 & time\_s1 & \\
|
---|
223 | 0x05 & time\_s0 & current time in seconds LSB\\
|
---|
224 | 0x08 & time\_ms1 & current time, fraction of miliseconds MSB\\
|
---|
225 | 0x09 & time\_ms0 & -the same- LSB\\
|
---|
226 | 0x0A & FRperiod1 & time in seconds between two free running measurements MSB\\
|
---|
227 | 0x0B & FRperiod0 & -the same- LSB\\
|
---|
228 | 0x0C & RREF1 & reference resistor value in ohms (MSB) \\
|
---|
229 | 0x0D & RREF0 & reference resistor value in ohms (LSB) \\
|
---|
230 | 0x10 & TempEn7 & \\
|
---|
231 | 0x11 & TempEn6 & \\
|
---|
232 | 0x12 & TempEn5 & \\
|
---|
233 | 0x13 & TempEn4 & \\
|
---|
234 | 0x14 & TempEn3 & \\
|
---|
235 | 0x15 & TempEn2 & \\
|
---|
236 | 0x16 & TempEn1 & \\
|
---|
237 | 0x17 & TempEn0 & bitmap defining which channel \\
|
---|
238 | 0x18 & HumiEn0 & is activated\\
|
---|
239 | 0x19 & VoltEn4 & \\
|
---|
240 | 0x1A & VoltEn3 & \\
|
---|
241 | 0x1B & VoltEn2 & \\
|
---|
242 | 0x1C & VoltEn1 & \\
|
---|
243 | 0x1D & VoltEn0 & \\
|
---|
244 | 0x1E & CurrEn4 & \\
|
---|
245 | 0x1F & CurrEn3 & \\
|
---|
246 | 0x20 & CurrEn2 & \\
|
---|
247 | 0x21 & CurrEn1 & \\
|
---|
248 | 0x22 & CurrEn0 & \\
|
---|
249 | 0x30 & TempDone7 & \\
|
---|
250 | 0x31 & TempDone6 & \\
|
---|
251 | 0x32 & TempDone5 & \\
|
---|
252 | 0x33 & TempDone4 & \\
|
---|
253 | 0x34 & TempDone3 & \\
|
---|
254 | 0x35 & TempDone2 & \\
|
---|
255 | 0x36 & TempDone1 & \\
|
---|
256 | 0x37 & TempDone0 & bitmap defining which channel \\
|
---|
257 | 0x38 & HumiDone0 & is already measured\\
|
---|
258 | 0x39 & VoltDone4 & \\
|
---|
259 | 0x3A & VoltDone3 & \\
|
---|
260 | 0x3B & VoltDone2 & \\
|
---|
261 | 0x3C & VoltDone1 & \\
|
---|
262 | 0x3D & VoltDone0 & \\
|
---|
263 | 0x3E & CurrDone4 & \\
|
---|
264 | 0x3F & CurrDone3 & \\
|
---|
265 | 0x40 & CurrDone2 & \\
|
---|
266 | 0x41 & CurrDone1 & \\
|
---|
267 | 0x42 & CurrDone0 & \\
|
---|
268 | ... & ... & to be completed \\
|
---|
269 | \hline
|
---|
270 | \end{tabular}
|
---|
271 | \caption{FSC registers}
|
---|
272 | \label{tbl_REG_overview}
|
---|
273 | \end{table}
|
---|
274 |
|
---|
275 | \subsubsection{Status Registers}
|
---|
276 | \label{sec_status_register}
|
---|
277 | Apart from the possibility of crosstalk due to RTD channel switching, it is of course possible to let FSC monitor all of its active channels an in case one channel exceeds a its threshold, a message is generated.
|
---|
278 | In this case these thresholds need to be stored and this modus needs to be switched on or off.
|
---|
279 | Some additional information might be stored here, such as:
|
---|
280 | \begin{itemize}
|
---|
281 | \item Timer enabled/disabled
|
---|
282 | \item SPI interface adjusted for: AD7719 / W5100
|
---|
283 | \item ...
|
---|
284 | \end{itemize}
|
---|
285 |
|
---|
286 | \subsubsection{Time Registers}
|
---|
287 | \label{sec_time_register}
|
---|
288 | Here the current time is stored. Four registers are used to store the current time in seconds, so the current unix time might be
|
---|
289 | transfered to FSC after power up. Additionaly two registers store the current time in milisenconds. This register cannot be set by the user.
|
---|
290 | When the user wants to synchronize FSC to the current time, first the timer should be stopped by issuing the 'stop timer' command. Then the Time Registers should be written and finally the 'start timer' command should be sent, causing the milisecond registers to be reset as well.
|
---|
291 |
|
---|
292 | \subsubsection{The Enable Registers}
|
---|
293 | \label{sec_enable_registers}
|
---|
294 | Most probably not every input channel will be connected to a sensor. In order not to measure unconnected channels, the user may define, which sensor is active, by writing to the registers, TempEnx, HumiEnx, AcceEnx, VoltEnx and CurrEnx the apropriate bitpattern.
|
---|
295 |
|
---|
296 | \subsubsection{Ideas for more registers}
|
---|
297 | \label{sec_register_ideas}
|
---|
298 |
|
---|
299 | %\appendix
|
---|
300 | \end{document}
|
---|