## 3 Concept and Methodology
### Sensor Concept and Design  
The sensor design is divided into three main parts: a cap to house the laser, a tank to hold the water sample, and a bottom sensing zone where the sensor is located (Figure 1). \begin{table}
\begin{tabular}{c c c c c} \hline
**Reference** & **Method/Technique** & & **Advantages** & & **Disadvantages/Limitations** \\ \hline
[40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51] & Interferometer/ refractive index & \(\bullet\) & High sensitivity. & \(\bullet\) & Inadaptable in harsh field measurement conditions. \\  & & & & \(\bullet\) & Mostly used in laboratories. \\ \hline
[8; 9] & Machine learning & \(\bullet\) & Label-free biochemical (chemical properties conservation). & \(\bullet\) & Difficulty of collecting real data to tune the model. \\  & & & - Accurate. & \(\bullet\) & Another process should be used to convert data to relevant parameters. \\  & & & Fast response, low cost. & & \\ \hline \end{tabular}
\end{table} 
Table 1: _Cont._The light with an angle of incidence \(\theta_{i}\) is emitted from the point of incidence \(O\) from the laser in the cap, towards the tank partially filled with the water sample. This incident angle can be controlled by a mirror-servo motor concept as shown in Figure 1. The light bends at the air-water interface while traveling from air medium (refractive index \(n_{air}\)) to water sample medium (refractive index \(n_{w}\)), making an angle of refraction \(\theta_{t}\) with the normal to the boundary. The relation between \(n_{air}\), \(n_{w}\), \(\theta_{i}\), and \(\theta_{t}\) is given by the law of refraction or Snell's law (Equation (1)). \[n_{air}\sin\theta_{i}=n_{w}\sin\ \theta_{t} \tag{1}\]  
The transmitted light propagates with an angle \(\theta_{t}\) until it reaches the bottom sensing zone at a location \(d\) from the corresponding point of incidence \(O^{\prime}\) (reference point). This distance \(d\) varies with the incident light wavelength \(\lambda\), angle of incidence \(\theta_{i}\), water sample refractive index \(n_{w}\), water temperature T, and air/water concentration \(W_{air}/W_{water}\). The value of \(n_{air}\) is set to one. Different works have been developed to define the refractive index \(n_{w}\) of the salty water. Reference [56] presented an empirical equation based on references [57] and [58], used to compute \(n_{w}\) up to 3-4 decimal places, as a function of the wavelength \(\lambda\), water salinity \(S\) (\(S=0\) (pure water) and \(S=35\%\) (salt water)), and temperature T. Reference [46] experimented with a new method for measuring the refractive index of salt water based on [PERSON]'s method. The experimental values obtained were used to generate mathematical equations relating \(n_{w}\) to the temperature and concentration of the water sample. The values of \(n_{w}\) are calculated for \(S=0\), \(S=35\%\), and \(\lambda=450\) nm, using each of the equations presented in references [46,56]. Results comparing \(n_{w}\) are presented in Figure 2 for \(S=0\) and \(S=35\%\) at different temperatures (0, 30, 40, 50, 60, and 90 \({}^{\circ}\)C, respectively). The same tendency can be seen between the two curves, with a 0.4% average error, allowing us to assume that both equations used in references [56] and [46] have the same conversion and can be used in our study. In what follows, we are using the equation used in reference [56] (Equation (2)). \[n_{w}=aT^{2}+b\lambda^{2}+cT+d\lambda+e \tag{2}\]  
where \(a\), \(b\), \(c\), \(d\) are the coefficients defined by \(a=-1.50156\times 10^{-6}\), \(b=1.07085\times 10^{-7}\), \(c=-4.27594\times 10^{-5}\), \(d=-1.60476\times 10^{-4}\), \(e=1.39807\) for salt water (\(S=35\%\)) and by \(a=-1.97812\times 10^{-6}\), \(b=1.03223\times 10^{-7}\), \(c=8.58125\times 10^{-6}\), \(d=-1.54834\times 10^{-4}\), \(e=1.38919\) for pure water (\(S=0\)). Figure 1: (a) Sensor concept and design; (b) design top view; (c) laser source side view. As mentioned above, the distance \(d\) depends on the parameters \(\lambda\), \(\theta_{l}\), \(n_{w}\), \(T\), and \(W_{air}/W_{water}\).