% !TEX root = master.tex
\subsubsection{Hardware Schematics}
It is important to note that the hardware design has been separated into three separate schematics. This is very important for the readability and organization of the project. If the project schematics are not separated, they would be very difficult to read. 

\paragraph{Schematic Creation Procedure}
In the following section, the procedure that was used to create the final schematic diagrams will be explored. Eagle will be the software used to create the schematics. This software will also be implemented to design the board and produce the GERBERs necessary to produce the final board.

Eagle is a software that is designed to aid in the design of printed circuit boards. This is known as a CAD software, or computer aided design. When designing a board in eagle, the program produces two separate files with .scm (schematic) and .brd (board) extensions. In this paper, the first part of these two extensions will be focused on, the schematic diagram and design. Once the design is finalized, the board file must be prepared and the GERBER files are produced. An in depth discussion on eagle files produced for board production can be found in section 4.

In design, physical parts must be chosen to satisfy the design requirements. Once the parts have been decided on, Eagle libraries must be created in order to use these parts in the schematic file. These libraries are created by referencing the data sheets of the parts we desire to use. Once the libraries are created, the parts can then be used as desired in the schematic. The parts that are using will be listed below, as well as the information provided by DigiKey, a parts supplier. This information includes part number, price, and various other important data points on the parts.

\paragraph{Communication System}
In this subsection, an in depth discussion of the schematic diagram of the smart table communication system will be discussed. The first thing to notice in the design of this communication section is the level conversion that is produced by the MOSFET circuit in the bottom section of the schematic. This is a very important addition to the circuit for the communication between the portions of the board. The microprocessor and the bluetooth controller are both communicating on 3.3 volt lines. This 3.3V communication is fine between the bluetooth module and the microprocessor, because they are sourced from the same 3.3V regulator. As a result, the UART communication will not be affected, and the communication between the two will not damage either device or damage the signal in any way.

\begin{figure}[H]
	\centering
	\includegraphics[width=0.9\linewidth]{img/main}
	\caption[Communication System Schematic]{Communication System Schematic}
	\label{fig:comms}
\end{figure}


Another thing to notice with regards to this schematic is the microprocessor schematic symbol. This part is a 176 pin microprocessor, which is clearly more pins than this symbol has. Because a large majority of the pins on the microprocessor are not used, they were not included in the schematic symbol for the microprocessor. Only the relevant pins of the micro have been depicted here. These include the UART communication, as well as power and ground, which are separated by a capacitor which serves as a high frequency short in order to filter out any noise from any outside source. Other than that, the schematic is relatively straightforward. The RN45 is displayed in its entirety, as it has a relatively small amount of pins in comparison to the main microprocessor. More detail for these parts can be found below.

\paragraph{Lighting System}

The LED matrix is sourced by a 5V regulator, and is expecting a 5V signal on the communication line, however, the microprocessor and Bluetooth module are both tied to 3.3 V lines. There is a relatively simple solution to this problem, known as level conversion. The problem of changing DC digital signals from one voltage to another for different voltage integrated circuits is fairly common problem. Using a mosfet in the configeration seen above, with a voltage source on either side of the mosfet (source and drain sides), allows the conversion of digital voltage. This is a bidirectional procedure, so any 3.3V communication coming in from the microprocessor will be changed to 5V. If the LED matrix could talk back, any 5V communication coming back would be converted live to 3.3V so the micro could read it. However. this will not be occurring as the LED matrix is a slave to the microprocessor with no communicating ability. As mentioned, this level conversion happens live, meaning the communication will not be affected at all by the addition of this mosfet. 

\begin{figure}[H]
	\centering
	\includegraphics[width=0.8\linewidth]{img/led}
	\caption[Lighting System Schematic]{Lighting System Schematic}
	\label{fig:light}
\end{figure}

\paragraph{Power System}
\label{sub:PowerSystemDesign}

\begin{figure}[H]
	\centering
	\includegraphics[width=1.0\linewidth]{img/powerscm2}
	\caption[Power System Schematic]{Power System Schematic}
	\label{fig:power}
\end{figure}

The power system on the board has an input of 120VAC and an output of both 5VDC and 3.3VDC, for the microprocessors and the LEDs respectively. The system is divided into three subsections: transformation, rectification, and regulation.

The transformation portion consists of a 5:1 transformer in order to transform 120VAC to 24VAC. This step prevents a large number of regulators to step the 120V down, if the device simply rectified the 120VAC to 120VDC immediately, it would take a large number of regulators to step that DC voltage down.

The second step is to rectify the 24VAC to DC in order to prepare it for regulation. The output of this rectifier is not entirely relevant, as it will be an input to a switching regulator. As such, the regulator will resolve the DC voltage to some known value. As long as the output to the rectifier is not below 12V (the rated value of the first regulator) + whatever drop out voltage of the regulator is specified (normally ~1V) , there will be no problem supplying the regulator circuit. 

The third and final step in the power system is the regulation, as mentioned above. There will be three regulators in total, with values of 12V, 5V, and 3.3V. The first regulator immediately following the rectifier will be the 12V regulator. This device will be supplied solely by the output of the rectifier, which will be some DC voltage above ~13V. We do not need to know the exact voltage, however it is expected to be around 24-28V, which is more than enough for supplying the 12V regulator. This regulator will then supply the other two regulators, the 5V and the 3.3V. These similarly sourced regulators are the final step in the power supply system on board. The 5V supplies the microprocessors and the 3.3V supplies the entire LED matrix. It is possible that several 3.3V regulators will be needed in order to supply such a load, but this decision will be made in testing. When two regulators share the same source and the same output, one will act as a load on the other. However, it is possible that this may need to be the final setup if one regulator is not enough to supply the board. 

In order to provide a level of reliability to the device, there are several measures of protection inherent in the system. The device is protected in several places by transient voltage suppressors, or TVSs. These devices are commonly used to prevent voltage spikes into an electrical system, and provide a simple and cheap degree of insurance. Typically impliemnted as a Schottky diode oriented in a reverse bias from the expected source of the transient. 

Bypass capacitors will also be used in strategic places in order to prevent any AC voltage interference picked up on the power lines from disrupting the communication of the microprocessors. These capacitors will be relatively small (.01 uF), and will be coupled very closely to the pins of the microprocessor supply pins.
