GEX thesis source code, full text, references

ch.existing_solutions.tex 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. \chapter{Existing Solutions}\label{sec:prior_art}
  2. The idea of making it easier to interact with low-level hardware from a \gls{PC} is not new. Several solutions to this problem have been developed, each with its own advantages and drawbacks. Some examples will be presented in this chapter.
  3. \section{Raspberry Pi}
  4. \begin{figure}[H]
  5. \centering
  6. \begin{subfigure}{.5\textwidth}
  7. \centering
  8. \includegraphics[width=.95\textwidth] {img/pi3-photo.jpg}
  9. \caption{Raspberry Pi 3 Model B}
  10. \end{subfigure}%
  11. \begin{subfigure}{.5\textwidth}
  12. \centering
  13. \includegraphics[width=.95\textwidth] {img/pi0.jpg}
  14. \caption{Raspberry Pi Zero W}
  15. \end{subfigure}
  16. \caption{\label{fig:rpi}Raspberry Pi minicomputers}
  17. \end{figure}
  18. The Raspberry Pi (\cref{fig:rpi}) is a low-cost minicomputer targeted at school environments and hobbyists. It is often used for home automation, as a simple web server, or built into projects that take advantage of its powerful processor, such as wildlife camera traps, or data acquisition devices with in-situ processing.
  19. The board's \gls{GPIO} header, a row of pins supporting features such as \gls{SPI}, \gls{I2C}, \gls{UART}, or \gls{PWM}, directly accessible by user applications running on the minicomputer, was one of the inspirations behind GEX.
  20. The Raspberry Pi's functionality clearly overlaps with features we wish to support in GEX. Its processor is powerful enough for a regular \gls{OS} with a graphical user interface, and after attaching a display and a keyboard, it can be used as a \gls{PC}. However, when we have a more powerful computer available and only want to extend it with the \gls{GPIO} header, having to use the Raspberry Pi seems inconvenient; this might be overcome with the use of screen sharing or \gls{SSH}, but a low-cost and low-complexity solution like GEX certainly has its appeal.
  21. \section{Bus Pirate}
  22. \begin{figure}[H]
  23. \centering
  24. \includegraphics[width=0.5\textwidth] {img/buspirate.jpg}
  25. \caption{\label{fig:buspirate}Bus Pirate v.4 (photo taken from~\cite{buspirate-product-page})}
  26. \end{figure}
  27. %http://dangerousprototypes.com/blog/about/
  28. % Dangerous Prototypes and manufactured by Seeed Studio\todo{link}
  29. Bus Pirate~\cite{buspirate} is a USB-attached device providing access to hardware interfaces like \gls{SPI}, \gls{I2C}, and \gls{USART}, as well as features like frequency measurement and direct pin access. The board aims to make it easy for users to familiarize themselves with unknown chips and modules; it also provides a range of programming interfaces to program microcontrollers and memory chips. In its scope, the Bus Pirate is similar to GEX. It can further be scripted and controlled from the PC, connects to \gls{USB}, and provides a wide selection of hardware interfaces.
  30. The board is based on a PIC16 microcontroller running at 32\,MHz, connected to the \gls{PC} using a FTDI \gls{USB}/\gls{UART} adapter. Its \gls{ADC} only has a resolution of 10 bits (1024 levels), and there is no \gls{DAC} available on the chip, which makes applications that require a varied output voltage more difficult to implement. Another limitation of the board is its low number of \gls{GPIO} pins; this, however, is not a hindrance to its main purpose as a bus analyzer and gateway.
  31. The board can be purchased for a price similar to the Raspberry Pi, which is still affordable but more expensive that one might expect. This is likely given by the much lower volume of production.
  32. \section{Professional DAQ Modules}
  33. Various professional tools that would fulfill our needs exist on the market, but their high price makes them inaccessible for users with a limited budget, such as hobbyists or students who would like to keep such a device for personal use. An example is the National Instruments (NI) \IIC/SPI Interface Device, which also includes several \gls{GPIO} lines, the NI USB DAQ module, or some of the Total Phase \IIC/SPI gadgets (\cref{fig:profidaq}). GEX could further, in some cases, replace bench multimeters, counters, or waveform generators.
  34. \begin{figure}[h]
  35. \centering
  36. \begin{subfigure}{.5\textwidth}
  37. \centering
  38. \includegraphics[width=.95\linewidth]{img/ni-i2c-device.jpg}
  39. \caption{NI \IIC/SPI Interface Device}
  40. \end{subfigure}%
  41. \begin{subfigure}{.5\textwidth}
  42. \centering
  43. \includegraphics[width=.95\linewidth]{img/nidaq.jpg}
  44. \caption{NI USB DAQ module}
  45. \end{subfigure}
  46. \begin{subfigure}{.5\textwidth}
  47. \centering
  48. \includegraphics[width=.95\linewidth]{img/total-phase-spi-i2c.jpg}
  49. \caption{Total Phase SPI/\IIC Host ``Aardwark''}
  50. \end{subfigure}
  51. \caption[Professional tools that GEX can replace]{\label{fig:profidaq}An example of professional tools that GEX could replace in less demanding scenarios \textit{(pictures taken from marketing materials:~\cite{nidevice1, nidevice2, tphasedevice})}}
  52. \end{figure}
  53. %http://www.ni.com/en-gb/shop/select/i2c-spi-interface-device}
  54. \iffalse
  55. \section{The Firmata Protocol}
  56. \todo[inline]{links}
  57. Firmata is a communication protocol based on MIDI (\textit{Musical Instrument Digital Interface}) for passing data to and from embedded microcontrollers. MIDI is mainly used for attaching electronic musical instruments, such as synthesizers, keyboards, mixers etc., to each other or to a PC. Firmata was designed for Arduino as a high-level abstraction for its connection to the PC, typically using a FTDI chip or equivalent.
  58. Implementing Firmata in the GEX firmware would make it possible to use existing Firmata libraries on the PC side. However, the protocol is limited by the encompassing MIDI format and is not very flexible.
  59. \fi