Design And Implementation Of An Impedance Analyzer Based On Arduino Uno

Transcription

DEGREE PROJECT, IN MEDICAL ENGINEERING , SECOND LEVELSTOCKHOLM, SWEDEN 2015Design and implementation of animpedance analyzer based onArduino UnoA PILOT STUDY OF BIOELECTRICALIMPEDANCE ANALYSISJING WANGKTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF TECHNOLOGY AND HEALTH

Examensarbete inom medicinskteknik (HL202X) 30hp2014:13Design and implementation of an impedance analyzerbased on Arduino UnoTechnology and HealthJing WangGodkänt2015-03-25HandledareRecensentKaj LindecrantzFarhad AbtahiUppdragsgivareMats NilssonSammanfattningMätning med elektrisk bioimpedans är vida använt idag för medicinsk övervakning.Användningsområden inkluderar bland annat bedömning av kroppssammansättning,uppskattning av nutritionsstatus och detektering av cancer. Modaliteterna för att tolkainformationen från elektrisk bioimpedans har också utvecklats snabbt över de senaste årtionden,från analys med en frekvens till spektrum och bilder.Biompedans erhålls genom att ta fram sambandet mellan ström och spänning. I ett strömbaseratbioimpedans‐system har spänningsskällans stabilitet en stor inverkan på systemetsprestanda. Det här examensarbetet jämförde tre olika spänningsstyrda strömkällor: enförbättrad Howland‐krets, en load‐in‐the‐loop‐krets drivs av en ström transportör och en kretsmed dubbeloperativförstärkare. Dessa kretsar simulerades i Multisim och producerades sedansom prototyper och testades i labb.Försök har även gjorts med att generera och samla in signaler med digital‐analog omvandlingoch analog‐digital omvandling. De kontrollerades av Arduino Uno och impedans analyseradesi Matlab.I

Master of Science Thesis in Medical Engineering(HL202X) 30 credits2014:13Design and implementation of an impedanceanalyzer based on Arduino UnoTechnology and HealthJing WangApprovedReviewerSupervisor2015-03-25Kaj LindecrantzFarhad AbtahiExaminerMats NilssonAbstractElectrical bioimpedance measurement is widely used today for monitoring body condition. Theapplications include and go beyond, body composition assessment, nutritional statusevaluation, and cancer detection. The modalities for interpreting the impedance informationhave also developed quickly over the recent decades from single frequency bioimpedanceanalysis to spectrum and to images.Bioimpedance is measured by computing the relationship between voltage and current. In acurrent based bioimpedance measurement system, the stability of current source has a largeinfluence on the performance of the system. This thesis compared three different voltagecontrolled current sources: enhanced Howland circuit, load‐in‐the‐loop circuit driven by acurrent conveyor and double operational amplifiers circuit. These circuits were simulated inMultisim and manufactured into prototypes and tested in lab.Effort has also been made to generate and collect signals with digital‐to‐analog convertor andanalog‐to‐digital convertor. They were controlled by Arduino Uno and impedance wasanalyzed in Matlab.III

IV

ACKNOWLEDGEMENTFirst I would like to thank my supervisor Farhad Abtahi for his invaluable support andguidance during the project.I would also like to thank all my friends here for their company.Finally, I would like to thank my parents who have supported me and have been waiting forme throughout the whole master program.Jing WangStockholm, January, 2015

NOMENCLATURENotationsSymbolDescriptionZImpedance (Ohm)RResistance (Ohm)XReactance (Ohm)ICurrent (A)VVoltage (V)ωFrequency (rad/s)YAdmittance (S)GConductance (S)BSusceptance (S)CCapacitance (F)σConductivity (S/cm)εPermittivity (F/cm)ReResistance of extracellular fluid (Ohm)RiResistance of intracellular fluid (Ohm)RmResistance of membrane (Ohm)CmCapacitance of membrane (F)AbbreviationsEBIElectrical bioimpedanceBCABody composition assessmentBISBioelectrical impedance spectroscopyADCAnalog to digital convertorDACDigital to analog convertorVCCSVoltage controlled current sourceECFExtracellular fluidICFIntracellular fluidSNRSignal‐to‐noise ratioQDQuadrature demodulationCMRRCommon mode rejection ratio

Op‐AmpOperational amplifierDOADouble operational amplifierI2CInter‐integrated circuitSPISerial peripheral interfaceIDEIntegrated development environmentDDSDirect digital synthesisGUIGraphical user interfaceVIII

TABLE OF CONTENTSACKNOWLEDGEMENT VNOMENCLATURE VIITABLE OF CONTENTS IX1 INTRODUCTION 11.1 Background 11.2 Purpose 11.3 Outline 12 THEORETICAL FRAMEWORKS 32.1 Circuit theory 32.2 Electrical properties of living tissue 42.3 Bioimpedance measurement system design 62.4 Communication protocol 92.4 Arduino Uno 103METHODS 133.1 System Implementation 133.2 Source generation 133.3 VCCS 153.4 Signal measurement 183.5 Results display 214 RESULTS 234.1 Signal generation 234.2 VCCS 234.3 Signal measurement and display 275 DISCUSSION 295.1 Impedance measurement system 295.2 Safety considerations 306 CONCLUSIONS 317 FUTURE WORK 328 EXPERIENCE GAINED 33REFERENCES 35

10

1 INTRODUCTION1.1 BackgroundElectrical bioimpedance (EBI) technology measures electrical properties of biological materialsby means of applying electrical current/voltage to the whole material or regions of interest,sensing corresponding voltage/current and calculating the impedance by using Ohm’s law. EBIvalue is related to both the resistive and dielectric properties and the geometrical dimensions ofthe material, so it is possible to monitor not only material composition but also volume. Overthe years, research interest on EBI has raised to develop new methods for patient monitoringand diagnosis. Bioimpedance research applications include but are not limited to bodycomposition assessment (BCA) (1), skin cancer detection (2), impedance cardiography (3), breastcancer detection (4), and cerebral monitoring (5). However, in many cases, due to inaccuratemodels, presence of artefacts, errors in measurement and estimation of bioimpedance, theyhave not been widely accepted in clinical applications (6).Bioimpedance instrumentation by using system‐on‐chips (e.g. AD5933) can provide anaffordable framework for developing compact systems (7). However, their applications arecurrently limited to single‐frequency measurements or bioelectrical impedance spectroscopy(BIS) by using frequency‐sweep technique that estimates bioimpedance in one single frequencyat a time and repeat to measure a spectrum. To study different source of errors in bioimpedancemeasurements and estimation, access to current/voltage signals prior to impedance estimationis desired which requires custom design of measuring device. This device can be also useful instudy of BIS by using broadband excitation of waveforms like square wave, step function, chirpand multi‐sine.1.2 PurposeThe object of this thesis project is to design a bioimpedance measuring device with an analog todigital convertor (ADC), a digital to analog convertor (DAC), a voltage controlled currentsource (VCCS) and an Arduino board working as a microcontroller. By building the wholesystem from scratch, the aim was to understand the system from each component, test thepossibility of building it with lower cost and make suggestions for further improvement.To achieve this goal, this project is divided into following tasks: to simulate and compare different VCCS configurations; to make prototypes for the VCCSs and test in lab; to create a voltage source with DAC and Arduino Uno; to collect electrical signal with ADC and Arduino Uno; to collect samples from Arduino Uno in Matlab; to calculate and display the impedance in Matlab;1.3 OutlineThis thesis is divided into eight chapters. Chapter Two contains the background knowledgeabout bioelectrical impedance, earlier research on BIS system design, BIA applications andknowledge about communication protocol and the microcontroller Arduino Uno. Chapter

Three describes the methods and components used in the project. Chapter Four presents resultsof the simulation and lab test of VCCS and presentation of signal generation and collection.Results are discussed in Chapter Five. Chapter Six is the conclusion of the whole project.Chapter Seven describes the future work to improve the project and suggest alternatives to thecomponent or the method used. And the last chapter is about the experience gained from theproject.2

2 THEORETICAL FRAMEWORKS2.1 Circuit theory2.1.1Electrical impedanceElectrical impedance (Z) is a measure of opposition to the current flow in a circuit (Figure 1). Itcan be written as a complex in the Cartesian form or the polar form:Z R j X Z e j . [1]The real part R is the resistance, the imagery part X is the reactance, is the magnitude ofimpedance and is the phase difference between the applied voltage (V) and correspondingcurrent (I). Resistance causes energy loss in the circuit. It won’t lead to any phase shift betweencurrent and voltage. Reactance stores energy and causes phase difference between voltage andcurrent. Usually reactance is introduced by capacitors or inductors in the circuit. (8)Electrical impedance can be calculated from Ohm’s law:Z V.I[2]Figure 1 The impedance vector.Figure 2 An example of phase delay.2.1.2Dielectric properties of materialsThe electrical properties of materials can also be expressed as admittance Y, which is the inverseof impedance. The formula, with capacitive components in the circuit, can be written as:Y 1 G jB G j C K j K j r 0 Z[3]The real part G is called conductance. The imaginary part B is the susceptance. A capacitor isdrawn in Figure 3. Assuming the area of electrodes is A and the distance between two planes isd, then K is the ratio between area and distance: K A/d. is the conductivity of the material. It

is a measure of the material’s ability to conduct a current. And is the permittivity of themedium between two planes which can be further extended to, whereis the relativepermittivity of the material andis the dielectric permittivity of vacuum. This parameter isrelated to the polarization of medium in response to the electric field. A high permittivitydenotes easy transmittance of electric field through the medium. is the frequency of theapplied electric field. (8)Figure 3 A capacitor model.2.2 Electrical properties of living tissue2.2.1Cell modelA cell is the most fundamental structural and functional unit in living tissues. The cellmembrane, which has a phospholipid bilayer structure, separates the intracellular fluid (ICF)from the extracellular fluid (ECF). The intracellular and extracellular mediums are bothelectrolytes. They contain ions that can move around the fluid, transport electrical charges andtherefore conduct electrical currents. The concentrations of some major ions in ICF and ECF areshown in Table 1.Table 1 Concentration of major ions in body liquids. Adapted from (9)Concentration(meq/L)ICFECFNa K Ca2 Mg2 455161492The cell membrane can be considered as a dielectric. It has a very low conductance. So the ECF,membrane and ICF form a conductor‐dielectric‐conductor structure, which is an analogy to acapacitor in the circuit.To study electrical properties of living tissues, it is of great help to establish an equivalentelectrical circuit for the cells. According to the characteristics introduced above, the ECF can bedepicted as a single resistor (Re). The ICF contains not only electrolytes but also organelles thatcould introduce dielectric properties. For simplification, it is also modeled as a resistor (Ri). Thecell membrane is equivalent to a resistor connected in parallel with a capacitor (Rm Cm). (8)See Figure 4.4

Figure 4 Equivalent electrical model of a cell. Re represents resistance of ECF. Ri represents resistance ofICF. Rm represents resistance of membrane. And Cm represents capacitance of membrane. (8)Based on the model introduced above, the impedance of a cell can be written as:Re 1 j CRi 1 Z Re Ri j C 1 j C Re Ri [4]At low frequencies, the electrical current is impeded by the membrane. So the ECF plays amajor role in conducting electrical current. In the extreme case, when a DC current is applied,the measured signal would be related only to ECF. This could also be demonstrated with theequation above. When the frequency 0, the expression for the impedance could be writtenas:Z Re .[5]At high frequencies, the electrical current passes through the membrane and the measurementis dependent on both ECF and ICF.2.2.2β dispersionThe dielectric properties of living tissues and cell suspensions have a dispersive behavior inresponse to electrical currents. This means their dielectric properties like permittivity andconductivity depends on frequency. According to the changes in permittivity and conductivity,Schwan defined three major dispersions: α, β and γ dispersion. A fourth dispersion widow, δdispersion, between β and γ dispersion has also been noticed. (10)

Figure 5 Frequency dependence of permittivity and conductivity of living tissue (11).β dispersion includes the frequency range from 1kHz to several Mhz. This dispersion isconsidered to be related to the behavior of membrane. The properties of cells are mainlyinfluenced by dielectric properties of membrane and the process of charging and dischargingthe membrane. Because of this reason, the measurement of electrical bioimpedance is usuallyperformed in this range. And for single frequency bioimpedance analysis, the frequency istypically 50kHz.2.3 Bioimpedance measurement system designThere are two methods to obtain the impedance. One is to inject an electrical current andmeasure the corresponding voltage. Another method is to apply voltage to the object of interestand measure the current. Both methods are used in bioimpedance measurement, and both havetheir advantages and limitations. Compared to the BIA device that applies voltage to the target,the current based BIA is able to manage currents within medical safety limits more easily.Besides, it suffers less noise due to spatial variation and produces better bioimpedancetomography results. However, current source gives poor performance at high frequency due toits decreased output impedance. Voltage sources applications work with higher bandwidth,however low dc SNR. (12) The current source based BIA is more commonly used in the EBImeasurement devices today. In this thesis work, the focus will be the impedance measurementsystem with a current source.2.3.1Electrodes and connectionBioimpedance measurement devices typically consist of two major functions: first inject analternating current to the biological material and then measure the potential difference fromtwo ends. Fulfilling these two functions requires two, three or four electrodes (13). Two‐electrode method and four‐electrode are introduced here. Three‐electrode method is not verycommon. One example using three‐electrode method can be found in (14).Two‐electrode methodThe two‐electrode method or bipolar method uses two electrodes to inject a known current tothe biological material and measures the voltage drop over this material from the sameelectrodes. See Figure 6. Apart from the impedance of biological material Zm, the impedances attwo electrode contacts Zc are also included in the measured impedance.6

Figure 6 Biopolar bioimpedance measurement system (a) and its equivalent electrical circuit (b).So the two‐electrode method only works when the impedance of the tested material is muchhigher than the impedance of electrode contacts at the BIA working frequency. If a BIS device isused, two‐electrode method is not an option because the impedance at electrode‐electrolyteinterface is susceptible to frequency variations. (15)Four‐electrode systemThe four‐electrode system is also known as tetrapolar system. It uses separate electrode pairs toinject current and measure voltage.Figure 7 Tetrapolar bioimpedance measurement system (a) and its equivalent electrical circuit (b).Assuming the voltmeter is ideal, the measurement result will involve only the impedance of thetested material. This makes the four‐electrode method most commonly used in today’sbioimpedance measurement.In practice, however, the impedance at the contact sites still has an impact on the measurementbecause of common voltage introduced by contacts’ impedance and common mode rejectionratio (CMRR) of the differential amplifier in the voltmeter. (15) (16)2.3.2Current generationAn alternating current source can be obtained by combining a voltage generator with a voltage‐to‐current convertor circuit. For a current source, high output impedance is desired in EBImeasurement, especially in BIS where the working frequency goes up to several Mhz. However,the output impedance of a current source drops as the frequency increases. This is caused bythe parasitic capacitances that come from many components in the circuit, for example betweenelectrodes. The output impedance of the current source should be at least 100 kOhm (17).Sinusoidal signal generationSinusoidal signal can be generated from either analog or digital method.

One example of analog method is to use a sinusoidal oscillator that converts DC power to aperiodic waveform. This method requires complexity in circuits and high accuracy in some ofthe electrical components. And it lacks flexibility compared to digital methods.Generating waveforms with digital modules is called direct digital synthesis (DDS). The blockdiagram below shows the idea of a simple DDS system (Figure 8) (18). DAC takes values from alook‐up table where the address counter points. As the counter steps through the look‐up tablerepeatedly, a periodical wave is obtained from the DAC output. The low‐pass filter (LPF) afterthe DAC filters out the high‐frequency harmonics and makes the curve gisterDACLPFFigure 8 Block diagram of a simple DDS system.VCCSMany studies have been conducted on the VCCS design to achieve as large output impedanceat high frequencies as possible (17) (19). Some typical VCCS configurations include Howlandcircuit, load‐in‐the‐loop circuit, etc. More detailed descriptions can be found in Section 3.3.1.2.3.3 Impedance analyzingOne of the most popular methods for analyzing the impedance of biological material is thequadrature demodulation (QD) method (20). The basic idea is introduced here.Consider i t I cos( 0t ) , by adding the phase shift caused by the impedance Z, theexpression of voltage can be written as:v(t ) Z i(t ) I Z cos( 0t ) I Z cos( 0t ) cos I Z sin( 0t ) sin , [6]where the two items are in phase and in quadrature with the injected current. Then theimpedance Z can be expressed as:Z R jX Z cos j Z sin [7]In the upper branch, the voltage is multiplied by cos( 0t ) , so the signal before low‐pass filter is:v1 (t ) v(t ) cos( 0t ) I Z cos( 0t ) cos( 0t )[8]1 cos(2 0t )sin(2 0t ) I Z (cos sin )22The high frequency components are filtered out by the low‐pass filter, so the output containsonly1III Z cos which can be written as R . Similarly, the output of lower branch is X2228

Figure 9 Quadrature demodulation method.Other impedance analyzing methods include measuring the amplitude and phase using Gain‐phase detector (21), bridge method (22), etc.2.4 Communication protocolCommunication between devices requires a common language that could make dataidentifiable. Communication protocols are such rules that define the formats of data and maycontain other information like the speed of transmission, the order of data bits, direction ofoperation, etc.2.4.1I 2CInter‐integrated circuit (I2C) is a multi‐master and multi‐slave protocol. It uses two bidirectionalsignal lines. One is the serial data line (SDA) for data transmission, and the other is the serialclock line (SCL) for two‐wire interface clock frequency.Figure 10 I2C connection with one master and three slaves (23)Data transmitted between master and slave device always begins with a START bit and endswith a STOP bit. After the master device starts data transmission, the master device reaches toeach slave device with the slave’s unique address. If the address matches, the slave will respondto the master with an AKCNOWLEDGE signal.2.4.2SPISerial peripheral interface (SPI) is a four‐wire full‐duplex interface allowing a single master tocommunicate with one or multiple slaves. Master In Slave Out (MISO) is used for sending datafrom slave to master. Master Out Slave In (MOSI) is used for sending data from master to slavedevice. Serial Clock (SCK) is configured by the master device and is used to synchronize datatransmission. Slave Select (SS) is used to select the slave device that the master wants tocommunicate with. MOSI, MISO and SCLK are common to all slave devices, while SS is specificfor each slave. The slave device is enabled only when its SS pin is low. See Figure 11.

Figure 11 SPI communication with single master and single slave (24)2.4.3I2C vs. SPIBoth I2C and SPI are commonly used in electronic devices. However, they have some importantdifferences that make them suitable for different purposes. Understanding the differencebetween I2C and SPI helps to select a proper interface for certain project. Two aspects arediscussed below:Wiring: I2C is a two‐wire interface, while SPI typically requires 3 N signal lines for N slavedevices.Speed: I2C is slow compared to SPI. It transfers data at a speed of 100 kbps in standard mode, 400kbps in fast mode, 1Mbps in fast mode plus and 3.4 Mbps in high‐speed mode (23). But high‐speed mode is not always feasible because of limitations on the master side. SPI has no specificworking mode or any defined limit. The throughput rate varies from device to device, and cango higher than 10 Mbps.2.5 Arduino UnoAruidno Uno (Figure 12) is the latest revision of the basic Arduino USB board. It is based on themicrocontroller ATmega328. The system clock is 16 Mhz. The board has 14 digital input/outputpins and 6 analog inputs. Some of these pins have special functions for communicating withother devices or microcontrollers. (25)For SPI communication using SPI library:Table 2 SPI pins on Arduino UnoPin 10Pin 11Pin 12Pin 13Slave selection (SS)Master out slave in (MOSI)Master in slave out (MISO)Serial clock (SCK)For I2C communication using Wire libray:Table 3 I2C pins on Arduino UnoPin A4Pin A5Serial data (SDA)Serial clock (SCL)Arduino Uno could be programmed with Arduino software by simply connecting the board tocomputer via USB port. Arduino boards come with an integrated development environment(IDE) which is an open‐source software based on Processing, avr‐gcc, and other open sourcesoftware (26). The Arduino programs can be written in C/C . Arduino itself has its ownstandard library and some other libraries that have made some transforms on C/C language.10

A typical Arduino program has two major functions: setup(), which runs in the beginning of aprogram and initializes settings; and loop(), which is called repeatedly to fulfill desired tasks.Figure 12 Arduino Uno front (25).

3 METHODS3.1 System ImplementationA simple impedance measurement system was implemented in this thesis. Arduino Uno wasused as a microcontroller. It wrote to a DAC and generated a sine waveform. A low‐pass filterwas connected to the DAC output to smooth the signal and a high‐pass filter was connectedafter the low‐pass filter. The high‐pass filter was used to remove the DC component from DACoutput, since the output range of DAC used in the project was 0‐5V (27). The voltage sourcewould then be transferred to a current source after VCCS. A DC offset was added to the voltagesignal over the RC model to fit the analog input range of ADC. The ADC measured voltagesover the RC model and a reference resistor. Voltage data was then sent to Arduino Uno. Finally,samples were sent to Matlab and impedance was calculated and displayed in Matlab. The blockdiagram of major function blocks in the system is shown in Figure 13 below.DC power supplyDACVVCCSI2R1C modelVADCMicrocontroller(Arduino Uno)MatlabSamplesFigure 13 Simplified block diagram of the impedance measurement system.3.2 Source generation3.2.1Generating waveforms from look‐up tableA sinusoidal voltage signal was generated from DAC using the DDS method. To generate thiswaveform, a sine wave look‐up table is needed. The look‐up table stores both amplitude andphase information of a sine (or cosine) wave. When reading from the look‐up tablecontinuously, the index of the amplitude value increases and so does the phase of the outputwaveform. To achieve n‐bit resolution, a sinusoidal cycle is divided into 2n phase points (Figure14). If these points are read by DAC successively without skipping points, the frequency of theoutput waveform obtained will be:f out 1 fin2n[9]

Figure 14 A sinusoidal cycle is divided into 2n points.The frequency is changeable by changing the input clock frequency, rewriting the look‐up tableor skipping points.In our project, the sine wave look‐up table was stored in the flash memory of Arduino. Toachieve the highest frequency, 32 points were taken for one sinusoidal cycle.3.2.2MCP4725MCP4725 (27) is a single channel 12‐bit DAC supporting I2C interface. This chip is chosenbecause it is easy to use. It has three modes: standard mode supports a baud rate of 100 kbps;fast mode supports a baud rate of 400 kbps; high‐speed mode supports 3.4 Mbps. Themaximum SCL clock frequency supported by ATmega328 on the Arduino Uno board is 400kHz (28). So it is only possible to use standard and fast mode with Arduino Uno.Fast mode communication was used in the thesis to get as high speed as possible with availablehardware components. Commands that need to be written in the microcontroller are shown inFigure 15.The output voltage is given by:VOUT VREF Dn4096[10]whereequals to the single power supplyandis the input code. In our case,is3.3 V from Arduino Uno board. The output signal ranges from 0 to 3.3 V. And the smallestvoltage difference that MCP4725 can produce is 0.8 mV.Arduino Uno supports two‐wire interface communication with the wire library. Commoncommands include: Wire.begin() to initiate the wire library, Wire.beginTransimmission(address) tobegin transmission to the I2C device with the given address, Wire.endTransmission() to end thetransmission and so forth. Detailed description and instruction for the library can be seen in (29).14

Figure 15 Fast mode write command. (27)3.3 VCCS3.3.1VCCS configurationsLoad‐in‐the‐loopA single operational amplifier (Op‐Amp) can work as a simple and effective VCCS. In a circuitlike Figure 16, if the Op‐Amp is ideal, the electrical current flowing through the load will beequal to that in R1. The output current can be written as:I load V1R1[11]which is independent of the load value.Figure 16 Simple load‐in‐the‐loop circuit.

Seoane et al (30) proposed an enhanced version based on simple load‐in‐the‐loop configuration.A current conveyor was added to the first stage so that the output current would beindependent of the value of resistor R3 that is connected to the inverting input of the secondstage. This resistor can be changed to get higher output impedance (Figure 17).Figure 17 A single Op‐Amp VCCS circuit driven by current conveyor. (30)Figure 18 shows a simplified equivalent schematic of AD844. The current flowing between theinput nodes gets replicated and flows in resistor Rt. In the method proposed by Seoane et al,this current was connected to the next stage via AD844 Pin 5. The amplitude of current inFigure 17 can be calculated approximately by:I V1R1 RIN[12]where the typical value of RIN is 50 Ohm (31)Figure 18 Equivalent circuit of AD844. (31)Enhanced Howland circuitThe enhanced Howland circuit has an advantage over other current source configurations: itneeds only one Op‐Amp and five resistors to work. The circuit is comparably simple. Theoutput current is given by:Vin R3R4 R2[13]R3 R4 R5 R2R1[14]IL The resistance follows the ratio:16

Figure 19 Enhanced Howland

to create a voltage source with DAC and Arduino Uno; to collect electrical signal with ADC and Arduino Uno; to collect samples from Arduino Uno in Matlab; to calculate and display the impedance in Matlab; 1.3 Outline This thesis is divided into eight chapters.