# Low-Cost, Compact, and Rapid Bio-Impedance Spectrometer with Real-Time Bode and Nyquist Plots
## 2 Materials and Methods
### Unit of Data Acquisition System  
Unit of the data acquisition system is tasked to read and record data of current, voltage and phase difference along measuring process. Figure 4 provides a technical illustration of how the data is recorded. \(R_{\rm Ref}\) is reference resistor, use to ensure that the current measured by the data acquisition system is the actual current that is injected into the sample. The value of the actual current Iz is the voltage on the reference resistor divided by the value of the reference resistor, \(R_{\rm Ref}\). There are two parts in data acquisition system device, i.e., signal conditioning circuit (SC) and gain phase detector (GPD). The SC part perform high impedance buffering, filtering, and amplifying, as required by the GPD. The buffer is an isolation circuit, it serves to ensure that the current and voltage signals are not affected by the circuit afterwards. Each buffer circuit is performed by LF353 op-amp. The RC circuit after buffer forms a high pass filter (HPF). Each HPF is set at 10 Hz cut-off frequency, is to eliminate dc-offset voltage that might arise. Finally, the AD620 instrumentation amplifier (IA) is used in two functions, first is to convert the differential signal to single ended, and second is to amplify the signals (G\({}_{1}\) and G\({}_{2}\)), if needed. To provide voltage gain control through \(R_{\rm G}\) selection, is used an analog multiplexer CD4051, and it is controlled by the microcontroller. In addition, the AD620 is low-cost IA with working frequency up to 1 MHz. However, it should be noted that a greater gain will cause the maximum working frequency will also decrease. Based on the explanation, then the complex impedance values of the measured sample can be calculated as  
\[Z_{\rm L}=|Z_{\rm L}|\angle\theta_{\rm L}=\frac{V_{\rm L}}{I_{\rm L}}=\frac{| V_{\rm L}|\angle\theta_{\rm VL}}{|I_{\rm L}|\angle\theta_{\rm IL}};\ \ \mbox{where}\ |Z_{\rm L}|=|V_{\rm L}|/|I_{\rm L}|\ \mbox{and}\ \theta_{\rm L}=(\theta_{\rm VL}-\theta_{\rm IL}) \tag{8}\]  
Figure 4: Data acquisition system: signal conditioning (SC) and gain-phase detector (GPD). \[V_{Z}=\frac{V_{\rm L}}{G_{2}}=\frac{|V_{\rm L}|\angle\theta_{\rm L}}{G_{2}}=|V_{Z}| \angle\theta_{\rm L};\ \ \text{where}\ |V_{Z}|=\frac{|V_{\rm L}|}{G_{2}} \tag{9}\]  
\[I_{\rm Z}=\frac{V_{\rm R}}{G_{1}*R_{\rm Ref}}=\frac{|V_{\rm R}|\angle\theta_{ \rm R}}{G_{1}*R_{\rm Ref}}=|I_{\rm Z}|\angle\theta_{\rm R};\ \ \text{where}\ |I_{Z}|=\frac{|V_{\rm R}|}{G_{1}*R_{\rm Ref}} \tag{10}\]  
so that,  
\[Z_{\rm L}=|Z_{\rm L}|\angle\theta_{\rm L};\text{where}\ |Z_{\rm L}|=|V_{\rm L }|/|I_{\rm L}|\ \text{and}\ \theta_{\rm L}=(\theta_{\rm VL}-\theta_{\rm IL}) \tag{11}\]  
Furthermore, in the development of a BIS instrumentation system that can work quickly, the use of GPD devices such as AD8302 as part of a data acquisition system is the right choice. The AD8302 has a very good ability in terms of identifying the gain and phase difference between two signals, from low frequencies up to 2700 MHz [35]. Common configuration the use of AD8302 for gain and phase difference measurement, especially for low frequency operation is shown if Figure 4 above. In the figure, two C\({}_{\rm C}\) capacitors connected to the OFSA and OFSB pins are the useful components to set high pass corner frequency (\(f_{\rm CH}\)) of the measured signals. According to the application note of the AD8302 at low frequency operation [36], formula to calculate \(f_{\rm CH}\) is given by  
\[f_{\rm CH}({\rm kHz})=2/C_{\rm C}\ (\mu{\rm F}) \tag{12}\]  
Working principle of the AD8302 is compares the two input voltage signals i.e., \(V_{\rm INPA}\) and \(V_{\rm INPB}\), and generates two output voltage signals i.e., \(V_{\rm MAG}\) and \(V_{\rm PHS}\). Where the \(V_{\rm MAG}\) is output voltage proportional to the decibel ratio of voltage signals applied to INPA and INPB, while the \(V_{\rm PHS}\) is output voltage proportional to the phase difference between INPA and INPB.