% !TEX root = master.tex
\subsection{Hardware Design}
The hardware design of the smart table table primarily consists of the microcontroller, wireless communications, lighting, power supply, and physical structure of the table itself. Each hardware subsystem must meet the specifications decided earlier. The devices selected during the design process will be examined by their objective, specifications, and functions. Idiosyncrasies of each component will be explained in detail. 

\subsubsection{Hardware Block Diagram}
The hardware block diagram in Figure \ref{fig:hardblock} is a top-level depiction of how devices withing the smart table will interact with each other. The table will run off of 120VAC mains electricity, which will be passed through a transformer. and stepped down to 24VAC. An AC to DC rectifier will convert the voltage to DC at which point it will be stepped down to 12V with a regulator. The LED matrix will receive 5V input using a 5V regulator, and the Bluetooth module and main microprocessor will utilize 3.3V using a regulator. Bluetooth communications will be transmitted to the Bluetooth module from an external device. The Bluetooth module will relay this information to the microprocessor through a UART interface, and the microprocessor will in turn directly manipulate the LED matrix.
\begin{figure}[H]
	\centering
	\includegraphics[width=\textwidth]{img/blockdiagram}
	\caption[Hardware Block Diagram]{Hardware Block Diagram.}
	\label{fig:hardblock}
\end{figure}



\subsubsection{Hardware Design Overview}

Following is an explanation of the implementation parts in our project. This list details our use case, but not the specifications of the parts. Please reference 4.2 for a detailed bill of materials with specific details about parts such as price and dimensions. This parts discussion will loosely follow the block diagram above, parts will be discussed in input to output order, where the input is the mains power to the system and the output is the LED matrix.

\paragraph{Transformer}This device is intended to run off of mains power, which in the United States is 120V at 60 Hz. In order to rectify this to any usable form, the first step is to step that 120VAC down to 24VAC. This 24VAC will be modified by a switching regulator down the line. The input will be a 120VAC 60 Hz signal, and the output will be 24VAC 60Hz signal.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/transformer}
	\caption[Transformer Part]{Through hole package for the transformer.\textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number: FS12-090-C2-B
Manufacturer: Triad Magnetics\\
Price per part: \$4.69\\Type: Through Hole\\Instantaneous quantity available: 2,649

\paragraph{AC to DC Rectifier}At this stage, the 24VAC will be rectified to ~24VDC by a rectifier. The exact voltage output is not a major concern, as this DC voltage will be  immediately regulated down following the rectifier. As long as this voltage output is not lower than the dropout voltage of the 12V regulator, this device will satisfy our specifications.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/rect}
	\caption[Rectifier Part]{Through hole and surface mount packages for the rectifier. \textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number: MDB6S
Manufacturer: Fairchild Semiconductor\\
Price per part: \$0.43\\Type: Surface Mount or Through hole\\Instantaneous quantity available: 65,291

\paragraph{12v DC regulator}This device will take the 24VDC output of the rectifier and regulate it to 12V. This regulator is an intermediate step in lowering the voltage from 24VDC to 5VDC. It is possible to move directly from 24VDC to 5VAC, however this introduces potential for failure as such a step would heat up the regulator to an undesirable factor. Regulators are cheap enough from both a board space perspective and a cost analysis perspective that having an intermediate voltage regulator is not a problem.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/12reg}
	\caption[12V Regulator]{ Surface mount packages for the 12V regulator. \textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number:MAX5033CUSA+
Manufacturer: Maxim Integrated\\
Price per part: \$3.68\\Type: Surface Mount\\Instantaneous quantity available: 2,176

\paragraph{DC regulator}This is the second of three regulators, which will provide 5VDC to the Microprocessor. The regulator is sourced from the 12VDC from the 12VDC regulator, which is the same source as the 3.3VDC regulator.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/5reg}
	\caption[5V Regulator]{Surface mount packages for the 5V regulator. \textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number:LM2674MX-5.0/NOPB
Manufacturer: Texas Instruments\\
Price per part: \$3.28\\Type: Surface Mount\\Instantaneous quantity available: 15,819

\paragraph{3.3v DC regulator}This is the final regulator, which will provide 3.3VDC to the LED matrix. The regulator is sourced from the 12VDC from the 12VDC regulator, which is the same source as the 5VDC regulator.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/33reg}
	\caption[3.3V Regulator]{Surface mount packages for the 3.3V regulator. \textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number:LM3940
Manufacturer: Texas Instruments\\
Price per part: \$1.49\\Type: Surface Mount\\Instantaneous quantity available: 12,652

\paragraph{Microcontroller}The microprocessor is a dual core device which will run the code prepared by the software team. This device will drive the LED matrix by providing serial communication down a single line. The microprocessor will also communicate with the Bluetooth module in order to receive input from the user.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/TMS320F28379D}
	\caption[TMS320F28379D Microcontroller]{LPFQ package for the TMS320F28379D. \textit{Permission submitted to reproduce}. \cite{Misc}}
	\label{fig:TMS320Pic}
\end{figure}

Part number:TMS320F28379D
Manufacturer: Texas Instruments\\
Price per part: \$32.12644\\Type: Surface Mount\\Instantaneous quantity available: 15,000

\paragraph{Bluetooth Module}In order to receive input from the user, bluetooth communication from either a phone, tablet, or other device will be implemented. This module will communicate with that foreign device and send user input directly to the microprocessor.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/rn42}
	\caption[RN-42 Module]{Standard package for the RN-42. \textit{Permission submitted to reproduce}. \cite{Misc}}
	\label{TMS320Pic}
\end{figure}

Part number: RN-42
Manufacturer: Microchip Technology\\
Price per part: \$15.27\\Type: Surface Mount\\Instantaneous quantity available: 3,278

\paragraph{RGB LED}512 of these parts, oriented in a sixteen by eight grid, will be implemented as the devices "screen". They will receive serial communication from the microprocessor, and will be supplied by the output of the 3.3VDC regulator. A non standard serial communication type will be used in order to communicate with the LEDs. The LEDs will all be connected in series, and most of the complexities in terms of making patterns and other such display considerations will be offloaded to the software portion on the microprocessor. 

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/neo}
	\caption[WS2812 LED Module]{WS2812 LED Module for the LED matrix. \textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number: 1528-1809-ND
Manufacturer: Adafruit Industries LLC\\
Price per part: \$7.95\\Type: Surface Mount\\Instantaneous quantity available: Large amount

\paragraph{Transient Voltage Suppressor} The presence of transients from the wall power supply are entirely possible, and are something that the device should be able to protect from. In order to keep any large voltage spikes coming from any source, transient voltage suppressors will be implemented to funnel large voltage spikes directly to ground, keeping the device robust and preventing catastrophic failures.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.4\linewidth]{img/tvs}
	\caption[TVS Part]{Surface mount packages for the TVS.  \textit{Permission submitted to reproduce}. \cite{Misc}}
\end{figure}

Part number: SMAJ90A
Manufacturer: Micro Commercial Co\\
Price per part: \$0.57\\Type: Surface Mount\\Instantaneous quantity available: 9,478

\paragraph{Various Passive Components}

Various Resistors and capacitors will be included throughout the device. The capacitors will mostly be used as bypass capacitors in order to short any AC interference on the lines to ground, in order to protect the microprocessors. Resistors may be used to set RC time constants.