% !TEX root = master.tex
\subsubsection{Light-Emitting Diode Matrix}
% Chris
The LED matrix is the central feature of the smart table and will serve as the main display. It is comprised of 512 red, green, and blue LED chips connected in serial. The LED matrix will be arranged in the approximate shape of the smart table. It is intended to be programmable and will display information at the request of the user.
 
The main goals for the LED matrix include:

\begin{itemize}
	\item Receiving pulse-width modulated signals from the microcontroller in response to wireless commands.
	\item Display vivid colors and patterns at a suitable refresh rate.
	\item Exhibit detailed information such as time, date, and weather.
\end{itemize}

As seen in Table \ref{tab:ledspec} LED matrix consists of 512 RGB LED chips that utilize a custom protocol called WS2812.The RGB LEDs are integrated into extremely small and circular PCBs in the 5050 form factor. The LED chip includes a built in control circuit containing drivers for signal shaping and amplification. In addition, it contains data latching and an oscillator for precise timing. Constant current ensures that the light produced maintains consistency. They accept a 5 V supply voltage and can transfer data at speeds up to 800 Kbps and consume just 0.3 W. The maximum distance specifies how long the wire connecting LED chips may be before an amplifier must be implemented.

\begin{table}[H]
	\centering
	\caption[Specifications of LED Module]{Specifications of LED Module \cite{WS2812}}
	\label{tab:ledspec}
	\begin{tabular}{|c|c|}
		\hline 
		\textbf{Specification} & \textbf{Value} \\ 
		\hline\hline
		Type	& RGB \\
		\hline
		Color Combinations & 16,777,216 \\
		\hline
		Supply Voltage	& 5 V \\ 
		\hline
		Scan Frequency & 400 Hz \\
		\hline
		Power Consumption & 0.3 W \\
		\hline
		Data Rate & 800 Kbps \\
		\hline
		Transmission Delay & 300 ns \\
		\hline
		Maximum Distance & 5 m \\
		\hline 
	\end{tabular}
\end{table}

Table \ref{tab:ledpart} shows that WS2812 LED RGB LED chips are a cost effective solution in the design of the smart table. An important aspect of the LED chips is that they integrate many circuits that are required for typical lighting. Since the smart table utilizes hundred of LEDs, it would be cost prohibitive and time intensive to manually design and fabricate an individual PCB for each LED that contains the proper drivers. The LED chips offer a unique solution that includes all of the required features for the smart table's LED matrix at an affordable price. 

\begin{table}[H]
	\centering
	\caption[Parts for LED Matrix]{Parts for LED Matrix \cite{WS2812}}
	\label{tab:ledpart}
	\begin{tabularx}{\textwidth}{|c|X|c|c|}
		\hline 
		\textbf{Part} & \textbf{Description} &
		\textbf{Cost} & Quantity \\ 
		\hline\hline
		LED Chip	& WS2812B 5050 RGB LED Chip & \$55.20 & 512 \\
		\hline 
	\end{tabularx}
\end{table}

Beyond single data input and data output pins, the chips need only be connected to power and ground. Each because each LED chip has an RGB LED, shown in the center of \ref{fig:led-pins}, it is possible to create up to 256 different color combinations. However, since the LEDs are compatible with pulse-width modulation, over 16 million color combinations can be produced per LED chip. This allows extraordinary flexibility when it comes to displaying data on the surface of the smart table. They have impressive visual output, especially considering their cost. 

\begin{figure}[h]
	\centering
	\includegraphics[width=0.7\linewidth]{img/led-pins}
	\caption[Pinout Diagram of LED Module]{Pinout Diagram of LED Module. \textit{Permission submitted to reproduce}. \cite{WS2812}}
	\label{fig:led-pins}
\end{figure}

Figure \ref{fig:led-cascade} shows three LED chips being cascaded. The WS2812 protocol used by the LED chips is extremely useful because they do not need to be multiplexed. All of the LEDs can simplify be cascaded in series, with one chip's DOUT pin connected to the next chip's DIN pin. The DIN of the first LED receives 24-bit serial data from the microcontroller at up to 800 Kbps, which is then sent to the data latch. The signal is internally passed through the signal reshaping and amplifier circuit, which guarantees that the waveform is not distorted when the signal travels to the next LED chip through the DOUT pin. The presence of the signal reshaping and amplifying circuit means that the signal integrity is not impacted by the number of LED chips cascaded, but rather by the speed of the signal transmission itself.

\begin{figure}[h]
	\centering
	\includegraphics[width=0.8\linewidth]{img/led-cascade}
	\caption[Cascade Diagram of LED Chip]{Cascade Diagram of LED Chip. \textit{Permission submitted to reproduce}. \cite{WS2812}}
	\label{fig:led-cascade}
\end{figure}

The chips themselves are extremely small, a mere 5 mm in diameter as shown in \ref{fig:led-dims}. This gives a lot of leeway when spacing the chips out and isolating them from one another in opaque compartments to prevent light bleeding through from neighboring LEDs. Them chip themselves to not need to be mounted to a PCB, and instead will be wired together and reinforced with some sort of strip or ribbon. Since only 512 LEDs are being implemented, an amplifier circuit should not be needed to increase the signal power because the total length of the LED chip strip should not exceed 5 meters.

\begin{figure}[H]
	\centering
	\includegraphics[width=1.0\linewidth]{img/led-dims}
	\caption[Dimensions of LED Module]{Dimensions of LED Module. \textit{Permission submitted to reproduce}. \cite{WS2812}}
	\label{fig:led-dims}
\end{figure}
