hardware realization pics and some content .,...,

master
Ondřej Hruška 7 years ago
parent 2150a2bba8
commit 15c8640c15
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      ch.conclusion.tex
  2. 2
      ch.fw_structure.tex
  3. 100
      ch.hardware_realization.tex
  4. 2
      ch.introduction.tex
  5. 2
      ch.pc_software.tex
  6. 2
      ch.requirement_analysis.tex
  7. 2
      ch.wireless.tex
  8. 3
      document_config.tex
  9. BIN
      img/horse-deadline.jpg
  10. BIN
      img/j8header-zero-large.png
  11. BIN
      img/photo-hub1.jpg
  12. BIN
      img/photo-hub2.jpg
  13. BIN
      img/photo-rfdongle.jpg
  14. BIN
      img/photo-zero-naked-bottom.jpg
  15. BIN
      img/photo-zero-naked.jpg
  16. BIN
      img/photo-zero-pi-compare.jpg
  17. BIN
      img/photo-zero-picase.jpg
  18. BIN
      img/photo-zero-transparent.jpg
  19. BIN
      img/photos/2018-05-04T10:07:23Z_0.jpg
  20. BIN
      img/photos/P1030754.JPG
  21. BIN
      img/photos/P1030756.JPG
  22. BIN
      img/photos/P1030757.JPG
  23. BIN
      img/photos/P1030765.JPG
  24. BIN
      img/photos/P1030766.JPG
  25. BIN
      img/photos/P1030770.JPG
  26. BIN
      img/photos/P1030772.JPG
  27. BIN
      img/photos/P1030777.JPG
  28. BIN
      img/photos/P1030787.JPG
  29. BIN
      img/photos/rfdongle-composite.xcf
  30. 1
      pre.ctuthesis_config.tex
  31. 1
      thesis.acronyms.tex
  32. 7
      thesis.bib
  33. BIN
      thesis.pdf
  34. 6
      thesis.tex
  35. 2
      thesis.thanks.tex

@ -1,3 +1,3 @@
\chapter{Conclusion}
\todo[inline]{xy was developed ... project works great ... possible future improvements ...}
\todo[inline]{TODO}

@ -49,7 +49,7 @@ The data flows and other internal logic of the firmware are depicted in \cref{fi
\begin{figure}[h]
\centering
\includegraphics[scale=1] {img/gex-internal.pdf}
\includegraphics[width=\textwidth] {img/gex-internal.pdf}
\caption{\label{fig:gex-internal}Block diagram showing the internal logic in the GEX firmware}
\end{figure}

@ -1,3 +1,101 @@
\chapter{Hardware Realization}
\todo[inline]{TODO schematics (maybe in appendix). photos of the PCBs. Links to this chapter from elsewhere}
\section{Using a Discovery Board}
It has been proposed earlier in the text that STM32 Nucleo and Discovery development boards might be used as the hardware platform for this project. Indeed, a Discovery board with STM32F072~\cite{disco-f072} was used as a development platform for the majority of the GEX firmware. This inexpensive board may be used to try the GEX firmware without having access to the custom hardware.
\subsection{Discovery F072 Configuration and Pin Mapping}
This Discovery board is fitted with four \glspl{LED} on \gls{GPIO} pins PC6 through PC9, in a compass arrangement. The ``north'' \gls{LED}, PC6, is used as the GEX status indicator. The ``User'' button, connected to PA0, is mapped as the GEX Lock button, controlling the settings storage.
We advise the reader, as a potential user of this discovery board, to review its schematic diagram and ensure the solder-jumpers are configured correctly:
\begin{itemize}
\item Jumpers SB20 and SB23 must be closed to enable the User \gls{USB} connector
\item Jumper SB17 must be open and SB19 closed to use the 8\,MHz clock signal provided by the on-board ST-Link programmer; the internal USB-synchronized 48\,MHz oscillator will be used if the clock signal is not provided (SB19 open).
\item Jumpers SB27 through SB32 should be closed to connect the \gls{GPIO} pins normally dedicated to the touch sensing strip to the board's header.
\item Capacitors C26 through C28 are sampling capacitors for the \gls{TSC}. There are, unfortunately, no jumpers available to disconnect them, and they interfere in high-speed signals on the used pins (PA3, PA7, PB1). The only solution is to carefully remove them from the board if the \gls{TSC} is not needed.
\end{itemize}
An accelerometer \gls{IC} L3GD20 is fitted on the board. The chip is attached to SPI2 on pins PB13 (\gls{SCK}), PB14 (\gls{MISO}) and PB15 (\gls{MOSI}), with \gls{NSS} on pin PC0, and PC1 and PC2 used for interrupt flags. This chip cannot be disconnected or disabled and it is difficult to remove; care must be taken to avoid its interference on the used pins.
\section{GEX Hub}
GEX Hub was the first custom \gls{PCB} designed for GEX. It uses the same microcontroller as the Discovery board, thus the firmware modifications needed to make it work with this new platform were minimal.
The Hub board provides access to all the \gls{GPIO} pins using three flat-cable connectors, one for each port; they also contain a ground and power supply connection to make the connection of external boards or a breadboard easier, needing just one cable. The use of flat cables, however, is not mandatory---those connectors are based on the standard 2.54\,mm pitch pin headers, allowing the user to connect to them using widely available ``jumper wires''.
This board was produced in two revisions. The original model ( \cref{fig:gexhub1}) proved fully functional, except for the two connectors on the left side, the boot jumper and a programming header, which had the wrong footprints and could not be populated; this mistake was fixed by soldering the jumper from the bottom of the \gls{PCB}, and the programming header was never needed thanks to the USB bootloader working without issues.
The updated revision removes the two problematic footprints altogether; a reorganization in the \gls{GPIO} connectors allowed them to be moved together with the other pins. Revision 1 used a dedicated header for the Boot jumper that was meant to be closed during normal operation, and removed only to enter the bootloader. Revision 2 moved the boot pin into the connector, and such arrangement would not be practical; the solution was to invert the jumper's logic by changing the Boot pull-up to a pull-down. The bootloader is now activated by inserting a regular 2.54\,mm jumper into the connector\footnote{A restart is required in all cases for the boot jumper changes to have effect}, as can be seen in \cref{fig:gexhub2}.
\begin{figure}[h]
\centering
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=.98\linewidth]{img/photo-hub1.jpg}
\caption{\label{fig:gexhub1}Revision 1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=.98\linewidth]{img/photo-hub2.jpg}
\caption{\label{fig:gexhub2}Revision 2}
\end{subfigure}
\caption[The GEX Hub module]{\label{fig:gexhub} Two revisions of the GEX Hub module, rev. 2 shown with the boot jumper and a flat cable.}
\end{figure}
\section{GEX Zero}
Our desire to re-use the form factor of the Raspberry Pi Zero to exploit the existing market with add-on boards and cases for it has been revealed already in \cref{sec:formfactors}. This was brought to fruition with GEX Zero, the second realized prototype board (counting the two revisions of GEX Hub as one).
GEX Zero exactly copies the dimensions of the Pi Zero, which introduces several challenges:
\begin{itemize}
\item It must be a one-sided board, with no components on the bottom; this is needed for acrylic cases which sit flatly against the \gls{PCB}, with a cut-out for the pin header.
\item Buttons and the USB connector have to exactly align with connectors on the Pi Zero to fit the openings in its cases.
\item The board size is fixed, and rather small; we used only two layers to save production cost, but this proved a significant challenge and the electrical characteristics of some connections may not be ideal.
\item To make use of the Raspberry Pi add-on boards, called HATs or pHATs, a particular organization of the pin header is required. This is discussed in more detail below.
\end{itemize}
\subsection{Finding the Best Pin Assignment}
Like our STM32 microcontroller, the Broadcom processor on the Raspberry Pi multiplexes its \gls{GPIO} pins with alternate functions, and, likewise, each function is available only on a small selection of pins. A number of compromises had to be made to achieve maximum compatibility.
\todo[inline]{show the pi header mappings and the gex zero pin mappings}
\begin{figure}[h]
\centering
\includegraphics[width=.9\textwidth]{img/photo-zero-naked.jpg} \\
\vspace{1mm}
\includegraphics[width=.9\textwidth]{img/photo-zero-naked-bottom.jpg}
\caption[The GEX Zero module]{\label{fig:gexz}GEX Zero, top and bottom side}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=.9\textwidth]{img/photo-zero-picase.jpg} \\
\vspace{1mm}
\includegraphics[width=.9\textwidth]{img/photo-zero-transparent.jpg}
\caption[The GEX Zero module]{\label{fig:gexzcases}GEX Zero in the official Raspberry Pi Zero case and an aftermarket acrylic case}
\end{figure}
\section{Wireless Gateway}
\cref{fig:gwxgw}
\todo[inline]{TODO about the gateway ..}
\begin{figure}[h]
\centering
\includegraphics[width=.9\textwidth]{img/photo-rfdongle.jpg}
\caption{\label{fig:gwxgw}The wireless gateway module (top and bottom side)}
\end{figure}

@ -16,7 +16,7 @@ Today, when one wants to perform measurements using a digital sensor, the usual
The design and implementation of such a universal instrument is the object of this work. For technical reasons, such as naming the source code repositories, we need a name for the project; it'll be hereafter called \textit{GEX}, a name originating from ``GPIO Expander''.
\section{The Project's Expected Outcome}\label{sec:expected-outcome}
\section{Expected Outcome}\label{sec:expected-outcome}
It has been a desire of the author for many years to create a universal instrument connecting low-level hardware to a computer, and, with this project, it is finally being realized. Several related projects approaching this problem from different angles can be found on the internet; those will be presented in \cref{sec:prior-art}. This project should not end with yet another tinkering tool that will be produced in a few prototypes and then forgotten. By building an extensible, open-source platform, GEX can become the foundation for future projects which others can expand, re-use and adapt to their specific needs.

@ -77,7 +77,7 @@ An example Python program displaying a test pattern on a \gls{LED} matrix using
\begin{figure}[h]
\centering
\includegraphics[width=.7\textwidth] {img/phatmtx.jpg}
\caption{\label{fig:pydemo}GEX Zero with the Micro Dot pHAT add-on board, showing a test pattern defined in a Python script}
\caption[GEX Zero with the Micro Dot pHAT add-on board]{\label{fig:pydemo}GEX Zero with the Micro Dot pHAT add-on board, showing a test pattern defined in a Python script}
\end{figure}
First, a client instance is created, receiving the transport as an argument. We use a With block in the example to ensure the transport is safely closed before the program ends, even if that happens due to an exception; this is similar to the Try-Finally pattern in Java. The client (and subsequently the transport) can be closed manually by calling its \mono{.close()} method. Inside the With block, the script proceeds to create unit handles and use them to perform the desired task, in our case a communication with the \gls{LED} matrix driver over the \gls{I2C} bus.

@ -89,7 +89,7 @@ The STM32F072 is a Cortex M0 device with 128\,KiB of flash memory, 16\,KiB of \g
To effectively utilize the time available for this work, only the STM32F072 firmware will be developed while making sure the planned expansion is as straightforward as possible.
\section{Form Factor Considerations}
\section{Form Factor Considerations} \label{sec:formfactors}
While the GEX firmware can be used with existing evaluation boards from ST Microelectronics (see \cref{fig:discovery} for an example of one such board), we wish to design and realize a few custom hardware prototypes that will be smaller and more convenient to use.

@ -79,7 +79,7 @@ The nRF24L01+ was selected to be integrated into GEX thanks to its inclusion of
A separate device, the \textit{GEX wireless gateway}, was developed to provide the PC connection to a nRF24L01+ module. It is based on the STM32F103 microcontroller in its smallest package (LQFP48), selected for its low cost and good availability.
\todo[inline]{more about the hardware}
\todo[inline]{TODO the above --remove/update/link to the hw chapter}
\subsection{The Wireless Gateway Protocol}

@ -72,7 +72,6 @@
\usepackage[nameinlink,capitalize,noabbrev]{cleveref}
%% ACRONYM CONFIG
\usepackage[xindy,nonumberlist,nomain,acronym,nopostdot,toc=false]{glossaries}
%\glssetwidest{ABCD}
@ -81,8 +80,8 @@
\renewcommand*{\glspostdescription}{}
\makeglossaries
\glsaddall
%\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}}
\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}}
\input{pre.utils}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

@ -57,4 +57,3 @@
\ctutemplate{twocolumn.listoffigures}
\end{twocolumnfrontmatterpage}
}

@ -53,6 +53,7 @@
\newacronym{API}{API}{application programming interface}
\newacronym{LED}{LED}{light emitting diode}
\newacronym{MCU}{MCU}{microcontroller unit}
\newacronym{MCO}{MCO}{Microcontroller Clock Output}
\newacronym{RAM}{RAM}{random-access memory}
\newacronym{ROM}{ROM}{read-only memory}

@ -372,6 +372,13 @@
urldate = {2018-05-12}
}
@online{disco-f072,
author = STM,
title = {Discovery kit with STM32F072RB MCU},
url = {http://www.st.com/en/evaluation-tools/32f072bdiscovery.html},
urldate = {2018-05-16}
}
% Figure sources

Binary file not shown.

@ -2,6 +2,9 @@
\input{document_config} % import balíků a nastavení ctuthesis
\usepackage[firstpage]{draftwatermark}
\SetWatermarkLightness{0.9}
% --- obsah zvláštních oddílů ---
\input{thesis.abstract}
@ -48,6 +51,9 @@
% seznam bibliografie
\printbibliography
\newpage
\todo[inline]{Schematics here ....}
% ... appendices
\end{document}

@ -1,6 +1,6 @@
% Acknowledgements
\begin{thanks}
blabla
\todo[inline]{TODO}
\end{thanks}

Loading…
Cancel
Save