Prototyping, design evaluation, and the measurement of physical properties in experiments make a daily occurrence in the engineering praxis. Those tasks often involve the generation and sampling of electrical signals coming to and from sensors, actuators, and other circuitry.
Prototyping, design evaluation, and the measurement of physical properties in experiments make a daily occurrence in the engineering praxis. Those tasks often involve the generation and sampling of electrical signals coming to and from sensors, actuators, and other circuitry.
Recently, a wide range of intelligent sensors became available thanks to the drive to miniaturization in the consumer electronics industry (\cref{fig:some_sensors}). Those devices often provide sufficient accuracy and precision while keeping the circuit complexity and cost low. In contrast to analog sensors, here the signal conditioning and processing circuits are built into the sensor itself, and we access it using a digital connection.
Recently, a wide range of intelligent sensors became available thanks to the drive to miniaturization in the consumer electronics industry (\cref{fig:some_sensors}). Those devices often provide sufficient accuracy and precision while keeping the circuit complexity and cost low. In contrast to analog sensors, here the signal conditioning and processing circuits are built into the sensor itself, and we access it through a digital connection.
\begin{figure}[H]
\begin{figure}[H]
\centering
\centering
@ -10,17 +10,17 @@ Recently, a wide range of intelligent sensors became available thanks to the dri
\caption[A collection of intelligent sensors and devices]{\label{fig:some_sensors}A collection of intelligent sensors and devices, most on breadboard adapters: (from the top left) a waveform generator, a gesture detector, a LoRa and two Bluetooth modules, an air quality and pressure sensor, a CO$_2$ sensor, a digital compass, an accelerometer, a GPS module, a camera, an ultrasonic range finder, a humidity sensor, a 1-Wire thermometer, a color detector, and an RGB LED strip}
\caption[A collection of intelligent sensors and devices]{\label{fig:some_sensors}A collection of intelligent sensors and devices, most on breadboard adapters: (from the top left) a waveform generator, a gesture detector, a LoRa and two Bluetooth modules, an air quality and pressure sensor, a CO$_2$ sensor, a digital compass, an accelerometer, a GPS module, a camera, an ultrasonic range finder, a humidity sensor, a 1-Wire thermometer, a color detector, and an RGB LED strip}
\end{figure}
\end{figure}
If we wish to conduct experiments with those integrated modules, or just familiarize ourselves with a device before using it in a project, we need an easy way to interact with them. It would also be convenient to have direct access to low-level hardware, be it analog signal sampling, generation, or even just the access to logic inputs and outputs. However, advances in computer technology, namely the advent of the \gls{USB}, lead to the disappearance of low-level computer ports, such as the printer port (LPT), that would provide an easy way of doing so.
If we wish to conduct experiments with these integrated modules, or just familiarize ourselves with a device before using it in a project, we need an easy way to interact with them. It would also be convenient to have direct access to low-level hardware, be it analog signal sampling, generation, or even just the access to logic inputs and outputs. However, advances in computer technology, namely the advent of the \gls{USB}, lead to the disappearance of low-level computer ports, such as the printer port (LPT), that would provide an easy way of doing so.
Today, when we want to perform measurements using a digital sensor, the usual route is to implement an embedded firmware for a microcontroller that connects to the \gls{PC} through \gls{USB}, or perhaps shows the results on a display. This approach has its advantages, but is time-consuming and requires specific knowledge unrelated to the measurements we wish to perform. It would be advantageous to have a way to access hardware without having to burden ourselves with the technicalities of this connection, even at the cost of lower performance compared to specialized devices or professional tools.
Today, when we want to perform measurements using a digital sensor, the usual route is to implement embedded firmware for a microcontroller that connects to the \gls{PC} through \gls{USB}, or perhaps shows the results on a display. This approach has its advantages, but is time-consuming and requires specific knowledge unrelated to the measurements we wish to perform. It would be advantageous to have a way to access hardware without having to burden ourselves with the technicalities of this connection, even at the cost of lower performance compared to specialized devices or professional tools.
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 shall be, hereafter, called \textbf{GEX}, a name originating from ``\textbf{G}PIO \textbf{Ex}pander''.
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 shall be hereafter called \textbf{GEX}, a name derived from ``\textbf{G}PIO \textbf{Ex}pander''.
It has been a long-time desire of the author 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; some of these will be presented in \cref{sec:prior_art}.
It has been a long-time desire of the author 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; some of these will be presented in \cref{sec:prior_art}.
Our project is not meant to end with a tinkering tool that will be produced in a few prototypes and then forgotten. By creating 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.
Our project is not meant to end as a tinkering tool that will be produced in a few prototypes and then forgotten. By creating 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.
\iffalse
\iffalse
\begin{figure}[H]
\begin{figure}[H]
@ -30,7 +30,7 @@ Our project is not meant to end with a tinkering tool that will be produced in a
\end{figure}
\end{figure}
\fi
\fi
Building on the experience with earlier embedded projects, an STM32 microcontroller will be used. Those are \armcm devices with a wide range of hardware peripherals that appear be a good fit for the project. Low-cost evaluation boards are widely available that could be used as a hardware platform instead of developing a custom \gls{PCB}. STM32 microcontrollers are relatively cheap and already popular in the embedded hardware community; there is a real possibility of the project gathering a community around it and growing beyond what will be presented in this paper.
Building on the experience with earlier embedded projects, an STM32 microcontroller will be used. Those are \armcm devices with a wide range of hardware peripherals that should be a good fit for the project. Low-cost evaluation boards are available that could be used as a hardware platform instead of developing a custom \gls{PCB}. STM32 microcontrollers are affordable and already popular in the embedded hardware community, so there is a real possibility of the project gathering a community around it and growing beyond what will be presented in this paper.
\iffalse
\iffalse
Besides the use of existing development boards, custom \glspl{PCB} will be developed in different form factors. The possibilities of wireless connection should be evaluated. This feature should make GEX useful for instance in mobile robotics or when installed in poorly accessible locations.
Besides the use of existing development boards, custom \glspl{PCB} will be developed in different form factors. The possibilities of wireless connection should be evaluated. This feature should make GEX useful for instance in mobile robotics or when installed in poorly accessible locations.
When adding a new digital sensor or a module to a hardware project, we want to test it first, learn how to properly communicate with it, and confirm its performance. Based on this evaluation we decide whether the module matches our expectations and learn how to properly connect it, which is needed for a successful \gls{PCB} layout.
When adding a new digital sensor or a module to a hardware project, we want to test it first, learn how to properly communicate with it, and confirm its performance. Based on this evaluation we decide whether the module matches our expectations, and learn how to properly connect it, which is needed for a successful \gls{PCB} design. In experimental setups, this connection may be the only thing we need. Sensor data can be collected immediately after gaining access to its communication interface, and the same applies to controlling actuators or other devices.
In experimental setups, this may be the only thing we need. Data can readily be collected after just connecting the module to a \gls{PC}, same as commanding motor controllers or other intelligent devices.
A couple of well known hardware buses have established themselves as the standard ways to interface digital sensors and modules: \gls{SPI}, \gls{I2C} and \gls{USART} (\gls{UART} in asynchronous mode) are some of the most common ones, often accompanied by a few extra \gls{GPIO} lines for features such as Reset, Chip Enable, or Interrupt. There are exceptions where silicon vendors have developed proprietary communication protocols that continue to be used either for historical reasons, or because of their specific advantages. An example is the Dallas Semiconductor 1-Wire bus used in digital thermometers.
A couple of well known hardware buses have established themselves as the standard ways to interface digital sensors and modules: \gls{SPI}, \gls{I2C} and \gls{USART} (\gls{UART} in asynchronous mode) are some of the most common ones, often accompanied by a few extra \gls{GPIO} lines for features such as Reset, Chip Enable, or Interrupt. There are exceptions where silicon vendors have developed proprietary communication protocols that continue to be used either for historical reasons, or because of their specific advantages. An example is the Dallas Semiconductor 1-Wire bus used in digital thermometers.
This thesis documents the development of a universal software and hardware platform providing high-level user applications running on a PC with access to GPIO pins, hardware buses, and signal acquisition and generation functions, using a USB, USART, or wireless connection.
This thesis documents the development of a universal software and hardware platform providing high-level user applications running on a PC with access to GPIO pins, hardware buses, and signal acquisition and generation functions, using USB, USART, or a wireless connection.
The requirements of common engineering tasks and problems occurring in the university environment were evaluated to design an extensible, reconfigurable hardware module that would make a versatile and low-cost tool that in some cases eliminates the need for professional measurement and testing equipment.
The requirements of common engineering tasks and problems occurring in the university environment were evaluated to design an extensible, reconfigurable hardware module that would make a versatile and low-cost tool that in some cases eliminates the need for professional measurement and testing equipment.
@ -14,6 +14,6 @@ Tato práce popisuje vývoj univerzální softwarové a~hardwarové platformy pr
Byly vyhodnoceny požadavky typických problémů vyskytujících se při práci s~vestavěnými systémy a~ve výuce za účelem návrhu snadno rozšiřitelného a~přenastavitleného hardwarového modulu který bude praktickým, pohodlným a~dostupným nástrojem, který navíc v~některých případech může nahradit profesionální laboratorní přístroje.
Byly vyhodnoceny požadavky typických problémů vyskytujících se při práci s~vestavěnými systémy a~ve výuce za účelem návrhu snadno rozšiřitelného a~přenastavitleného hardwarového modulu který bude praktickým, pohodlným a~dostupným nástrojem, který navíc v~některých případech může nahradit profesionální laboratorní přístroje.
Bylo navrženo několik prototypů hardwarových modulů spolu s~obslužnými knihovnami v~jazycích C a~Python; Python knihovnu lze dále používat z~prostředí MATLAB. Navržené moduly umožňují přístup k~většině běžných hardwarových sběrnic (\IIC, SPI, USART, 1-Wire) a~umožňuje také např. měřit frekvenci a~vzorkovat či generovat analogové signály.
Bylo navrženo několik prototypů hardwarových modulů spolu s~obslužnými knihovnami v~jazycích C a~Python; Python knihovnu lze dále používat z~prostředí MATLAB. Navržené moduly umožňují přístup k~většině běžných hardwarových sběrnic (\IIC, SPI, USART, 1-Wire) a~umožňují také měřit frekvenci a~vzorkovat či generovat analogové signály.
Before you lies the work of many long days and sleepless nights, the result of years of study and planning. This work is released to the commons as a payback for the many open-source projects that allowed it to become what it has.
Before you lies the work of many long days and sleepless nights, the result of years of study and planning. This work is released to the commons as a payback for the many open-source projects that allowed it to become what it has.
\vspace{5pt}
I would like to thank my tutors for the knowledge, and to my friends for the encouragement to pull this off and create something I can be proud of.
I would like to thank my tutors for the knowledge, and to my friends for the encouragement to pull this off and create something I can be proud of.
\vspace{10pt}
\vspace{15pt}
\noindent
\noindent
Special thanks go to:
Special thanks go to:
\vspace{-10pt}
\vspace{-5pt}
\begin{itemize}
\begin{itemize}
\item Annie, for showing me Draw.io, and its developers, for building a great and free diagram drawing tool.
\item Annie, for showing me Draw.io, and its developers, for building a great and free diagram drawing tool.
\item Beatrix, for keeping a friendly server where I could hang out in the breaks between writing.
\item Beatrix, for keeping a friendly server where I could hang out in the breaks between writing.
\item Cpsdqs and others who helped with proofreading.
\item Cpsdqs and others who helped with proofreading.
\item TeXstudio developers, the TeX.StackExchange.com community, and CTAN contributors, without whom this paper would have been much harder to write.
\item TeXstudio developers, the TeX StackExchange community, and CTAN contributors, without whom this paper would have been much harder to write.
\end{itemize}
\end{itemize}
\vspace{5pt}
\noindent
\noindent
\textbf{May the project prosper and be helpful to many.}
\textbf{May the project prosper and be helpful to many.}